com.groupdocs.comparison.words.revision

Class RevisionHandler

    • Constructor Detail

      • RevisionHandler

        public RevisionHandler(com.aspose.words.Document document)
        Instantiates a new Revision handler.
        Parameters:
        document - the document
      • RevisionHandler

        public RevisionHandler(InputStream file)
        Initializes new instance of RevisionHandler class with a file stream with revisions.
        Parameters:
        file - Source document stream
      • RevisionHandler

        public RevisionHandler(Path filePath)
        Initializes new instance of RevisionHandler class with the path to the file with revisions.
        Parameters:
        filePath - File path
      • RevisionHandler

        public RevisionHandler(String filePath)
        Initializes new instance of RevisionHandler class with the path to the file with revisions.
        Parameters:
        filePath - File path
    • Method Detail

      • applyRevisionChanges

        public void applyRevisionChanges(ApplyRevisionOptions changes)
        Processes changes in revisions and applies them to the same file from which the revisions were taken.
        Parameters:
        changes - List of changed revisions
      • applyRevisionChanges

        public void applyRevisionChanges(OutputStream document,
                                         ApplyRevisionOptions changes)
        Processes changes in revisions and the result is written to the document stream.
        Parameters:
        document - Result document
        changes - List of changed revisions
      • applyRevisionChanges

        public void applyRevisionChanges(Path filePath,
                                         ApplyRevisionOptions changes)
        Processes changes in revisions, and the result is written to the specified file by path.
        Parameters:
        filePath - Result file path
        changes - List of changed revisions
      • applyRevisionChanges

        public void applyRevisionChanges(String filePath,
                                         ApplyRevisionOptions changes)
        Processes changes in revisions, and the result is written to the specified file by path.
        Parameters:
        filePath - Result file path
        changes - List of changed revisions
      • getRevisions

        public List<RevisionInfo> getRevisions()
        Gets list of all revisions.

        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.

        Returns:
        the revisions