|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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 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. |
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). |
List<Page> |
getChildren()
|
List<Page> |
getDescendents()
|
String |
getLinkWikiMarkup()
|
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()
|
Integer |
getPosition()
|
List<Page> |
getSortedChildren()
|
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(List<Page> ancestors)
This should only ever be set by Hibernate. |
void |
setChildren(List<Page> children)
|
void |
setParent(Page parent)
Deprecated. 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(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, 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 |
---|
getCreatorName, getLastModifierName, getRealClass, isPersistent, setCreatorName, 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 String CONTENT_TYPE
Constructor Detail |
---|
public Page()
Method Detail |
---|
public void setPosition(Integer position)
public void incPosition()
public 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
IllegalArgumentException
- if the parent page is in a different space.public List<Page> getChildren()
getChildren
in interface Hierarchical<Page>
public boolean hasChildren()
hasChildren
in interface Hierarchical<Page>
public List<Page> getSortedChildren()
public void setChildren(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 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 String getNameForComparison()
ContentEntityObject
getNameForComparison
in class SpaceContentEntityObject
public void severParentChildRelationships()
public void remove(PageManager pageManager)
remove
in class AbstractPage
public String getLinkWikiMarkup()
getLinkWikiMarkup
in interface HasLinkWikiMarkup
public void trash()
ContentEntityObject
trash
in class ContentEntityObject
public List<Page> getDescendents()
public 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(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 |