|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.core.bean.EntityObject com.atlassian.confluence.core.ConfluenceEntityObject com.atlassian.confluence.core.AbstractVersionedEntityObject com.atlassian.confluence.core.AbstractLabelableEntityObject com.atlassian.confluence.core.ContentEntityObject com.atlassian.confluence.core.SpaceContentEntityObject com.atlassian.confluence.pages.AbstractPage com.atlassian.confluence.pages.Page
public class Page
Represents a Page within Confluence.
Field Summary | |
---|---|
static java.lang.String |
CONTENT_TYPE
|
Fields inherited from class com.atlassian.confluence.core.ContentEntityObject |
---|
CREATED, CURRENT, DELETED, MODIFIED |
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject |
---|
INITIAL_VERSION |
Constructor Summary | |
---|---|
Page()
|
Method Summary | |
---|---|
void |
addChild(Page child)
|
void |
convertToHistoricalVersion()
Remove all data from the object that does not need to be saved by historical versions. |
java.util.List<Page> |
getAncestors()
Gets the list of ancestors of this page (its parents, and its parents parents, right up to the root level of the containing space). |
java.util.List<Page> |
getChildren()
|
java.util.List<Page> |
getDescendents()
|
java.lang.String |
getLinkWikiMarkup()
|
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. |
Page |
getParent()
|
java.lang.Integer |
getPosition()
|
java.util.List<Page> |
getSortedChildren()
|
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. |
boolean |
hasChildren()
|
void |
incPosition()
|
boolean |
isHomePage()
|
boolean |
isIndexable()
pages, blogs etc that aren't not associated with a space (either because they are historical or corrupt) should not be indexed if they are indexed, and returned in search results, they are broken and are therefore useless |
boolean |
isRootLevel()
|
void |
remove(PageManager pageManager)
Sever any homepage |
void |
removeChild(Page child)
|
void |
setAncestors(java.util.List<Page> ancestors)
This should only ever be set by Hibernate. |
void |
setChildren(java.util.List<Page> children)
|
void |
setParent(Page parent)
Deprecated. Since 1.1. Do not call this method. It exists solely for hibernate to use. Use #setParentPage instead. I would have made this method private, but CGLIB was complaining. |
void |
setParentPage(Page parent)
Public setter that makes sure that the parent page is valid |
void |
setPosition(java.lang.Integer position)
|
void |
setSpace(Space newSpace)
|
void |
severParentChildRelationships()
sever parent/child relationships |
void |
trash()
places content in trash can |
Methods inherited from class com.atlassian.confluence.pages.AbstractPage |
---|
getAttachmentsUrlPath, getAttachmentUrlPath, getContentEntityObject, getLatestVersion, getOriginalVersionPage, getPreviousVersion, getSearchableDependants, getTopLevelComments, getUrlPath, hasInvalidTitleCharacters, isValidPageTitle, isValidPageTitleCharacter, isValidTitleLength, setOriginalVersionPage, setTitle |
Methods inherited from class com.atlassian.confluence.core.SpaceContentEntityObject |
---|
addTrackbackLink, getSpace, getSpaceKey, hashCode, isInSpace |
Methods inherited from class com.atlassian.confluence.core.AbstractLabelableEntityObject |
---|
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, isFavourite, removeLabelling, setLabellings |
Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject |
---|
getOriginalVersion, getVersion, isLatestVersion, isNew, setOriginalVersion, setVersion |
Methods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject |
---|
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierName |
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 |
Methods inherited from interface com.atlassian.confluence.labels.EditableLabelable |
---|
getId, isPersistent |
Field Detail |
---|
public static final java.lang.String CONTENT_TYPE
Constructor Detail |
---|
public Page()
Method Detail |
---|
public void setPosition(java.lang.Integer position)
public void incPosition()
public java.lang.Integer getPosition()
public boolean isRootLevel()
isRootLevel
in interface Hierarchical<Page>
public Page getParent()
getParent
in interface Hierarchical<Page>
@Deprecated public void setParent(Page parent)
setParent
in interface Hierarchical<Page>
public void setParentPage(Page parent)
parent
- the page to set as this page's parent
java.lang.IllegalArgumentException
- if the parent page is in a different space.public java.util.List<Page> getChildren()
getChildren
in interface Hierarchical<Page>
public boolean hasChildren()
hasChildren
in interface Hierarchical<Page>
public java.util.List<Page> getSortedChildren()
public void setChildren(java.util.List<Page> children)
setChildren
in interface Hierarchical<Page>
public void addChild(Page child)
addChild
in interface Hierarchical<Page>
public void removeChild(Page child)
removeChild
in interface Hierarchical<Page>
public boolean isHomePage()
public java.lang.String getType()
ContentEntityObject
getType
in interface ContentTypeAware
getType
in class ContentEntityObject
public void convertToHistoricalVersion()
Versioned
When using Hibernate to persist versioned objects, take special care to null any field that might contain a Hibernate-persisted collection, as Hibernate does not allow two different persistent objects to refer to the same persisted collection at the same time.
convertToHistoricalVersion
in interface Versioned
convertToHistoricalVersion
in class AbstractPage
public java.lang.String getNameForComparison()
ContentEntityObject
getNameForComparison
in class SpaceContentEntityObject
public void severParentChildRelationships()
public void remove(PageManager pageManager)
remove
in class AbstractPage
public java.lang.String getLinkWikiMarkup()
getLinkWikiMarkup
in interface HasLinkWikiMarkup
public void trash()
ContentEntityObject
trash
in class ContentEntityObject
public java.util.List<Page> getDescendents()
public java.util.List<Page> getAncestors()
For strange historical reasons, this list is in the opposite order you would expect. The LAST element of the list will be this page's parent.
getAncestors
in interface Hierarchical<Page>
public void setAncestors(java.util.List<Page> ancestors)
public void setSpace(Space newSpace)
setSpace
in class SpaceContentEntityObject
public boolean isIndexable()
SpaceContentEntityObject
isIndexable
in interface com.atlassian.bonnie.Searchable
isIndexable
in class SpaceContentEntityObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |