|
|||||||||
| Home >> All >> com >> RuntimeCollective >> sitemap >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.RuntimeCollective.sitemap.bean
Class SiteNode

java.lang.Objectcom.RuntimeCollective.permission.bean.SimplePermissible
com.RuntimeCollective.sitemap.bean.SimplePublishable
com.RuntimeCollective.sitemap.bean.SimpleSiteLocation
com.RuntimeCollective.sitemap.bean.ContentSiteLocation
com.RuntimeCollective.sitemap.bean.SiteNode
- All Implemented Interfaces:
- com.RuntimeCollective.content.bean.Content, com.RuntimeCollective.webapps.bean.Duplicable, com.RuntimeCollective.webapps.bean.EntityBean, com.RuntimeCollective.permission.bean.Permissible, com.RuntimeCollective.webapps.bean.PermissionBean, Publishable, com.RuntimeCollective.search.bean.Searchable, java.io.Serializable, SiteLocation, com.RuntimeCollective.webapps.bean.Versioned
- public class SiteNode
- extends ContentSiteLocation
The SiteNode version of the ContentSiteLocation, which can have a parent and children SiteNodes.
The SiteNode hierarchy was designed with the principle of "the sub node doesn't *do* things to its parent": setting a Child in a SiteNode also sets the Child's ParentNode, NOT the opposite
If you want to be spared the hassle of writing JSPs to create/edit your SiteNode objects, do have a look at the pages written for the Sussex Enterprise project. You can find them by checking out the relevent project: "cvs co rsework", then look in rsework/web/admin.
The pages are called addPageXXX.jsp and editPageXXX.jsp. Both call the relevent edit-template. There are also addLinkXXX.jsp pages for associating Links to SiteNodes (ContentSiteLocations in fact). The rsework/struts-config.xml file is also worth checking, for the action mappings etc.
And while you're at it, why not vanilla the pages and copy them to sitemap/web/admin ...
You can also check the Sussex Enterprise staging server (ask Fabrice, JoeH or Sophie).
- Version:
- $Id: SiteNode.java,v 1.73 2003/10/15 13:25:39 miles Exp $
| Field Summary | |
protected boolean |
AppearInNavbar
Whether the nodes should appear in the navbar. |
protected int[] |
ChildrenNodeIds
The ChildrenNodes |
protected int |
ColourScheme
The ColourScheme |
static java.lang.String |
DATABASE_TABLE
The name of the database table for this bean type. |
static java.lang.String |
DATABASE_TABLE_FLAT
The name of the flattened database table for this bean type. |
private static java.lang.String |
EMPTY_STRING
|
static java.lang.String |
ID_INDEXING_END
Separator used when indexing ids, eg not to confuse "23" with "123". |
static java.lang.String |
ID_INDEXING_START
Separator used when indexing ids, eg not to confuse "23" with "123". |
private static java.lang.String |
INDENT_PREFIX
The prefix used when indenting the title of this node. |
protected int |
ParentNodeId
The Parent |
protected java.lang.String |
SectionName
The SectionName |
protected java.lang.String |
SectionStrapline
The SectionStrapline |
static java.lang.String |
SHOW_SUBSECTIONS_AS_HOMEPAGE_IN_BREADCRUMB_KEY
The runtime parameter for showing subsections as home pages. |
protected boolean |
ShowLinksToChildrenNodes
Whether we show links to the ChildrenNodes. |
private static java.lang.Boolean |
showSubsectionsAsHomepageInBreadcrumbBoolean
|
static java.lang.String |
USE_FLAT_PARAM
The parameters which says whether we are using the flat table or not |
| Fields inherited from class com.RuntimeCollective.sitemap.bean.ContentSiteLocation |
ArraySize, Author_id, CreationDate, DOTDOTDOT, ExplanatoryTexts, HiddenFromSearch, LastModifiedDate, LastModifierUser_id, searchCategory, SITEMAP_CONTENT_MAP, SubContentIds, Title, TitleLength, USE_NAME_FOR_SEARCH_PARAM, VersionReference, Versions, VersionTag |
| Fields inherited from class com.RuntimeCollective.sitemap.bean.SimpleSiteLocation |
Name, OfInterest, TheTemplateId, WebURLStub |
| Fields inherited from class com.RuntimeCollective.sitemap.bean.SimplePublishable |
AlwaysLive, AND_STATUS, ESC, GoDeadDate, GoLiveDate, IsNew, NeedApproval, ORDER_BY_LAST_MOD_DATE, SELECT_ID_FROM, Status, StatusLastModifiedDate, WHERE_ALWAYS_LIVE |
| Fields inherited from class com.RuntimeCollective.permission.bean.SimplePermissible |
DATABASE_PRULEMAP_TABLE, id, PermissionRuleIds |
| Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean |
INTERFACE_BEAN, NULL_ID |
| Fields inherited from interface com.RuntimeCollective.webapps.bean.Versioned |
ARCHIVED_TAG, LIVE_TAG, TRUNK_TAG |
| Fields inherited from interface com.RuntimeCollective.sitemap.bean.Publishable |
STATUS_APPROVED, STATUS_ARCHIVED, STATUS_EDITED, STATUS_TO_BE_APPROVED |
| Fields inherited from interface com.RuntimeCollective.permission.bean.Permissible |
EDIT_ACTION, VIEW_ACTION |
| Constructor Summary | |
SiteNode()
Construct a new blank SiteNode, giving it a new unique ID. |
|
SiteNode(int id)
Get a current SiteNode from the RuntimeDataSource, given an id. |
|
| Method Summary | |
void |
addChildNode(SiteNode childNode)
Add a ChildNode to this SiteNode, at the current max position + 1 |
void |
delete()
Delete this bean from the database. |
void |
deleteFlat()
Delete this bean from the database flat table. |
void |
deleteFromFamily()
Delete this bean from its family. |
boolean |
getAppearInNavbar()
Get whether the nodes should appear in the navbar. |
java.lang.String |
getBreadcrumb()
Get the whole breadcrumb to get to this SiteNode (in plain text). |
java.lang.String |
getBreadcrumb(boolean asLinks,
boolean addHomePageText,
boolean showHiddenNodes,
java.lang.String styleClass)
Get the whole breadcrumb to get to this SiteNode, either as plain text or as links. |
java.lang.String |
getBreadcrumbForChild(boolean asLinks,
boolean showHiddenNodes,
java.lang.String styleClass)
Get the whole breadcrumb stub up to this SiteLocation (in plain text or html links), so that it can be used by children to build their breadcrumbs. |
SiteNode |
getChildNode(int position)
Get one ChildNode from this SiteNode (from its Trunk version, if there is one). |
SiteNode |
getChildNode(int position,
boolean thisVersion)
Get one ChildNode from this SiteNode, using its Trunk version or not. |
java.util.Iterator |
getChildrenNodes()
Get all the non-archived ChildrenNodes for this SiteNode (from its Trunk version, if there is one). |
java.util.Iterator |
getChildrenNodes(boolean includeArchived)
Get all the ChildrenNodes for this SiteNode, with or without the archived ones (from its Trunk version, if there is one), |
java.util.Iterator |
getChildrenNodes(boolean includeArchived,
boolean thisVersion,
java.lang.String childVersion)
Get all the ChildrenNodes for this SiteNode, with or without the archived ones (from its Trunk version, if there is one). |
java.util.List |
getChildrenNodesAsList()
|
int |
getChildrenNodesLength()
|
java.lang.String |
getColourCode()
Get the ColourCode |
java.lang.String |
getColourCodeOfScheme(int colourScheme)
Get the ColourCode of a ColourScheme |
int |
getColourScheme()
Get the ColourScheme |
int |
getDepthInSitemap()
Get the depth of this SiteNode in the Sitemap, using the Trunk version of the SiteNode. |
int |
getDepthInSitemap(boolean useTrunk)
Get the depth of this SiteNode in the Sitemap, using or not the trunk version. |
java.util.Collection |
getFields()
Get a Collection of Strings, for every Field that can be searched for on this object. |
static java.util.Iterator |
getFirstLayerNodes()
Get all non-archived First Layer Nodes |
static java.util.Iterator |
getFirstLayerNodes(boolean includeArchived)
Get all First Layer Nodes, with/without archived ones |
static java.util.Iterator |
getFirstLayerNodes(boolean includeArchived,
boolean onlyNavbar)
Get all First Layer Nodes, with/without archived ones, optionally navbar-viewable only |
static SiteNode |
getFirstRootNode()
Get the first Root Node (the one with the smallest id) |
static SiteNode |
getHomePage()
Gets the home page SiteNode. |
java.lang.String |
getIndentedTitle()
Get the title of this site node, indented according to its depth in the site map. |
java.util.Iterator |
getIndexedChildrenNodes()
Get all the non-archived ChildrenNodes for this SiteNode (from its Trunk version, if there is one), with their positions |
java.util.Iterator |
getIndexedChildrenNodes(boolean includeArchived)
Get all the ChildrenNodes for this SiteNode (from its Trunk version, if there is one), with their positions, with or without the archived ones |
java.util.Iterator |
getIndexedChildrenNodes(boolean includeArchived,
boolean thisVersion)
Get all the ChildrenNodes for this SiteNode, with their positions, with or without the archived ones, using its Trunk version or not. |
java.util.List |
getLiveChildren()
The simplest method to use for rendering the Node: gives a list of all live children, in their "live" versions if possible (the "trunk" version may be live). |
int[] |
getLiveHierarchyIdsArray(int minSize)
Get an array of the ids of the live versions of the parents of this node, from the root, down to the node itself. |
java.util.Iterator |
getLiveVersionChildrenNodes()
Get all the non-archived ChildrenNodes for this SiteNode (from its Trunk version, if there is one), returning the live version of the child nodes, if possible |
java.util.Iterator |
getLiveVersionSortedChildrenNodes()
Get all the non-archived ChildrenNodes for this SiteNode (from the live version, if possible) in ascending creation-date order. |
static java.util.Iterator |
getNavbarNodes()
Get all non-archived First Layer Nodes that appear in the navbar |
int |
getNoPagesToPublish()
Get the number of pages which are ready to be published under this SiteNode, (eg this node and its children, grand-children, etc) by calling the Objects. |
static java.util.HashMap |
getNoPagesToPublishPerSection(int sectionDepth)
Count, for each SiteNode of a given depth, the number of pages ready to be approved/published, ommitting the SiteNodes which don't have any. |
SiteNode |
getParentNode()
Get the ParentNode of this object, in its TRUNK Version if it exists. |
SiteNode |
getParentNode(boolean thisVersion)
Get the ParentNode of this object, either this current Version, or possibly its Trunk version. |
java.lang.Integer |
getPositionInParent(boolean includeArchived)
Get the position of this node within its parent. |
java.util.ArrayList |
getRawChildrenNodeIds(boolean thisVersion,
boolean sorted)
Get the list of ids of the children, using this version of the SiteNode, or its trunk counterpart. |
protected java.util.ArrayList |
getRawChildrenNodes(boolean includeArchived,
boolean thisVersion,
java.lang.String childVersion)
Actually does the work of getting the children nodes. |
static java.util.Iterator |
getRootNodes()
Get all non-archived Root Nodes |
static java.util.Iterator |
getRootNodes(boolean includeArchived)
Get all Root Nodes, with/without archived ones |
java.lang.String |
getSearchText()
Get all text for this object that will be searched on. |
static java.util.Iterator |
getSecondLayerNodes()
Get all non-archived Second Layer Nodes |
static java.util.Iterator |
getSecondLayerNodes(boolean includeArchived)
Get all Second Layer Nodes, with/without archived ones |
java.lang.String |
getSectionName()
Get the SectionName |
java.lang.String |
getSectionStrapline()
Get the SectionStrapline |
boolean |
getShowLinksToChildrenNodes()
Get the ShowLinksToChildrenNodes. |
java.util.Iterator |
getSortedChildrenNodes()
Get all the non-archived ChildrenNodes for this SiteNode (from its Trunk version, if there is one), in descending creation-date order. |
java.util.Iterator |
getSortedChildrenNodes(boolean includeArchived)
Get all ChildrenNodes for this SiteNode (from its Trunk version, if there is one), in ascending creation-date order. |
java.util.Iterator |
getSortedChildrenNodes(boolean includeArchived,
boolean ascendingOrder)
Get all ChildrenNodes for this SiteNode (from its Trunk version, if there is one), in the specified creation-date order. |
java.util.Iterator |
getSortedChildrenNodes(boolean includeArchived,
java.util.Comparator comparator)
Get all ChildrenNodes for this SiteNode, ordered by the given Comparator, using its Trunk version. |
java.util.Iterator |
getSortedChildrenNodes(boolean includeArchived,
java.util.Comparator comparator,
boolean thisVersion,
java.lang.String childVersion)
Get all ChildrenNodes for this SiteNode, ordered by the given Comparator, using its Trunk version or not. |
SiteNode |
getSubsection()
Get the Subsection in which this node is, that is its SubSubTop parent. |
java.lang.String |
getSubsectionId()
Get the SubsectionId of this node's, if any, using the separators. |
java.lang.String |
getSubsectionName()
Get the Name of the subsection this Node is in, or EMPTY_STRING if it's not in a subsection. |
SiteNode |
getSubTopParent()
Get the SubTop parent of this Node (ie the parent which doesn't have a grandparent), using the Trunk version of the SiteNode. |
SiteNode |
getTopParent()
Get the Top parent of this Node (ie the parent which doesn't have a parent), using the Trunk version of the SiteNode. |
boolean |
hasLiveChild()
Whether this node has a live Child. |
void |
insertChildNode(int position,
SiteNode childNode)
Insert a Child into this SiteNode. |
boolean |
isFirstLayer()
Whether this SiteNode is in the first layer of the sitemap. |
boolean |
isRoot()
Whether this SiteNode is a root. |
boolean |
isSecondLayer()
Whether this SiteNode is in the second layer of the sitemap. |
void |
loadChildrenNodes(java.lang.String loadTableName,
int id)
Load the children nodes. |
void |
loadFlat(int id)
Get a current SiteNode from the flat table. |
void |
makeArchived(java.util.Date date,
com.RuntimeCollective.webapps.bean.User user)
Make a node archived: set its status, last modified date and user, and save it. |
com.RuntimeCollective.webapps.bean.Duplicable |
makeDuplicate(int duplicateId)
The SiteNode version of this method will make a Duplicate with NO parent and NO children. |
void |
markAsArchived()
Set whether the object has been archived. |
protected void |
markAsArchivedSuperAndSave()
Call the super definition of markAsArchived, and save the node. |
void |
removeChildNode(SiteNode childNode)
Remove a ChildNode from this SiteNode (all its positions, if more than one) |
boolean |
removeFromSearchIndex()
Remove this sitenode, and all its versions, from the search index. |
void |
removeFromSite(com.RuntimeCollective.webapps.bean.User byWhom)
This method completely removes a SiteNode from the Website. |
void |
save()
Save this bean to the database. |
void |
saveArchivedData()
Special save method which only saves the necessary data when archiving the publishable. |
void |
saveChildren(java.lang.String saveTableName)
Save the children information. |
void |
saveFlat()
Save this bean to the flat database table. |
void |
setAppearInNavbar(boolean bool)
Set whether the nodes should appear in the navbar. |
void |
setChildNode(int position,
SiteNode childNode)
Set one ChildNode in this SiteNode. |
void |
setColourScheme(int colourScheme)
Set the ColourScheme |
void |
setParentNode(SiteNode parentNode)
Set the ParentNodeId |
void |
setSectionName(java.lang.String sectionName)
Set the SectionName |
void |
setSectionStrapline(java.lang.String sectionStrapline)
Set the SectionStrapline |
void |
setShowLinksToChildrenNodes(boolean bool)
Set the ShowLinksToChildrenNodes. |
static boolean |
showSubsectionsAsHomepageInBreadcrumb()
Whether to append "Home Page" for subsections in the Breadcrumb, taken from the "SHOW_SUBSECTIONS_AS_HOMEPAGE_IN_BREADCRUMB_KEY". |
| Methods inherited from class com.RuntimeCollective.sitemap.bean.SimpleSiteLocation |
deleteLinks, getLinkOpenTag, getName, getOfInterest, getTheTemplate, getURL, getWebURLStub, isOfInterest, setName, setOfInterest, setTheTemplate, setWebURLStub |
| Methods inherited from class com.RuntimeCollective.sitemap.bean.SimplePublishable |
checkStillApproved, getAlwaysLive, getGoDeadDate, getGoLiveDate, getIsNew, getNeedApproval, getStatus, getStatusLastModifiedDate, getToBeApprovedPublishables, isAlwaysLive, isApproved, isArchived, isEdited, isNew, isToBeApproved, markAsApproved, markAsEdited, markAsToBeApproved, needsApproval, publish, setAlwaysLive, setGoDeadDate, setGoLiveDate, setIsNew, setNeedApproval, setStatus, setStatusLastModifiedDate |
| Methods inherited from class com.RuntimeCollective.permission.bean.SimplePermissible |
canEdit, canPerformAction, canView, getActionPermissionRule, getActions, getAuthorisationPathForAction, getAuthorisationPathForAction, getId, loadRules, removeActionPermissionRule, saveRules, setActionPermissionRule, setId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.RuntimeCollective.webapps.bean.EntityBean |
getId, setId |
| Methods inherited from interface com.RuntimeCollective.sitemap.bean.Publishable |
getAlwaysLive, getGoDeadDate, getGoLiveDate, getIsNew, getNeedApproval, getStatus, getStatusLastModifiedDate, isAlwaysLive, isApproved, isArchived, isEdited, isNew, isToBeApproved, markAsApproved, markAsEdited, markAsToBeApproved, needsApproval, publish, setAlwaysLive, setGoDeadDate, setGoLiveDate, setIsNew, setNeedApproval, setStatus, setStatusLastModifiedDate |
| Methods inherited from interface com.RuntimeCollective.permission.bean.Permissible |
canEdit, canPerformAction, canView, getActionPermissionRule, getActions, getAuthorisationPathForAction, getAuthorisationPathForAction, getId, setActionPermissionRule, setId |
| Field Detail |
DATABASE_TABLE
public static final java.lang.String DATABASE_TABLE
- The name of the database table for this bean type.
- See Also:
- Constant Field Values
DATABASE_TABLE_FLAT
public static final java.lang.String DATABASE_TABLE_FLAT
- The name of the flattened database table for this bean type.
- See Also:
- Constant Field Values
USE_FLAT_PARAM
public static java.lang.String USE_FLAT_PARAM
- The parameters which says whether we are using the flat table or not
SHOW_SUBSECTIONS_AS_HOMEPAGE_IN_BREADCRUMB_KEY
public static java.lang.String SHOW_SUBSECTIONS_AS_HOMEPAGE_IN_BREADCRUMB_KEY
- The runtime parameter for showing subsections as home pages.
ID_INDEXING_START
public static java.lang.String ID_INDEXING_START
- Separator used when indexing ids, eg not to confuse "23" with "123".
ID_INDEXING_END
public static java.lang.String ID_INDEXING_END
- Separator used when indexing ids, eg not to confuse "23" with "123".
ParentNodeId
protected int ParentNodeId
- The Parent
ChildrenNodeIds
protected int[] ChildrenNodeIds
- The ChildrenNodes
AppearInNavbar
protected boolean AppearInNavbar
- Whether the nodes should appear in the navbar.
ShowLinksToChildrenNodes
protected boolean ShowLinksToChildrenNodes
- Whether we show links to the ChildrenNodes.
INDENT_PREFIX
private static final java.lang.String INDENT_PREFIX
- The prefix used when indenting the title of this node.
- See Also:
- Constant Field Values
EMPTY_STRING
private static java.lang.String EMPTY_STRING
SectionName
protected java.lang.String SectionName
- The SectionName
SectionStrapline
protected java.lang.String SectionStrapline
- The SectionStrapline
ColourScheme
protected int ColourScheme
- The ColourScheme
showSubsectionsAsHomepageInBreadcrumbBoolean
private static java.lang.Boolean showSubsectionsAsHomepageInBreadcrumbBoolean
| Constructor Detail |
SiteNode
public SiteNode()
throws java.sql.SQLException
- Construct a new blank SiteNode, giving it a new unique ID.
SiteNode
public SiteNode(int id)
throws java.sql.SQLException
- Get a current SiteNode from the RuntimeDataSource, given an id.
| Method Detail |
save
public void save()
- Save this bean to the database.
- Specified by:
savein interfacecom.RuntimeCollective.webapps.bean.EntityBean- Overrides:
savein classContentSiteLocation
saveFlat
public void saveFlat()
- Save this bean to the flat database table.
saveChildren
public void saveChildren(java.lang.String saveTableName) throws java.sql.SQLException
- Save the children information.
saveArchivedData
public void saveArchivedData()
- Special save method which only saves the necessary data when archiving the publishable.
This supposes the object has been already saved.
The saved data is : Status, StatusLastModifiedDate, LastModifiedDate, LastModifierUser.
- Specified by:
saveArchivedDatain interfacePublishable- Overrides:
saveArchivedDatain classContentSiteLocation
delete
public void delete()
- Delete this bean from the database.
- Specified by:
deletein interfacecom.RuntimeCollective.webapps.bean.EntityBean- Overrides:
deletein classContentSiteLocation
deleteFlat
public void deleteFlat()
- Delete this bean from the database flat table.
deleteFromFamily
public void deleteFromFamily()
- Delete this bean from its family.
markAsArchived
public void markAsArchived()
- Set whether the object has been archived.
If set to archived, this will set the children nodes as archived
- Specified by:
markAsArchivedin interfacePublishable- Overrides:
markAsArchivedin classSimpleSiteLocation
markAsArchivedSuperAndSave
protected void markAsArchivedSuperAndSave()
- Call the super definition of markAsArchived, and save the node.
removeFromSite
public void removeFromSite(com.RuntimeCollective.webapps.bean.User byWhom)
- This method completely removes a SiteNode from the Website.
That is, the Node is archived and removed from the SearchIndex,
as is its live version, as are its children.
setParentNode
public void setParentNode(SiteNode parentNode)
- Set the ParentNodeId
getParentNode
public SiteNode getParentNode()
- Get the ParentNode of this object, in its TRUNK Version if it exists.
getParentNode
public SiteNode getParentNode(boolean thisVersion)
Get the ParentNode of this object, either this current Version, or possibly its Trunk version.
If thisVersion is set to true, this method returns the ParentNode of this Version.
Otherwise, *and* if a Trunk version of this object exists, the method returns the Trunk version's ParentNode. If the Trunk version doesn't exist, it return the current version's ParentNode.
setChildNode
public void setChildNode(int position,
SiteNode childNode)
- Set one ChildNode in this SiteNode.
Attention !!! This will set the ParentNodeId of the ChildNode as well,
and it will "move" the ChildNode to this new position,
as a ChildNode can only be in 1 position at a time.
if there is already another child in that position, then it will be removed
insertChildNode
public void insertChildNode(int position,
SiteNode childNode)
- Insert a Child into this SiteNode.
Attention !!! This will set the ParentNodeId of the ChildNode as well,
and it will "move" the ChildNode to this new position,
as a ChildNode can only be in 1 position at a time.
If there is already another child in that position, then its position will be incremented recursively
getChildNode
public SiteNode getChildNode(int position)
- Get one ChildNode from this SiteNode (from its Trunk version, if there is one).
getChildNode
public SiteNode getChildNode(int position, boolean thisVersion)
- Get one ChildNode from this SiteNode, using its Trunk version or not.
If thisVersion is true, don't look into the Trunk version.
if thisVersion if false, try to look into the Trunk version for children nodes. If the Trunk version does not exist, then look in this version.
getIndexedChildrenNodes
public java.util.Iterator getIndexedChildrenNodes()
- Get all the non-archived ChildrenNodes for this SiteNode (from its Trunk version, if there is one), with their positions
getIndexedChildrenNodes
public java.util.Iterator getIndexedChildrenNodes(boolean includeArchived)
- Get all the ChildrenNodes for this SiteNode (from its Trunk version, if there is one), with their positions, with or without the archived ones
getIndexedChildrenNodes
public java.util.Iterator getIndexedChildrenNodes(boolean includeArchived, boolean thisVersion)
- Get all the ChildrenNodes for this SiteNode, with their positions, with or without the archived ones, using its Trunk version or not.
If thisVersion is true, don't look into the Trunk version.
if thisVersion if false, try to look into the Trunk version for children nodes. If the Trunk version does not exist, then look in this version.
getLiveVersionSortedChildrenNodes
public java.util.Iterator getLiveVersionSortedChildrenNodes()
- Get all the non-archived ChildrenNodes for this SiteNode (from the live version, if possible)
in ascending creation-date order.
getSortedChildrenNodes
public java.util.Iterator getSortedChildrenNodes()
- Get all the non-archived ChildrenNodes for this SiteNode (from its Trunk version, if there is one),
in descending creation-date order.
getSortedChildrenNodes
public java.util.Iterator getSortedChildrenNodes(boolean includeArchived)
- Get all ChildrenNodes for this SiteNode (from its Trunk version, if there is one),
in ascending creation-date order.
getSortedChildrenNodes
public java.util.Iterator getSortedChildrenNodes(boolean includeArchived, boolean ascendingOrder)
- Get all ChildrenNodes for this SiteNode (from its Trunk version, if there is one),
in the specified creation-date order.
getSortedChildrenNodes
public java.util.Iterator getSortedChildrenNodes(boolean includeArchived, java.util.Comparator comparator)
- Get all ChildrenNodes for this SiteNode, ordered by the given Comparator, using its Trunk version.
getSortedChildrenNodes
public java.util.Iterator getSortedChildrenNodes(boolean includeArchived, java.util.Comparator comparator, boolean thisVersion, java.lang.String childVersion)
- Get all ChildrenNodes for this SiteNode, ordered by the given Comparator, using its Trunk version or not.
If thisVersion is true, don't look into the Trunk version.
if thisVersion if false, try to look into the Trunk version for children nodes. If the Trunk version does not exist, then look in this version.
getLiveVersionChildrenNodes
public java.util.Iterator getLiveVersionChildrenNodes()
- Get all the non-archived ChildrenNodes for this SiteNode (from its Trunk version, if there is one),
returning the live version of the child nodes, if possible
getChildrenNodes
public java.util.Iterator getChildrenNodes()
- Get all the non-archived ChildrenNodes for this SiteNode (from its Trunk version, if there is one).
getChildrenNodesAsList
public java.util.List getChildrenNodesAsList()
getChildrenNodes
public java.util.Iterator getChildrenNodes(boolean includeArchived)
- Get all the ChildrenNodes for this SiteNode, with or without the archived ones (from its Trunk version, if there is one),
getChildrenNodes
public java.util.Iterator getChildrenNodes(boolean includeArchived, boolean thisVersion, java.lang.String childVersion)
- Get all the ChildrenNodes for this SiteNode, with or without the archived ones (from its Trunk version, if there is one).
If thisVersion is true, don't look into the Trunk version.
if thisVersion if false, try to look into the Trunk version for children nodes. If the Trunk version does not exist, then look in this version.
getChildrenNodesLength
public int getChildrenNodesLength()
getRawChildrenNodes
protected java.util.ArrayList getRawChildrenNodes(boolean includeArchived, boolean thisVersion, java.lang.String childVersion)
- Actually does the work of getting the children nodes.
getRawChildrenNodeIds
public java.util.ArrayList getRawChildrenNodeIds(boolean thisVersion, boolean sorted)
- Get the list of ids of the children, using this version of the SiteNode,
or its trunk counterpart.
removeChildNode
public void removeChildNode(SiteNode childNode)
- Remove a ChildNode from this SiteNode (all its positions, if more than one)
addChildNode
public void addChildNode(SiteNode childNode)
- Add a ChildNode to this SiteNode, at the current max position + 1
hasLiveChild
public boolean hasLiveChild()
- Whether this node has a live Child.
getLiveChildren
public java.util.List getLiveChildren()
- The simplest method to use for rendering the Node:
gives a list of all live children, in their "live"
versions if possible (the "trunk" version may be live).
setAppearInNavbar
public void setAppearInNavbar(boolean bool)
- Set whether the nodes should appear in the navbar.
getAppearInNavbar
public boolean getAppearInNavbar()
- Get whether the nodes should appear in the navbar.
setShowLinksToChildrenNodes
public void setShowLinksToChildrenNodes(boolean bool)
- Set the ShowLinksToChildrenNodes.
getShowLinksToChildrenNodes
public boolean getShowLinksToChildrenNodes()
- Get the ShowLinksToChildrenNodes.
getDepthInSitemap
public int getDepthInSitemap()
- Get the depth of this SiteNode in the Sitemap, using the Trunk version of the SiteNode.
getDepthInSitemap
public int getDepthInSitemap(boolean useTrunk)
- Get the depth of this SiteNode in the Sitemap, using or not the trunk version.
If useTrunk is false, use the SiteNode this object really refers to.
If useTrunk is true, use the trunk version of the SiteNode (if it exists, otherwise, the SiteNode itself).
isRoot
public boolean isRoot()
- Whether this SiteNode is a root.
isFirstLayer
public boolean isFirstLayer()
- Whether this SiteNode is in the first layer of the sitemap.
isSecondLayer
public boolean isSecondLayer()
- Whether this SiteNode is in the second layer of the sitemap.
getIndentedTitle
public java.lang.String getIndentedTitle()
- Get the title of this site node, indented according to its depth in the site map.
getTopParent
public SiteNode getTopParent()
- Get the Top parent of this Node (ie the parent which doesn't have a parent),
using the Trunk version of the SiteNode.
getSubTopParent
public SiteNode getSubTopParent()
- Get the SubTop parent of this Node
(ie the parent which doesn't have a grandparent),
using the Trunk version of the SiteNode.
getSubsection
public SiteNode getSubsection()
- Get the Subsection in which this node is,
that is its SubSubTop parent.
(ie the parent which doesn't have a grandgrandparent),
using the Trunk version of the SiteNode.
getSubsectionName
public java.lang.String getSubsectionName()
- Get the Name of the subsection this Node is in,
or EMPTY_STRING if it's not in a subsection.
getSubsectionId
public java.lang.String getSubsectionId()
- Get the SubsectionId of this node's, if any,
using the separators. This is for the search indexing.
getPositionInParent
public java.lang.Integer getPositionInParent(boolean includeArchived)
- Get the position of this node within its parent.
getLiveHierarchyIdsArray
public int[] getLiveHierarchyIdsArray(int minSize)
- Get an array of the ids of the live versions of the parents of this node, from the root, down to the node itself.
getFirstRootNode
public static SiteNode getFirstRootNode() throws java.sql.SQLException
- Get the first Root Node (the one with the smallest id)
getRootNodes
public static java.util.Iterator getRootNodes() throws java.sql.SQLException
- Get all non-archived Root Nodes
getRootNodes
public static java.util.Iterator getRootNodes(boolean includeArchived) throws java.sql.SQLException
- Get all Root Nodes, with/without archived ones
getNavbarNodes
public static java.util.Iterator getNavbarNodes() throws java.sql.SQLException
- Get all non-archived First Layer Nodes that appear in the navbar
getFirstLayerNodes
public static java.util.Iterator getFirstLayerNodes() throws java.sql.SQLException
- Get all non-archived First Layer Nodes
getFirstLayerNodes
public static java.util.Iterator getFirstLayerNodes(boolean includeArchived) throws java.sql.SQLException
- Get all First Layer Nodes, with/without archived ones
getFirstLayerNodes
public static java.util.Iterator getFirstLayerNodes(boolean includeArchived, boolean onlyNavbar) throws java.sql.SQLException
- Get all First Layer Nodes, with/without archived ones, optionally navbar-viewable only
getSecondLayerNodes
public static java.util.Iterator getSecondLayerNodes() throws java.sql.SQLException
- Get all non-archived Second Layer Nodes
getSecondLayerNodes
public static java.util.Iterator getSecondLayerNodes(boolean includeArchived) throws java.sql.SQLException
- Get all Second Layer Nodes, with/without archived ones
setSectionName
public void setSectionName(java.lang.String sectionName)
- Set the SectionName
getSectionName
public java.lang.String getSectionName()
- Get the SectionName
setSectionStrapline
public void setSectionStrapline(java.lang.String sectionStrapline)
- Set the SectionStrapline
getSectionStrapline
public java.lang.String getSectionStrapline()
- Get the SectionStrapline
setColourScheme
public void setColourScheme(int colourScheme)
- Set the ColourScheme
getColourScheme
public int getColourScheme()
- Get the ColourScheme
getColourCode
public java.lang.String getColourCode()
- Get the ColourCode
getColourCodeOfScheme
public java.lang.String getColourCodeOfScheme(int colourScheme)
- Get the ColourCode of a ColourScheme
getBreadcrumb
public java.lang.String getBreadcrumb()
- Get the whole breadcrumb to get to this SiteNode (in plain text).
Uses the default options:
- asLinks = false: don't display as links
- addHomePageText = true: add " Home Page" to the end of Home Pages
- showHiddenNodes = true: show SiteNodes that have "AppearInNavbar" set to false
- styleClass = null: don't use a CSS style class to display
- Specified by:
getBreadcrumbin interfaceSiteLocation- Overrides:
getBreadcrumbin classSimpleSiteLocation
getBreadcrumb
public java.lang.String getBreadcrumb(boolean asLinks, boolean addHomePageText, boolean showHiddenNodes, java.lang.String styleClass)
- Get the whole breadcrumb to get to this SiteNode, either as plain text
or as links.
-
<
JAVADOC