public class Draft extends ContentEntityObject
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.
|
static Long |
NEW_CONTENT_ID
This is the placeholder id used in Drafts for new content.
|
static String |
SHARE_ID |
CREATED, CURRENT, DELETED, MODIFIED
INITIAL_VERSION
Constructor and Description |
---|
Draft() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getContentSummary() |
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 |
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) |
boolean |
isBlank() |
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.
|
void |
setDraftSpaceKey(String draftSpaceKey) |
void |
setDraftType(String draftType) |
void |
setPageId(Long pageId) |
void |
setPageId(String pageId) |
void |
setPageVersion(int pageVersion) |
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, getDefaultBodyType, getDisplayTitle, getEntity, getExcerpt, getIdAsString, getLatestVersionsOfAttachments, getOutgoingLinks, getPermissions, getProperties, getReferralLinks, getRenderedVersionComment, getSearchableDependants, 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, setContentStatus, setOutgoingLinks, setReferralLinks, setTitle, setTrackbackLinks, setUserAccessor, setVersionComment, toPageContext, trash, trashDependents
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, isFavourite, removeLabelling, setLabellings
getLatestVersion, getOriginalVersion, getVersion, getVersionChildPolicy, isLatestVersion, isNew, setOriginalVersion, 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
@ExperimentalApi public static final String SHARE_ID
public static final Long NEW_CONTENT_ID
NEW
.public static final String NEW
Long
form: NEW_CONTENT_ID
.public static final String CONTENT_TYPE
public String getContentSummary()
public boolean isAuthor(com.atlassian.user.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
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 String toString()
toString
in class ContentEntityObject
public boolean equals(Object o)
equals
in class ContentEntityObject
public int hashCode()
hashCode
in class ContentEntityObject
Copyright © 2003–2015 Atlassian. All rights reserved.