RevisionType
Leave feedback
On this page
Inheritance: java.lang.Object, java.lang.Enum
public enum RevisionType extends Enum<RevisionType>
Represents the types of revisions in a document.
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);
}
| Field | Description |
|---|---|
| INSERTION | Represents a type when new content was inserted in the document. |
| DELETION | Represents a type when content was removed from the document. |
| FORMAT_CHANGE | Represents a type when change of formatting was applied to the parent node. |
| STYLE_DEFINITION_CHANGE | Represents a type when change of formatting was applied to the parent style. |
| MOVING | Represents a type when content was moved in the document. |
| Method | Description |
|---|---|
| values() | |
| valueOf(String name) | |
| fromInt(int toIntValue) | Creates new constant of enum RevisionType using provided numeric value. |
| fromString(String toStringValue) | Parses string representation of RevisionType to get the enum constant. |
| toInt() | Numeric representation of RevisionType. |
| toString() | String representation of RevisionType. |
public static final RevisionType INSERTION
Represents a type when new content was inserted in the document.
public static final RevisionType DELETION
Represents a type when content was removed from the document.
public static final RevisionType FORMAT_CHANGE
Represents a type when change of formatting was applied to the parent node.
public static final RevisionType STYLE_DEFINITION_CHANGE
Represents a type when change of formatting was applied to the parent style.
public static final RevisionType MOVING
Represents a type when content was moved in the document.
public static RevisionType[] values()
Returns: com.groupdocs.comparison.words.revision.RevisionType[]
public static RevisionType valueOf(String name)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | java.lang.String |
Returns: RevisionType
public static RevisionType fromInt(int toIntValue)
Creates new constant of enum RevisionType using provided numeric value.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| toIntValue | int | The numeric representation of RevisionType |
Returns: RevisionType - RevisionType enum constant associated with numeric value
public static RevisionType fromString(String toStringValue)
Parses string representation of RevisionType to get the enum constant.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| toStringValue | java.lang.String | The string representation of RevisionType |
Returns: RevisionType - RevisionType enum constant associated with input string
public int toInt()
Numeric representation of RevisionType.
Returns: int - numeric value of enum constant
public String toString()
String representation of RevisionType.
Returns: java.lang.String - string value of enum constant
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.