Class History

    • Method Detail

      • getLastUpdatedRef

        public Reference<Version> getLastUpdatedRef()
        Get information about the latest published non-draft version of the content.

        Special notes for drafts:

        • For drafts of existing published content, this shows the last published version, not the draft.
        • For drafts of new content (unpublished), this will be an empty reference, because there is no history yet.
        To see modification information for a draft, use expand=version.

        Returns:
        the latest published non-draft version, or an empty reference if this is an unpublished draft
      • getNextVersionRef

        public Reference<Version> getNextVersionRef()
        Get the next version, if this is not the newest version.

        Note draft content only has a single version, so will return an empty reference.

        Returns:
        the next version, or an empty reference if there is no next version or if draft
      • getPreviousVersionRef

        public Reference<Version> getPreviousVersionRef()
        Get the previous version, if this is not the oldest version.

        Note draft content only has a single version, so will return an empty reference.

        Returns:
        the previous version, or an empty reference if there is no previous version or if draft
      • isLatest

        public boolean isLatest()
        Is this the latest published (non-draft) version of the content?

        This method will always return false for draft content.

        Returns:
        true if this content is the highest version (hence it will have no nextVersion); false if not highest, or if draft
      • getCreatedBy

        public Person getCreatedBy()
        Get the original creator of the first published non-draft version of the content.

        Special notes for drafts:

        • For drafts of existing published content, this shows the original creator, not the draft editor.
        • For drafts of new content (unpublished), this will be null, because there is no history yet.
        To see the editor of a draft, use expand=version and see Version.getBy().

        Returns:
        the creator of the first published non-draft version, or null if this is an unpublished draft
      • getCreatedDate

        public org.joda.time.DateTime getCreatedDate()
        Get the original publish time of the first published non-draft version of the content.

        Special notes for drafts:

        • For drafts of existing published content, this shows the original publish time, not the draft modification time.
        • For drafts of new content (unpublished), this will be null, because there is no history yet.
        To see the modification time of a draft, use expand=version and see Version.getWhen().

        Returns:
        the publish time of the first published non-draft version, or null if this is an unpublished draft