public class

Page

extends AbstractPage
implements Hierarchical<T>
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

Class Overview

Represents a Page within Confluence.

Summary

Constants
String CONTENT_TYPE
[Expand]
Inherited Constants
From class com.atlassian.confluence.core.ContentEntityObject
From class com.atlassian.confluence.core.AbstractVersionedEntityObject
Public Constructors
Page()
Public Methods
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()
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)
void setChildren(List<Page> children)
@Deprecated void setParent(Page parent)
This method is 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
[Expand]
Inherited Methods
From class com.atlassian.confluence.pages.AbstractPage
From class com.atlassian.confluence.core.SpaceContentEntityObject
From class com.atlassian.confluence.core.ContentEntityObject
From class com.atlassian.confluence.core.AbstractLabelableEntityObject
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.content.Content
From interface com.atlassian.confluence.core.Addressable
From interface com.atlassian.confluence.core.ContentTypeAware
From interface com.atlassian.confluence.core.HasLinkWikiMarkup
From interface com.atlassian.confluence.core.Hierarchical
From interface com.atlassian.confluence.core.Versioned
From interface com.atlassian.confluence.labels.EditableLabelable
From interface com.atlassian.confluence.labels.Labelable
From interface com.atlassian.confluence.spaces.Spaced
From interface java.lang.Comparable

Constants

public static final String CONTENT_TYPE

Constant Value: "page"

Public Constructors

public Page ()

Public Methods

public void addChild (Page child)

public void convertToHistoricalVersion ()

Remove all data from the object that does not need to be saved by historical versions. For versioned objects that are persisted, this includes removing associations with other persisted objects that may otherwise cause us to break the expected arity of the database relations.

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.

public List<Page> getAncestors ()

public List<Page> getChildren ()

public List<Page> getDescendents ()

public String getLinkWikiMarkup ()

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 Page getParent ()

public Integer getPosition ()

public List<Page> getSortedChildren ()

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 boolean hasChildren ()

public void incPosition ()

public boolean isHomePage ()

public 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

public boolean isRootLevel ()

public void remove (PageManager pageManager)

Sever any homepage

public void removeChild (Page child)

public void setAncestors (List<Page> ancestors)

public void setChildren (List<Page> children)

@Deprecated public void setParent (Page parent)

This method is 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.

public void setParentPage (Page parent)

Public setter that makes sure that the parent page is valid

Parameters
parent the page to set as this page's parent
Throws
IllegalArgumentException if the parent page is in a different space.

public void setPosition (Integer position)

public void setSpace (Space newSpace)

public void severParentChildRelationships ()

sever parent/child relationships

public void trash ()

places content in trash can