Package org.ametys.core.ui
Class StaticFileImportsClientSideElement
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
- All Implemented Interfaces:
- ClientSideElement,- LogEnabled,- PluginAware,- Configurable,- Serviceable
- Direct Known Subclasses:
- AbstractStaticODFTreeIndicator,- ChooseHierarchicalContentFileImportsClientSideElement,- StaticClientSideElement,- WorkflowStepsClientSideElement
public class StaticFileImportsClientSideElement
extends AbstractLogEnabled
implements ClientSideElement, Configurable, PluginAware, Serviceable
This implementation creates an element from a static configuration
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElementClientSideElement.Script, ClientSideElement.ScriptFile
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderThe current user providerThe dependencies, as an associprotected StringThe name of the feature that declared the elementprotected StringThe element idprotected StringThe name of the plugin that declared the elementprotected RightManagerThe rights managerThe right configured.protected StringThe righs mode to associate rights AND or ORprotected ClientSideElement.ScriptThe script configured
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription_configureDependencies(Configuration configuration) Configure the dependencies following the configurationprotected List<ClientSideElement.ScriptFile>_configureImports(Configuration configuration) Configure the import part_configureRights(Configuration configuration) Configure the right following the configurationprotected String_configureRightsMode(Configuration configuration) Configure the mode to associate rights AND or ORprotected ClientSideElement.Script_configureScript(Configuration configuration) Configure the scriptvoidconfigure(Configuration configuration) This method returns the list of dependencies, sorted by extension point.getId()Get the id of the element.Get the plugin name where the control was declaredThis method return the right that will be needed on client side.getScripts(boolean ignoreRights, Map<String, Object> contextParameters) This method return the scripts that will be used on client side.final List<ClientSideElement.Script>getScripts(Map<String, Object> contextParameters) This method return the scripts that will be used on client side.protected booleanDetermine following the right parameter if the user has right to access this featurevoidservice(ServiceManager smanager) 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.toString()Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabledgetLogger, setLogger
- 
Field Details- 
_currentUserProviderThe current user provider
- 
_rightManagerThe rights manager
- 
_idThe element id
- 
_scriptThe script configured
- 
_rightsThe right configured. Can be null
- 
_rightsModeThe righs mode to associate rights AND or OR
- 
_dependenciesThe dependencies, as an associ
- 
_pluginNameThe name of the plugin that declared the element
- 
_featureNameThe name of the feature that declared the element
 
- 
- 
Constructor Details- 
StaticFileImportsClientSideElementpublic StaticFileImportsClientSideElement()
 
- 
- 
Method Details- 
service- Specified by:
- servicein interface- Serviceable
- Throws:
- ServiceException
 
- 
setPluginInfoDescription 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 interface- PluginAware
- Parameters:
- pluginName- Unique identifier for the plugin hosting the extension
- featureName- Unique feature identifier (unique for a given pluginName)
- id- Unique identifier of this component
 
- 
configure- Specified by:
- configurein interface- Configurable
- Throws:
- ConfigurationException
 
- 
_configureScriptprotected ClientSideElement.Script _configureScript(Configuration configuration) throws ConfigurationException Configure the script- Parameters:
- configuration- the global configuration
- Returns:
- The script created
- Throws:
- ConfigurationException- The configuration is incorrect
 
- 
_configureImportsprotected List<ClientSideElement.ScriptFile> _configureImports(Configuration configuration) throws ConfigurationException Configure the import part- Parameters:
- configuration- The imports configuration
- Returns:
- The set of the complete url of imported file
- Throws:
- ConfigurationException- If an error occurs
 
- 
_configureRightsprotected Map<String,String> _configureRights(Configuration configuration) throws ConfigurationException Configure the right following the configuration- Parameters:
- configuration- The root configuration
- Returns:
- The right name or null.
- Throws:
- ConfigurationException- if a right element is present but empty
 
- 
_configureRightsModeConfigure the mode to associate rights AND or OR- Parameters:
- configuration- The configuration of rights mode.
- Returns:
- AND or OR (default value)
- Throws:
- ConfigurationException- The configuration is incorrect
 
- 
_configureDependenciesprotected Map<String,List<String>> _configureDependencies(Configuration configuration) throws ConfigurationException Configure the dependencies following the configuration- Parameters:
- configuration- The root configuration
- Returns:
- The list of dependencies, by extension point.
- Throws:
- ConfigurationException- if a dependency element is present but empty
 
- 
hasRightDetermine following the right parameter if the user has right to access this feature- Parameters:
- rights- The rights (name, context) to check. Can be empty.
- Returns:
- true if the user has the right or if there is not right and false otherwise
 
- 
getScriptsDescription copied from interface:ClientSideElementThis method return the scripts that will be used on client side. This class will be parametrized by initial and current parameters.- Specified by:
- getScriptsin interface- ClientSideElement
- Parameters:
- contextParameters- Contextuals parameters transmitted by the environment.
- Returns:
- The list of scripts or an empty list.
 
- 
getScriptspublic List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String, Object> contextParameters) Description copied from interface:ClientSideElementThis method return the scripts that will be used on client side. This class will be parametrized by initial and current parameters.- Specified by:
- getScriptsin interface- ClientSideElement
- Parameters:
- ignoreRights- True to ignore the rights verification.
- contextParameters- Contextuals parameters transmitted by the environment.
- Returns:
- The list of scripts or an empty list.
 
- 
getRightsDescription copied from interface:ClientSideElementThis method return the right that will be needed on client side. This class will be parametrized by initial and current parameters.- Specified by:
- getRightsin interface- ClientSideElement
- Parameters:
- contextParameters- Contextuals parameters transmitted by the environment.
- Returns:
- The rights in a Map of (rightId, context). Can be empty.
 
- 
getPluginNameDescription copied from interface:ClientSideElementGet the plugin name where the control was declared- Specified by:
- getPluginNamein interface- ClientSideElement
- Returns:
- The plugin name. Can not be null.
 
- 
getIdDescription copied from interface:ClientSideElementGet the id of the element.- Specified by:
- getIdin interface- ClientSideElement
- Returns:
- the id. Can not be null.
 
- 
getDependenciesDescription copied from interface:ClientSideElementThis method returns the list of dependencies, sorted by extension point.- Specified by:
- getDependenciesin interface- ClientSideElement
- Returns:
- a map of dependencies ids by extension point.
 
- 
toString
 
-