Interface ContentItemRevision


  • public interface ContentItemRevision
    Revisions allow users to restore content items to undo a save, by restoring previous revision.
    • Method Detail

      • getTitle

        String getTitle()
        Title of the revision (which is the title of the content item version before this revision was created)
        Returns:
        title of the revision
      • getRevisionNumber

        int getRevisionNumber()
        Index of the revision. First revision is 1.
        Returns:
        the index of this revision
      • getCreatedBy

        User getCreatedBy()
        The user who edited the content item. Author can be null if it is unknown, or when the user account has been deleted since the revision was created.
        Returns:
        the creator, or null
      • getCreationDate

        Date getCreationDate()
        The date and time when the change to the contentitem was made.
        Returns:
        creation date
      • getPublicationStatus

        PublicationStatus getPublicationStatus()
        The publication state of the item in this revision.
        Returns:
        PublicationStatus
      • getWorkflowStatus

        String getWorkflowStatus()
        The workflowstate name of the item in this revision.
        Returns:
        Workflowstate name
      • restoreTo

        void restoreTo​(MediaItemArticleVersion target)
                throws NoAuthorizationException
        Restores this revision. At least the title and elements are restored. If this revision is the last revision, this does not change the content. This operation also creates a new revision.
        Parameters:
        target - the target version to restore to
        Throws:
        NoAuthorizationException - when current user may not copy elements to the target
      • restoreTo

        void restoreTo​(PageVersion target)
                throws NoAuthorizationException
        Restores this revision. At least the title and elements are restored. If this revision is the last revision, this does not change the content. This operation also creates a new revision.
        Parameters:
        target - the target version to restore to
        Throws:
        NoAuthorizationException - when current user may not copy elements to the target
      • getElementHolder

        ElementHolder getElementHolder()
        The elements stored in this revisions.
        Returns:
        the elementholder containing the elements