public class Draft extends ContentEntityObject
See ContentEntityObject.DRAFT
to see how new drafts are defined.
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE |
static String |
NEW
The content ID of a new piece of content, as a String.
|
CREATED, CURRENT, DELETED, DRAFT, MODIFIED, SHARE_ID, SYNC_REV
INITIAL_VERSION
Constructor and Description |
---|
Draft() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getContentSummary()
Deprecated.
since 5.9 Use
ContentEntityObject.getExcerpt() |
String |
getDraftSpaceKey() |
String |
getDraftType() |
String |
getNameForComparison()
Subclasses should implement this method, giving a String back so
that the content can be alphabetically sorted in a mixed-type list
of content-entities.
|
String |
getPageId()
Gets the id of the
AbstractPage which this is a draft of, as a String. |
Long |
getPageIdAsLong() |
int |
getPageVersion() |
String |
getShareId() |
String |
getType()
An easy name for the type of this content: makes it easy for
things like the #contentLink macro to work out what to draw.
|
String |
getUrlPath() |
int |
hashCode() |
boolean |
isAuthor(com.atlassian.user.User user)
Deprecated.
|
boolean |
isBlank() |
boolean |
isDraft() |
boolean |
isIndexable()
Content entity objects that are historical versions should not be indexed.
|
boolean |
isNewPage()
Returns true if the draft is for a new piece of content, otherwise false.
|
boolean |
isUnpublished() |
void |
moveCustomContentTo(ContentEntityObject toTarget)
Moves all the custom content on this entity to the target entity
|
void |
setDraftSpaceKey(String draftSpaceKey) |
void |
setDraftType(String draftType) |
void |
setPageId(Long pageId) |
void |
setPageId(String pageId) |
void |
setPageVersion(int pageVersion) |
boolean |
sharedAccessAllowed(com.atlassian.user.User user)
Checks if this draft can be accessed by users other than the creator (shared access)
|
String |
toString() |
addAttachment, addComment, addCustomContent, addOutgoingLink, addPermission, addReferralLink, addTrackbackLink, applyChildVersioningPolicy, clone, compareTo, convertToHistoricalVersion, ensureAttachmentBelongsToContent, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getAttachmentUrlPath, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getComments, getContainerContent, getContentEntityObject, getContentId, getContentPermission, getContentPermissionSet, getContentStatus, getContentStatusObject, getDefaultBodyType, getDisplayTitle, getEntity, getExcerpt, getIdAsString, getLatestVersionId, getLatestVersionsOfAttachments, getLowerTitle, getOriginalVersionId, getOutgoingLinks, getPermissions, getProperties, getReferralLinks, getRenderedVersionComment, getSearchableDependants, getSelector, getTitle, getTrackbackLinks, getTypeEnum, getUserAccessor, getVersionComment, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isRecentlyUpdatedFor, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeCustomContent, removeOutgoingLink, removeReferralLink, removeTrackbackLink, replaceContentProperties, restore, restoreDependents, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setComments, setContainerContent, setContentPropertiesFrom, setContentStatus, setOriginalVersion, setOriginalVersionId, setOutgoingLinks, setReferralLinks, setTitle, setTrackbackLinks, setUserAccessor, setVersionComment, toPageContext, trash, trashDependents, wasCreatedBy
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, isFavourite, removeLabelling, setLabellings
getConfluenceRevision, getLatestVersion, getOriginalVersion, getVersion, getVersionChildPolicy, isLatestVersion, isNew, setVersion
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierName
getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
finalize, getClass, notify, notifyAll, wait, wait, wait
getId
getId, isPersistent
public static final String NEW
public static final String CONTENT_TYPE
public boolean isDraft()
isDraft
in class ContentEntityObject
public boolean sharedAccessAllowed(com.atlassian.user.User user)
All legacy drafts are private
sharedAccessAllowed
in class ContentEntityObject
user
- User to check access forContentEntityObject.sharedAccessAllowed(com.atlassian.user.User)
public String getShareId()
getShareId
in class ContentEntityObject
ContentEntityObject.SHARE_ID
public boolean isUnpublished()
isUnpublished
in class ContentEntityObject
@Deprecated public String getContentSummary()
ContentEntityObject.getExcerpt()
@Deprecated public boolean isAuthor(com.atlassian.user.User user)
ContentEntityObject.wasCreatedBy(com.atlassian.user.User)
public boolean isNewPage()
public boolean isIndexable()
ContentEntityObject
isIndexable
in interface com.atlassian.bonnie.Searchable
isIndexable
in class ContentEntityObject
public boolean isBlank()
public String getUrlPath()
getUrlPath
in interface Addressable
getUrlPath
in class ContentEntityObject
public String getNameForComparison()
ContentEntityObject
getNameForComparison
in class ContentEntityObject
public String getType()
ContentEntityObject
This is a bit of a hack, but it saves heaps of code elsewhere, especially since we tend to get back these objects wrapped in all sorts of Hibernate CGLIB stuff.
getType
in interface ContentTypeAware
getType
in class ContentEntityObject
public String getDraftSpaceKey()
public void setDraftSpaceKey(String draftSpaceKey)
public void setPageVersion(int pageVersion)
public int getPageVersion()
public String getPageId()
AbstractPage
which this is a draft of, as a String. Note that it's currently stored
as a String in the database, but the String always represents the id of a page, which is always representable as
a long.public Long getPageIdAsLong()
public void setPageId(String pageId)
public void setPageId(Long pageId)
public String getDraftType()
public void setDraftType(String draftType)
public void moveCustomContentTo(ContentEntityObject toTarget)
moveCustomContentTo
in class ContentEntityObject
toTarget
- the new container for all the custom content on this entitypublic String toString()
toString
in class ContentEntityObject
public boolean equals(Object o)
equals
in class ContentEntityObject
public int hashCode()
hashCode
in class ContentEntityObject
Copyright © 2003–2016 Atlassian. All rights reserved.