public class

Draft

extends ContentEntityObject
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

Summary

Constants
String CONTENT_TYPE
String NEW The content ID of a new piece of content, as a String.
[Expand]
Inherited Constants
From class com.atlassian.confluence.core.ContentEntityObject
From class com.atlassian.confluence.core.AbstractVersionedEntityObject
Public Constructors
Draft()
Public Methods
boolean equals(Object o)
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()
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 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(String pageId)
void setPageVersion(int pageVersion)
String toString()
[Expand]
Inherited Methods
From class com.atlassian.confluence.core.ContentEntityObject
From class com.atlassian.confluence.core.AbstractVersionedEntityObject
From class com.atlassian.confluence.core.ConfluenceEntityObject
From class com.atlassian.core.bean.EntityObject
From class java.lang.Object
From interface com.atlassian.bonnie.Searchable
From interface com.atlassian.confluence.core.Addressable
From interface com.atlassian.confluence.core.ContentTypeAware
From interface com.atlassian.confluence.core.Versioned
From interface com.atlassian.confluence.labels.Labelable
From interface java.lang.Comparable

Constants

public static final String CONTENT_TYPE

Constant Value: "draft"

public static final String NEW

The content ID of a new piece of content, as a String.

Constant Value: "0"

Public Constructors

public Draft ()

Public Methods

public boolean equals (Object o)

public String getDraftSpaceKey ()

public String getDraftType ()

public 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.

public String getPageId ()

public int getPageVersion ()

public 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.

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.

public String getUrlPath ()

public int hashCode ()

public boolean isBlank ()

Returns
  • true if this draft has a title and content that is null or emtpy string

public boolean isIndexable ()

Content entity objects that are historical versions should not be indexed.

public boolean isNewPage ()

Returns true if the draft is for a new piece of content, otherwise false.

public void setDraftSpaceKey (String draftSpaceKey)

public void setDraftType (String draftType)

public void setPageId (String pageId)

public void setPageVersion (int pageVersion)

public String toString ()