Class HistorisedDocument

    • Method Detail

      • getVersionMaster

        public HistorisedDocument getVersionMaster()
        Description copied from class: SimpleDocument
        Returns the master of versioned document. If not versioned, it returns itself. If versioned, it returns the master of versioned document (the last created or updated in other words).
        Overrides:
        getVersionMaster in class SimpleDocument
        Returns:
        the master version of this document.
      • isVersioned

        public boolean isVersioned()
        Description copied from interface: Attachment
        Is this attachment versioned? A document is versioned if each change is historized and comes to a new minor or major version.
        Specified by:
        isVersioned in interface Attachment
        Overrides:
        isVersioned in class SimpleDocument
        Returns:
        true if this attachment is versioned, false otherwise.
      • getHistory

        public List<SimpleDocumentVersion> getHistory()
        Gets the technical history of the document versions (as they are stored in the JCR). In the JCR, for a versioned item, each change drives to a new version, whatever the change is a technical one (for example, disable the download of the document) or a functional one (the content has been modified). This method returns the whole history of versions of the document.
        Returns:
        the all the versions committed for this document.
      • getVersionIdentifiedBy

        public SimpleDocumentVersion getVersionIdentifiedBy​(String id)
        Gets from the history the version identified by the given identifier.
        Parameters:
        id - the identifier of the searched version.
        Returns:
        the version of the simple document which the identifier is the one specified, null otherwise.
      • getFunctionalHistory

        public List<SimpleDocumentVersion> getFunctionalHistory()
        Gets the functional history based on the versions and the indexes of this document. The returned versions refer each of them the result of modification of its content.
        Returns:
        the different functional versions of this document.
      • getLastPublicVersion

        public SimpleDocument getLastPublicVersion()
        Returns the more recent public version of this document - null if none exists.
        Overrides:
        getLastPublicVersion in class SimpleDocument
        Returns:
        the more recent public version of this document - null if none exists.