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
Modifier and TypeFieldDescriptionprotected ContentTypeExtensionPoint
The content type extension pointprotected Set<TreeConfigurationElements>
The collection of elementsprotected String
The extension idprotected String
The plugin nameprotected SourceResolver
The excalibur source resolverprotected String
The ui tool role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration initialConfiguration) protected Collection<TreeConfigurationElementsChild>
getChildNodes
(Configuration configuration) Get the child nodesprotected TreeConfigurationContentType
getContentTypeInfo
(Configuration configuration, boolean defaultCanBeRoot, boolean defaultAutoExpandToIt, boolean defaultInherit, String defaultBusMessageType) Get the content info using a configurationprotected Collection<TreeConfigurationContentType>
getContentTypesInfos
(Configuration configuration) Get the contents infos using a configurationGet the elements to build the treegetId()
Get the extension unique idGet 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 Details
-
_uiToolRole
The ui tool role -
_elements
The collection of elements -
_contentTypesEP
The content type extension point -
_sourceResolver
The excalibur source resolver -
_pluginName
The plugin name -
_id
The extension id
-
-
Constructor Details
-
StaticTreeConfiguration
public StaticTreeConfiguration()
-
-
Method Details
-
getId
Description copied from interface:TreeConfiguration
Get the extension unique id- Specified by:
getId
in interfaceTreeConfiguration
- Returns:
- The extension id
-
setPluginInfo
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
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- 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 defaultAutoExpandToIt, boolean defaultInherit, String defaultBusMessageType) throws ConfigurationException Get the content info using a configuration- Parameters:
configuration
- The configurationdefaultCanBeRoot
- default value for root propertydefaultAutoExpandToIt
- default value for autoExpandToIt 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
Description copied from interface:TreeConfiguration
Get the tool role for the UI tool factory- Specified by:
getUIToolRole
in interfaceTreeConfiguration
- Returns:
- The js role
-
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.
-