Class History
java.lang.Object
com.atlassian.confluence.api.model.content.History
- All Implemented Interfaces:
NavigationAware
Contains the history of a piece of
Content
.
History refers to the published version of Content.
Be careful when using expand=history
when looking at content with status=draft
:
the information will refer to the published Content, if any.
See the javadoc on individual methods for more details, e.g. getCreatedAt()
, getLastUpdatedRef()
,
getNextVersionRef()
.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic History.HistoryBuilder
builder()
buildReference
(Reference<Content> contentParent) Get the original publish time of the first published non-draft version of the content.Get the original creator of the first published non-draft version of the content.Get information about the latest published non-draft version of the content.Get the next version, if this is not the newest version.getParentReference
(Reference<History> historyReference) Get the previous version, if this is not the oldest version.boolean
isLatest()
Is this the latest published (non-draft) version of the content?resolveNavigation
(NavigationService navigationService)
-
Method Details
-
builder
-
buildReference
-
getParentReference
-
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.
expand=version
.- Returns:
- the latest published non-draft version, or an empty reference if this is an unpublished draft
-
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
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
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.
expand=version
and seeVersion.getBy()
.- Returns:
- the creator of the first published non-draft version, or null if this is an unpublished draft
-
getCreatedAt
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.
expand=version
and seeVersion.getWhenAt()
.- Returns:
- the publish time of the first published non-draft version, or null if this is an unpublished draft
- Since:
- 8.6
-
getContributors
-
getContentParentRef
-