Package org.ametys.plugins.contentstree
Class StaticTreeConfiguration
- java.lang.Object
-
- org.ametys.plugins.contentstree.StaticTreeConfiguration
-
- All Implemented Interfaces:
TreeConfiguration,PluginAware,Configurable,Serviceable
public class StaticTreeConfiguration extends Object implements TreeConfiguration, Configurable, Serviceable, PluginAware
Static implementation based on configuration. See doc for template.
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypeExtensionPoint_contentTypesEPThe content type extension pointprotected Set<TreeConfigurationElements>_elementsThe collection of elementsprotected String_idThe extension idprotected String_pluginNameThe plugin nameprotected SourceResolver_sourceResolverThe excalibur source resolverprotected String_uiToolRoleThe ui tool role
-
Constructor Summary
Constructors Constructor Description StaticTreeConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configuration initialConfiguration)protected Collection<TreeConfigurationElementsChild>getChildNodes(Configuration configuration)Get the child nodesprotected TreeConfigurationContentTypegetContentTypeInfo(Configuration configuration, boolean defaultCanBeRoot, boolean defaultInherit, String defaultBusMessageType)Get the content info using a configurationprotected Collection<TreeConfigurationContentType>getContentTypesInfos(Configuration configuration)Get the contents infos using a configurationSet<TreeConfigurationElements>getElements()Get the elements to build the treeStringgetId()Get the extension unique idStringgetUIToolRole()Get the tool role for the UI tool factoryvoidservice(ServiceManager manager)voidsetPluginInfo(String pluginName, String featureName, String id)Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.
-
-
-
Field Detail
-
_uiToolRole
protected String _uiToolRole
The ui tool role
-
_elements
protected Set<TreeConfigurationElements> _elements
The collection of elements
-
_contentTypesEP
protected ContentTypeExtensionPoint _contentTypesEP
The content type extension point
-
_sourceResolver
protected SourceResolver _sourceResolver
The excalibur source resolver
-
_pluginName
protected String _pluginName
The plugin name
-
-
Constructor Detail
-
StaticTreeConfiguration
public StaticTreeConfiguration()
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:TreeConfigurationGet the extension unique id- Specified by:
getIdin interfaceTreeConfiguration- Returns:
- The extension id
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
public void configure(Configuration initialConfiguration) throws ConfigurationException
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
getChildNodes
protected Collection<TreeConfigurationElementsChild> getChildNodes(Configuration configuration) throws ConfigurationException
Get the child nodes- Parameters:
configuration- The configuration- Returns:
- the child nodes
- Throws:
ConfigurationException- if configuration is invalid
-
getContentTypesInfos
protected Collection<TreeConfigurationContentType> getContentTypesInfos(Configuration configuration) throws ConfigurationException
Get the contents infos using a configuration- Parameters:
configuration- the configuration- Returns:
- the contents infos using a configuration
- Throws:
ConfigurationException- if an error occurred
-
getContentTypeInfo
protected TreeConfigurationContentType getContentTypeInfo(Configuration configuration, boolean defaultCanBeRoot, boolean defaultInherit, String defaultBusMessageType) throws ConfigurationException
Get the content info using a configuration- Parameters:
configuration- The configurationdefaultCanBeRoot- default value for root propertydefaultInherit- default value for inherit propertydefaultBusMessageType- default type of message- Returns:
- the content info using a configuration
- Throws:
ConfigurationException- if the configuration is invalid
-
getUIToolRole
public String getUIToolRole()
Description copied from interface:TreeConfigurationGet the tool role for the UI tool factory- Specified by:
getUIToolRolein interfaceTreeConfiguration- Returns:
- The js role
-
getElements
public Set<TreeConfigurationElements> getElements()
Description copied from interface:TreeConfigurationGet the elements to build the tree- Specified by:
getElementsin interfaceTreeConfiguration- Returns:
- The elements. Can not be null.
-
-