Package org.ametys.web.sitemap
Class DefaultSitemapIndicator
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.sitemap.AbstractStaticSitemapIndicator
org.ametys.web.sitemap.DefaultSitemapIndicator
- All Implemented Interfaces:
LogEnabled
,PluginAware
,Prioritizable
,SitemapTreeIndicator
,Configurable
,Contextualizable
,Serviceable
public class DefaultSitemapIndicator
extends AbstractStaticSitemapIndicator
implements Serviceable, Contextualizable
Default implementation of
SitemapTreeIndicator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The tag condition. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AmetysObjectResolver
The Ametys object resolverprotected RightManager
The right manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(String id, Configuration configuration, String defaultI18nCatalog, String iconPathPrefix) Configure sitemap indicatorvoid
contextualize
(Context context) Get metadataGet the metadata conditionThe page typeGet propertiesGet the metadata conditiongetTags()
The tagsThe tags conditionboolean
isLive()
Determines the live versionboolean
Determines the limited accessboolean
matches
(SitemapElement sitemapElement) Check if the sitemap element matches the indicator's conditionsstatic DefaultSitemapIndicator
newInstance
(String id, Configuration configuration, ServiceManager manager, Context context, String defaultI18nCatalog, String iconPathPrefix) Create a new instance ofDefaultSitemapIndicator
void
service
(ServiceManager manager) Methods inherited from class org.ametys.web.sitemap.AbstractStaticSitemapIndicator
configure, getIcon, getIconDecorator, getIconGlyph, getId, getLabel, getPriority, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_resolver
The Ametys object resolver -
_rightManager
The right manager
-
-
Constructor Details
-
DefaultSitemapIndicator
public DefaultSitemapIndicator()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
newInstance
public static DefaultSitemapIndicator newInstance(String id, Configuration configuration, ServiceManager manager, Context context, String defaultI18nCatalog, String iconPathPrefix) throws ServiceException, ConfigurationException, ContextException Create a new instance ofDefaultSitemapIndicator
- Parameters:
id
- the unique idconfiguration
- the configurationmanager
- the service managercontext
- the avalon contextdefaultI18nCatalog
- the default i18n catalogueiconPathPrefix
- the prefix path for icon- Returns:
- the sitemap indicator
- Throws:
ServiceException
- if an error occured while loading componentsConfigurationException
- if configuraion failedContextException
- if fail to initialize context
-
configure
public void configure(String id, Configuration configuration, String defaultI18nCatalog, String iconPathPrefix) throws ConfigurationException Description copied from class:AbstractStaticSitemapIndicator
Configure sitemap indicator- Overrides:
configure
in classAbstractStaticSitemapIndicator
- Parameters:
id
- the unique id. Can be null to get id from configurationconfiguration
- the configurationdefaultI18nCatalog
- the default i18n catalogueiconPathPrefix
- the prefix path for icon- Throws:
ConfigurationException
- if configuration is invalid
-
matches
Description copied from interface:SitemapTreeIndicator
Check if the sitemap element matches the indicator's conditions- Specified by:
matches
in interfaceSitemapTreeIndicator
- Parameters:
sitemapElement
- the sitemap element to check- Returns:
- true if the element matches the indicator
-
getMetadataCondition
Get the metadata condition- Returns:
- the metadata condition
-
getTagsCondition
The tags condition- Returns:
- The tags condition
-
getPropertiesCondition
Get the metadata condition- Returns:
- the metadata condition
-
getTags
The tags- Returns:
- The tags
-
getPageType
The page type- Returns:
- The page type
-
isLive
Determines the live version- Returns:
- true if this icon is for live version
-
isRestricted
Determines the limited access- Returns:
- true if this icon is for page with limited access
-
getMetadata
Get metadata- Returns:
- the metadata
-
getProperties
Get properties- Returns:
- the properties
-