|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.riotfamily.pages.model.PageNode
public class PageNode
Class that represents a node in the website's sitemap. Each PageNode has
a set of pages
that hold localized data for a Site
.
The PageNode itself holds the data that all pages have in common.
Constructor Summary | |
---|---|
PageNode()
|
|
PageNode(Page page)
Convenience constructor that adds the given Page. |
Method Summary | |
---|---|
void |
addChildNode(PageNode node)
Adds a child node. |
void |
addPage(Page page)
Adds a localized page to the node. |
List<PageNode> |
getChildNodes()
Returns the child nodes. |
List<Page> |
getChildPages(Site site)
Returns an unmodifiable list of all child pages that are available in the given site. |
Collection<Page> |
getChildPagesWithFallback(Site site)
Returns an unmodifiable list of all child pages available in the given site or its master site . |
Long |
getId()
Returns the id of the PageNode. |
Page |
getPage(Site site)
Returns the localized page for the given site or null if no translation is available. |
Set<Page> |
getPages()
Returns the set of pages associated with this node. |
String |
getPageType()
Returns the page type. |
PageNode |
getParent()
Returns the parent node. |
boolean |
hasPages()
Returns whether the node has any pages. |
boolean |
isHidden()
Returns whether the page should be hidden in menus. |
boolean |
isSystemNode()
Returns whether the node is a system node. |
void |
removePage(Page page)
Removes the given page from the node. |
void |
setChildNodes(List<PageNode> childNodes)
|
void |
setHidden(boolean hidden)
|
void |
setId(Long id)
|
void |
setPages(Set<Page> pages)
|
void |
setPageType(String pageType)
|
protected void |
setParent(PageNode parent)
Sets the parent node. |
void |
setSystemNode(boolean systemNode)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PageNode()
public PageNode(Page page)
adds
the given Page.
Method Detail |
---|
public Long getId()
public void setId(Long id)
public PageNode getParent()
protected void setParent(PageNode parent)
addChildNode(PageNode)
method.
public Set<Page> getPages()
pages
associated with this node.
public void setPages(Set<Page> pages)
public void addChildNode(PageNode node)
public List<PageNode> getChildNodes()
public void setChildNodes(List<PageNode> childNodes)
public List<Page> getChildPages(Site site)
public Collection<Page> getChildPagesWithFallback(Site site)
master site
. This method is used
by the PageRiotDao to list all pages are already localized or can be
translated.
public Page getPage(Site site)
public void addPage(Page page)
IllegalArgumentException
- If the given page is null or
the page is not associated with a site or
another page with the same site is already presentpublic void removePage(Page page)
public boolean hasPages()
public String getPageType()
public void setPageType(String pageType)
public boolean isHidden()
public void setHidden(boolean hidden)
public boolean isSystemNode()
public void setSystemNode(boolean systemNode)
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |