public class RevisionHandler extends Object implements Closeable
Constructor and Description |
---|
RevisionHandler(com.aspose.words.Document document)
Instantiates a new Revision handler.
|
RevisionHandler(InputStream file)
Initializes new instance of
RevisionHandler class with a file stream with revisions. |
RevisionHandler(Path filePath)
Initializes new instance of
RevisionHandler class with the path to the file with revisions. |
RevisionHandler(String filePath)
Initializes new instance of
RevisionHandler class with the path to the file with revisions. |
Modifier and Type | Method and Description |
---|---|
void |
applyRevisionChanges(ApplyRevisionOptions changes)
Processes changes in revisions and applies them to the same file from which the revisions were taken.
|
void |
applyRevisionChanges(OutputStream document,
ApplyRevisionOptions changes)
Processes changes in revisions and the result is written to the document stream.
|
void |
applyRevisionChanges(Path filePath,
ApplyRevisionOptions changes)
Processes changes in revisions, and the result is written to the specified file by path.
|
void |
applyRevisionChanges(String filePath,
ApplyRevisionOptions changes)
Processes changes in revisions, and the result is written to the specified file by path.
|
void |
close()
Releases resources.
|
List<RevisionInfo> |
getRevisions()
Gets list of all revisions.
|
public RevisionHandler(com.aspose.words.Document document)
document
- the documentpublic RevisionHandler(InputStream file)
RevisionHandler
class with a file stream with revisions.file
- Source document streampublic RevisionHandler(Path filePath)
RevisionHandler
class with the path to the file with revisions.filePath
- File pathpublic RevisionHandler(String filePath)
RevisionHandler
class with the path to the file with revisions.filePath
- File pathpublic void applyRevisionChanges(ApplyRevisionOptions changes)
changes
- List of changed revisionspublic void applyRevisionChanges(OutputStream document, ApplyRevisionOptions changes)
document
- Result documentchanges
- List of changed revisionspublic void applyRevisionChanges(Path filePath, ApplyRevisionOptions changes)
filePath
- Result file pathchanges
- List of changed revisionspublic void applyRevisionChanges(String filePath, ApplyRevisionOptions changes)
filePath
- Result file pathchanges
- List of changed revisionspublic void close()
close
in interface Closeable
close
in interface AutoCloseable
public List<RevisionInfo> getRevisions()
Due to the fact that revisions were originally sorted in a group, revisions must be taken from RevisionCollections.
In RevisionCollections, a single revision can be split into multiple revisions with the same general text.
Since RevisionCollections may contain revisions with the same general text, this must be controlled when creating a list of revisions for the user.
This is controlled here using List<RevisionGroup
> groups.