Package com.atlassian.confluence.core
Class ContributionStatus
- java.lang.Object
-
- com.atlassian.confluence.core.ContributionStatus
-
public final class ContributionStatus extends Object
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
Fields Modifier and Type Field Description static String
CURRENT_STATUS
static String
DRAFT_STATUS
static String
UNKNOWN_STATUS
static String
UNPUBLISHED_CHANGES_STATUS
-
Constructor Summary
Constructors Constructor Description ContributionStatus()
ContributionStatus(Long contentId, Long latestVersionId, Long relationId, String contentStatus, Date lastModifiedDate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
long
getContentId()
String
getContentStatus()
Date
getLastModifiedDate()
long
getLatestVersionId()
long
getRelationId()
String
getStatus()
DRAFT_STATUS: Indicates a draft which has never been published before, i.e.int
hashCode()
String
toString()
-
-
-
Field Detail
-
DRAFT_STATUS
public static final String DRAFT_STATUS
- See Also:
- Constant Field Values
-
UNPUBLISHED_CHANGES_STATUS
public static final String UNPUBLISHED_CHANGES_STATUS
- See Also:
- Constant Field Values
-
CURRENT_STATUS
public static final String CURRENT_STATUS
- See Also:
- Constant Field Values
-
UNKNOWN_STATUS
public static final String UNKNOWN_STATUS
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public String 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
public Date 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
public String 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:
for a detailed explanation of the query.
-
-