Package com.atlassian.confluence.core
Class ContributionStatus
java.lang.Object
com.atlassian.confluence.core.ContributionStatus
A record of a recent contribution made by a user to a specific piece of content. A contribution can be either a
change to a never published draft ('draft'), an unpublished change on a page's draft ('unpublished') or a page
which does not contain any unpublished changes by the user ('current').
- Since:
- 6.4.0
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
DRAFT_STATUS
- See Also:
-
UNPUBLISHED_CHANGES_STATUS
- See Also:
-
CURRENT_STATUS
- See Also:
-
UNKNOWN_STATUS
- See Also:
-
-
Constructor Details
-
ContributionStatus
public ContributionStatus() -
ContributionStatus
-
-
Method Details
-
getContentId
public long getContentId()- Returns:
- Id of the content or draft, if unpublished.
-
getLatestVersionId
public long getLatestVersionId()- Returns:
- The latest published version of the content. If this is null, it means the content has never been published.
-
getRelationId
public long getRelationId()- Returns:
- The collaborator relation on the draft for the content. A non-null value here indicates the presence of contributions to the content by the current user. Null means that user hasn't made any contributions.
-
getContentStatus
- Returns:
- 'DRAFT' if the current user has unpublished contributions on the draft, otherwise the status of the latest version of the content (could be 'DRAFT' or 'CURRENT').
-
getLastModifiedDate
- Returns:
- The last date the user has contributed to the content, or the latest updated date of the content if the user hasn't made any contributions.
-
getStatus
DRAFT_STATUS: Indicates a draft which has never been published before, i.e. latestVersionId will be null, and contentStatus will be 'DRAFT'. UNPUBLISHED_CHANGES: A published version of the page exists. The current user has started making additional changes to the draft of the page, but has not published their changes. For this to be true the contentStatus should be 'DRAFT' since the current user has contributed to the shared draft, latestVersionId must be non-null because it needs to point to the published page version, and relationid is non-null to indicate that a contribution is present on the draft content. CURRENT: The content has been published before and there are no unpublished contributions by the user on the draft, i.e. the latest version of content has a contentStatus of 'CURRENT'.- Returns:
- one of
DRAFT_STATUS
,CURRENT_STATUS
,UNPUBLISHED_CHANGES_STATUS
,UNKNOWN_STATUS
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-