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 byPages 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 PagegetChildPageAt(int index)Gets the childPageat the given positionAmetysObjectIterable<? extends Page>getChildrenPages()Retrieves child pages.AmetysObjectIterable<? extends Page>getChildrenPages(boolean includeInvisiblePage)Retrieves child pages.ModifiableModelLessDataHoldergetDataHolder()Returns theDataHolderof thisAmetysObject.ModifiableCompositeMetadatagetMetadataHolder()Returns the rootCompositeMetadataof thisAmetysObject.StringgetPathInSitemap()Computes the path relative to the current sitemap.SitegetSite()Returns this object's site.SitemapgetSitemap()Retrieves the sitemap containing the current sitemap.StringgetSitemapName()Returns this page's sitemap nameStringgetSiteName()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- theSitemapFactorywhich creates the AmetysObject.
-
-
Method Detail
-
getPathInSitemap
public String getPathInSitemap() throws AmetysRepositoryException
Description copied from interface:PagesContainerComputes the path relative to the current sitemap.- Specified by:
getPathInSitemapin 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:PagesContainerRetrieves child pages.- Specified by:
getChildrenPagesin 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:PagesContainerRetrieves child pages.- Specified by:
getChildrenPagesin 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:PagesContainerGets the childPageat the given position- Specified by:
getChildPageAtin interfacePagesContainer- Parameters:
index- the position of thePagewithin the ordered set of its sibling objects.- Returns:
- the
Pageif 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:SiteAwareAmetysObjectReturns this object's site.- Specified by:
getSitein interfaceSiteAwareAmetysObject- Returns:
- this object's site
- Throws:
AmetysRepositoryException- if an error occurs.
-
getSiteName
public String getSiteName() throws AmetysRepositoryException
Description copied from interface:SiteAwareAmetysObjectReturns this object's site name.- Specified by:
getSiteNamein interfaceSiteAwareAmetysObject- Returns:
- this object's site name.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getSitemap
public Sitemap getSitemap() throws AmetysRepositoryException
Description copied from interface:PagesContainerRetrieves the sitemap containing the current sitemap.- Specified by:
getSitemapin interfacePagesContainer- Returns:
- the sitemap containing the current sitemap.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getSitemapName
public String getSitemapName() throws AmetysRepositoryException
Description copied from interface:PagesContainerReturns this page's sitemap name- Specified by:
getSitemapNamein interfacePagesContainer- Returns:
- this page's sitemap name
- Throws:
AmetysRepositoryException- if an error occurs.
-
getDataHolder
public ModifiableModelLessDataHolder getDataHolder()
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelLessDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelLessDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-
getMetadataHolder
public ModifiableCompositeMetadata getMetadataHolder()
Description copied from class:SimpleAmetysObjectReturns the rootCompositeMetadataof thisAmetysObject.- Specified by:
getMetadataHolderin interfaceMetadataAwareAmetysObject- Specified by:
getMetadataHolderin interfaceModifiableMetadataAwareAmetysObject- Overrides:
getMetadataHolderin classSimpleAmetysObject<SitemapFactory>- Returns:
- the root
CompositeMetadataof thisAmetysObject
-
-