Class Sitemap
- java.lang.Object
-
- org.ametys.plugins.repository.AbstractAmetysObject
-
- org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
-
- org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<SitemapFactory>
-
- org.ametys.web.repository.sitemap.Sitemap
-
- All Implemented Interfaces:
ACLAmetysObject
,AmetysObject
,DataAwareAmetysObject
,ModelLessDataAwareAmetysObject
,ModifiableModelLessDataAwareAmetysObject
,DataHolder
,ModelLessDataHolder
,ModifiableDataHolder
,ModifiableModelLessDataHolder
,JCRAmetysObject
,JCRTraversableAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableACLAmetysObject
,ModifiableAmetysObject
,ModifiableTraversableAmetysObject
,RemovableAmetysObject
,TraversableAmetysObject
,MetadataAwarePagesContainer
,PagesContainer
,SiteAwareAmetysObject
public final class Sitemap extends DefaultTraversableAmetysObject<SitemapFactory> implements ModifiableModelLessDataAwareAmetysObject, MetadataAwarePagesContainer
Sitemap of a web site. A sitemap is a hierarchical view of the site. It is composed byPage
s A single web site may have many sitemaps.
-
-
Constructor Summary
Constructors Constructor Description Sitemap(Node node, String parentPath, SitemapFactory factory)
Creates aSitemap
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Page
getChildPageAt(int index)
Gets the childPage
at the given positionAmetysObjectIterable<? extends Page>
getChildrenPages()
Retrieves child pages.AmetysObjectIterable<? extends Page>
getChildrenPages(boolean includeInvisiblePage)
Retrieves child pages.ModifiableModelLessDataHolder
getDataHolder()
Returns theDataHolder
of thisAmetysObject
.ModifiableCompositeMetadata
getMetadataHolder()
Returns the rootCompositeMetadata
of thisAmetysObject
.String
getPathInSitemap()
Computes the path relative to the current sitemap.Site
getSite()
Returns this object's site.Sitemap
getSitemap()
Retrieves the sitemap containing the current sitemap.String
getSitemapName()
Returns this page's sitemap nameString
getSiteName()
Returns this object's site name.-
Methods inherited from class org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, disallowInheritance, getChild, getChildren, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasChild, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
-
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
-
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToSAX, dataToSAX, getDataNames, getRepositoryData
-
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToSAX, getComposite, getParentDataHolder, getRootDataHolder, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, hasValueOrEmpty, isMultiple
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToSAX, hasValue, hasValueOrEmpty
-
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelLessDataAwareAmetysObject
getComposite, getComposite, getParentDataHolder, getRepositoryData, getRootDataHolder, removeValue, setValue, setValue, synchronizeValues
-
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
-
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChild, getChildAt, getChildPosition, getChildren, hasChild
-
-
-
-
Field Detail
-
NODE_TYPE
public static final String NODE_TYPE
Sitemap node type name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Sitemap
public Sitemap(Node node, String parentPath, SitemapFactory factory)
Creates aSitemap
.- Parameters:
node
- the node backing thisAmetysObject
.parentPath
- the parent path in the Ametys hierarchy.factory
- theSitemapFactory
which creates the AmetysObject.
-
-
Method Detail
-
getPathInSitemap
public String getPathInSitemap() throws AmetysRepositoryException
Description copied from interface:PagesContainer
Computes the path relative to the current sitemap.- Specified by:
getPathInSitemap
in interfacePagesContainer
- Returns:
- the path relative to the current sitemap.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getChildrenPages
public AmetysObjectIterable<? extends Page> getChildrenPages() throws AmetysRepositoryException
Description copied from interface:PagesContainer
Retrieves child pages.- Specified by:
getChildrenPages
in interfacePagesContainer
- Returns:
- the child pages.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getChildrenPages
public AmetysObjectIterable<? extends Page> getChildrenPages(boolean includeInvisiblePage) throws AmetysRepositoryException
Description copied from interface:PagesContainer
Retrieves child pages.- Specified by:
getChildrenPages
in interfacePagesContainer
- Parameters:
includeInvisiblePage
- true to include invisible pages- Returns:
- the child pages.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getChildPageAt
public Page getChildPageAt(int index) throws UnknownAmetysObjectException, AmetysRepositoryException
Description copied from interface:PagesContainer
Gets the childPage
at the given position- Specified by:
getChildPageAt
in interfacePagesContainer
- Parameters:
index
- the position of thePage
within the ordered set of its sibling objects.- Returns:
- the
Page
if found - Throws:
UnknownAmetysObjectException
- if no child page was found at this positionAmetysRepositoryException
- if an error occurs
-
getSite
public Site getSite() throws AmetysRepositoryException
Description copied from interface:SiteAwareAmetysObject
Returns this object's site.- Specified by:
getSite
in interfaceSiteAwareAmetysObject
- Returns:
- this object's site
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSiteName
public String getSiteName() throws AmetysRepositoryException
Description copied from interface:SiteAwareAmetysObject
Returns this object's site name.- Specified by:
getSiteName
in interfaceSiteAwareAmetysObject
- Returns:
- this object's site name.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSitemap
public Sitemap getSitemap() throws AmetysRepositoryException
Description copied from interface:PagesContainer
Retrieves the sitemap containing the current sitemap.- Specified by:
getSitemap
in interfacePagesContainer
- Returns:
- the sitemap containing the current sitemap.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSitemapName
public String getSitemapName() throws AmetysRepositoryException
Description copied from interface:PagesContainer
Returns this page's sitemap name- Specified by:
getSitemapName
in interfacePagesContainer
- Returns:
- this page's sitemap name
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDataHolder
public ModifiableModelLessDataHolder getDataHolder()
Description copied from interface:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Specified by:
getDataHolder
in interfaceDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelLessDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelLessDataAwareAmetysObject
- Returns:
- the
DataHolder
of thisAmetysObject
-
getMetadataHolder
public ModifiableCompositeMetadata getMetadataHolder()
Description copied from class:SimpleAmetysObject
Returns the rootCompositeMetadata
of thisAmetysObject
.- Specified by:
getMetadataHolder
in interfaceMetadataAwareAmetysObject
- Specified by:
getMetadataHolder
in interfaceModifiableMetadataAwareAmetysObject
- Overrides:
getMetadataHolder
in classSimpleAmetysObject<SitemapFactory>
- Returns:
- the root
CompositeMetadata
of thisAmetysObject
-
-