RevisionAction

Contents
[ ]

Inheritance: java.lang.Object, java.lang.Enum

public enum RevisionAction extends Enum<RevisionAction>

Represents an action that can be applied to a revision.

Example usage:


 try (RevisionHandler revisionHandler = new RevisionHandler(sourceFile)) {
     List revisionList = revisionHandler.getRevisions();

     for (RevisionInfo revisionInfo : revisionList) {
         if (revisionInfo.getType() == RevisionType.DELETION)
             // Set an action to be applied to the revision
             revisionInfo.setAction(RevisionAction.Accept);
     }
     // Create an instance of ApplyRevisionOptions
     ApplyRevisionOptions revisionChanges = new ApplyRevisionOptions();
     revisionChanges.setChanges(revisionList);
     // Apply the revisions using the options
     revisionHandler.applyRevisionChanges(resultFile, revisionChanges);
 }
 

Fields

Field Description
NONE Indicates that no action is to be taken.
ACCEPT Indicates that the revision will be displayed if it is of type INSERTION, or it will be removed if the type is DELETION.
REJECT Indicates that the revision will be removed if it is of type INSERTION, or it will be displayed if the type is DELETION.

Methods

Method Description
values()
valueOf(String name)

NONE

public static final RevisionAction NONE

Indicates that no action is to be taken.

ACCEPT

public static final RevisionAction ACCEPT

Indicates that the revision will be displayed if it is of type INSERTION, or it will be removed if the type is DELETION.

REJECT

public static final RevisionAction REJECT

Indicates that the revision will be removed if it is of type INSERTION, or it will be displayed if the type is DELETION.

values()

public static RevisionAction[] values()

Returns: com.groupdocs.comparison.words.revision.RevisionAction[]

valueOf(String name)

public static RevisionAction valueOf(String name)

Parameters:

Parameter Type Description
name java.lang.String

Returns: RevisionAction