com.atlassian.confluence.pages
Class Draft
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.confluence.core.ConfluenceEntityObject
com.atlassian.confluence.core.AbstractVersionedEntityObject
com.atlassian.confluence.core.ContentEntityObject
com.atlassian.confluence.pages.Draft
- All Implemented Interfaces:
- com.atlassian.bonnie.Searchable, Addressable, ContentTypeAware, Versioned, Labelable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
public class Draft
- extends ContentEntityObject
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
CONTENT_TYPE
|
static java.lang.String |
NEW
The content ID of a new piece of content, as a String. |
Constructor Summary |
Draft()
|
Method Summary |
boolean |
equals(java.lang.Object o)
|
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()
|
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.String pageId)
|
void |
setPageVersion(int pageVersion)
|
java.lang.String |
toString()
|
Methods inherited from class com.atlassian.confluence.core.ContentEntityObject |
addAttachment, addComment, addLabelling, addOutgoingLink, addPermission, addReferralLink, addTrackbackLink, clone, compareTo, convertToHistoricalVersion, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getBodyContents, getComments, getContent, getContentPermission, getContentPermissionSet, getContentStatus, getDisplayTitle, getExcerpt, getGlobalLabels, getIdAsString, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getLatestVersionsOfAttachments, getOutgoingLinks, getPermissions, getPersonalLabels, getReferralLinks, getRenderedVersionComment, getSearchableDependants, getTitle, getTrackbackLinks, getUserAccessor, getVersionComment, getVisibleLabels, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isFavourite, isRecentlyUpdatedFor, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeLabelling, removeOutgoingLink, removeReferralLink, removeTrackbackLink, setAttachments, setBodyContents, setComments, setContent, setContentStatus, setOutgoingLinks, setReferralLinks, setTitle, setTrackbackLinks, setUserAccessor, setVersionComment, toPageContext, trash |
Methods inherited from class com.atlassian.core.bean.EntityObject |
getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.atlassian.bonnie.Searchable |
getId |
Methods inherited from interface com.atlassian.confluence.core.Addressable |
getId |
NEW
public static final java.lang.String NEW
- The content ID of a new piece of content, as a String.
- See Also:
- Constant Field Values
CONTENT_TYPE
public static final java.lang.String CONTENT_TYPE
- See Also:
- Constant Field Values
Draft
public Draft()
isNewPage
public boolean isNewPage()
- Returns true if the draft is for a new piece of content, otherwise false.
getType
public java.lang.String getType()
- Description copied from class:
ContentEntityObject
- An easy name for the type of this content: makes it easy for
things like the #contentLink macro to work out what to draw.
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.
- Specified by:
getType
in interface ContentTypeAware
- Specified by:
getType
in class ContentEntityObject
- Returns:
- the content type
getNameForComparison
public java.lang.String getNameForComparison()
- Description copied from class:
ContentEntityObject
- 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.
- Specified by:
getNameForComparison
in class ContentEntityObject
getUrlPath
public java.lang.String getUrlPath()
- Specified by:
getUrlPath
in interface Addressable
- Specified by:
getUrlPath
in class ContentEntityObject
setPageVersion
public void setPageVersion(int pageVersion)
getPageVersion
public int getPageVersion()
getPageId
public java.lang.String getPageId()
setPageId
public void setPageId(java.lang.String pageId)
getDraftType
public java.lang.String getDraftType()
setDraftType
public void setDraftType(java.lang.String draftType)
toString
public java.lang.String toString()
- Overrides:
toString
in class ContentEntityObject
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class ContentEntityObject
hashCode
public int hashCode()
- Overrides:
hashCode
in class ContentEntityObject
getDraftSpaceKey
public java.lang.String getDraftSpaceKey()
setDraftSpaceKey
public void setDraftSpaceKey(java.lang.String draftSpaceKey)
isIndexable
public boolean isIndexable()
- Description copied from class:
ContentEntityObject
- Content entity objects that are historical versions should not be indexed.
- Specified by:
isIndexable
in interface com.atlassian.bonnie.Searchable
- Overrides:
isIndexable
in class ContentEntityObject
isBlank
public boolean isBlank()
- Returns:
- true if this draft has a title and content that is null or emtpy string
Copyright © 2003-2010 Atlassian. All Rights Reserved.