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
_contentTypesEP
The content type extension pointprotected Set<TreeConfigurationElements>
_elements
The collection of elementsprotected String
_id
The extension idprotected String
_pluginName
The plugin nameprotected SourceResolver
_sourceResolver
The excalibur source resolverprotected String
_uiToolRole
The ui tool role
-
Constructor Summary
Constructors Constructor Description StaticTreeConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration initialConfiguration)
protected Collection<TreeConfigurationElementsChild>
getChildNodes(Configuration configuration)
Get the child nodesprotected TreeConfigurationContentType
getContentTypeInfo(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 treeString
getId()
Get the extension unique idString
getUIToolRole()
Get the tool role for the UI tool factoryvoid
service(ServiceManager manager)
void
setPluginInfo(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:TreeConfiguration
Get the extension unique id- Specified by:
getId
in interfaceTreeConfiguration
- Returns:
- The extension id
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
Description copied from interface:PluginAware
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.- Specified by:
setPluginInfo
in 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:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
public void configure(Configuration initialConfiguration) throws ConfigurationException
- Specified by:
configure
in 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:TreeConfiguration
Get the tool role for the UI tool factory- Specified by:
getUIToolRole
in interfaceTreeConfiguration
- Returns:
- The js role
-
getElements
public Set<TreeConfigurationElements> getElements()
Description copied from interface:TreeConfiguration
Get the elements to build the tree- Specified by:
getElements
in interfaceTreeConfiguration
- Returns:
- The elements. Can not be null.
-
-