com.aspose.words

Class RevisionGroup

  • java.lang.Object
    • com.aspose.words.RevisionGroup
public class RevisionGroup 
extends java.lang.Object

Represents a group of sequential Revision objects.

Example:

Shows how to print info about a group of revisions in a document.
Document doc = new Document(getMyDir() + "Revisions.docx");

Assert.assertEquals(7, doc.getRevisions().getGroups().getCount());

for (RevisionGroup group : doc.getRevisions().getGroups()) {
    System.out.println(MessageFormat.format("Revision author: {0}; Revision type: {1} \n\tRevision text: {2}", group.getAuthor(), group.getRevisionType(), group.getText()));
}

Property Getters/Setters Summary
java.lang.StringgetAuthor()
Gets the author of this revision group.
intgetRevisionType()
Gets the type of revisions included in this group. The value of the property is RevisionType integer constant.
java.lang.StringgetText()
Returns inserted/deleted/moved text or description of format change.
 

    • Property Getters/Setters Detail

      • getAuthor

        public java.lang.String getAuthor()
        
        Gets the author of this revision group.

        Example:

        Shows how to print info about a group of revisions in a document.
        Document doc = new Document(getMyDir() + "Revisions.docx");
        
        Assert.assertEquals(7, doc.getRevisions().getGroups().getCount());
        
        for (RevisionGroup group : doc.getRevisions().getGroups()) {
            System.out.println(MessageFormat.format("Revision author: {0}; Revision type: {1} \n\tRevision text: {2}", group.getAuthor(), group.getRevisionType(), group.getText()));
        }
      • getRevisionType

        public int getRevisionType()
        
        Gets the type of revisions included in this group. The value of the property is RevisionType integer constant.

        Example:

        Shows how to print info about a group of revisions in a document.
        Document doc = new Document(getMyDir() + "Revisions.docx");
        
        Assert.assertEquals(7, doc.getRevisions().getGroups().getCount());
        
        for (RevisionGroup group : doc.getRevisions().getGroups()) {
            System.out.println(MessageFormat.format("Revision author: {0}; Revision type: {1} \n\tRevision text: {2}", group.getAuthor(), group.getRevisionType(), group.getText()));
        }
      • getText

        public java.lang.String getText()
        
        Returns inserted/deleted/moved text or description of format change.

        Example:

        Shows how to print info about a group of revisions in a document.
        Document doc = new Document(getMyDir() + "Revisions.docx");
        
        Assert.assertEquals(7, doc.getRevisions().getGroups().getCount());
        
        for (RevisionGroup group : doc.getRevisions().getGroups()) {
            System.out.println(MessageFormat.format("Revision author: {0}; Revision type: {1} \n\tRevision text: {2}", group.getAuthor(), group.getRevisionType(), group.getText()));
        }