public class Draft extends ContentEntityObject
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTENT_TYPE |
static java.lang.String |
NEW
The content ID of a new piece of content, as a String.
|
static java.lang.Long |
NEW_CONTENT_ID
This is the placeholder id used in Drafts for new content.
|
CREATED, CURRENT, DELETED, MODIFIED
INITIAL_VERSION
Constructor and Description |
---|
Draft() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
ContentEntityObject |
getContentEntityObject() |
java.lang.String |
getContentSummary() |
java.lang.String |
getDraftSpaceKey() |
java.lang.String |
getDraftType() |
java.lang.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.
|
java.lang.String |
getPageId()
Gets the id of the
AbstractPage which this is a draft of, as a String. |
java.lang.Long |
getPageIdAsLong() |
int |
getPageVersion() |
java.lang.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.
|
java.lang.String |
getUrlPath() |
int |
hashCode() |
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(java.lang.String draftSpaceKey) |
void |
setDraftType(java.lang.String draftType) |
void |
setPageId(java.lang.Long pageId) |
void |
setPageId(java.lang.String pageId) |
void |
setPageVersion(int pageVersion) |
java.lang.String |
toString() |
addAttachment, addComment, addCustomContent, addOutgoingLink, addPermission, addReferralLink, addTrackbackLink, clone, compareTo, convertToHistoricalVersion, ensureAttachmentBelongsToContent, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getAttachmentUrlPath, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getComments, 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, setContent, 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, 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
public static final java.lang.String NEW
Long
form: NEW_CONTENT_ID
.public static final java.lang.Long NEW_CONTENT_ID
NEW
.public static final java.lang.String CONTENT_TYPE
public ContentEntityObject getContentEntityObject()
public boolean isNewPage()
public java.lang.String getType()
ContentEntityObject
getType
in interface ContentTypeAware
getType
in class ContentEntityObject
public java.lang.String getNameForComparison()
ContentEntityObject
getNameForComparison
in class ContentEntityObject
public java.lang.String getUrlPath()
getUrlPath
in interface Addressable
getUrlPath
in class ContentEntityObject
public void setPageVersion(int pageVersion)
public int getPageVersion()
public java.lang.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 java.lang.Long getPageIdAsLong()
public void setPageId(java.lang.String pageId)
public void setPageId(java.lang.Long pageId)
public java.lang.String getDraftType()
public void setDraftType(java.lang.String draftType)
public java.lang.String toString()
toString
in class ContentEntityObject
public boolean equals(java.lang.Object o)
equals
in class ContentEntityObject
public int hashCode()
hashCode
in class ContentEntityObject
public java.lang.String getDraftSpaceKey()
public void setDraftSpaceKey(java.lang.String draftSpaceKey)
public boolean isIndexable()
ContentEntityObject
isIndexable
in interface com.atlassian.bonnie.Searchable
isIndexable
in class ContentEntityObject
public boolean isBlank()
public java.lang.String getContentSummary()
Copyright © 2003-2014 Atlassian. All Rights Reserved.