public class StaticFileImportsClientSideElement extends AbstractLogEnabled implements ClientSideElement, Configurable, PluginAware, Serviceable
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected CurrentUserProvider |
_currentUserProvider
The current user provider
|
protected Map<String,List<String>> |
_dependencies
The dependencies, as an associ
|
protected String |
_featureName
The name of the feature that declared the element
|
protected String |
_id
The element id
|
protected String |
_pluginName
The name of the plugin that declared the element
|
protected RightManager |
_rightManager
The rights manager
|
protected Map<String,String> |
_rights
The right configured.
|
protected String |
_rightsMode
The righs mode to associate rights AND or OR
|
protected ClientSideElement.Script |
_script
The script configured
|
Constructor and Description |
---|
StaticFileImportsClientSideElement() |
Modifier and Type | Method and Description |
---|---|
protected Map<String,List<String>> |
_configureDependencies(Configuration configuration)
Configure the dependencies following the configuration
|
protected List<ClientSideElement.ScriptFile> |
_configureImports(Configuration configuration)
Configure the import part
|
protected Map<String,String> |
_configureRights(Configuration configuration)
Configure the right following the configuration
|
protected String |
_configureRightsMode(Configuration configuration)
Configure the mode to associate rights AND or OR
|
protected ClientSideElement.Script |
_configureScript(Configuration configuration)
Configure the script
|
void |
configure(Configuration configuration) |
Map<String,List<String>> |
getDependencies()
This method returns the list of dependencies, sorted by extension point.
|
String |
getId()
Get the id of the element.
|
String |
getPluginName()
Get the plugin name where the control was declared
|
Map<String,String> |
getRights(Map<String,Object> contextParameters)
This method return the right that will be needed on client side.
|
List<ClientSideElement.Script> |
getScripts(boolean ignoreRights,
Map<String,Object> contextParameters)
This method return the scripts that will be used on client side.
|
List<ClientSideElement.Script> |
getScripts(Map<String,Object> contextParameters)
This method return the scripts that will be used on client side.
|
protected boolean |
hasRight(Map<String,String> rights)
Determine following the right parameter if the user has right to access this feature
|
void |
service(ServiceManager smanager) |
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. |
String |
toString() |
getLogger, setLogger
protected CurrentUserProvider _currentUserProvider
protected RightManager _rightManager
protected ClientSideElement.Script _script
protected String _rightsMode
protected Map<String,List<String>> _dependencies
protected String _pluginName
protected String _featureName
public StaticFileImportsClientSideElement()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
ServiceException
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAware
setPluginInfo
in interface PluginAware
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this componentpublic void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
protected ClientSideElement.Script _configureScript(Configuration configuration) throws ConfigurationException
configuration
- the global configurationConfigurationException
- The configuration is incorrectprotected List<ClientSideElement.ScriptFile> _configureImports(Configuration configuration) throws ConfigurationException
configuration
- The imports configurationConfigurationException
- If an error occursprotected Map<String,String> _configureRights(Configuration configuration) throws ConfigurationException
configuration
- The root configurationConfigurationException
- if a right element is present but emptyprotected String _configureRightsMode(Configuration configuration) throws ConfigurationException
configuration
- The configuration of rights mode.ConfigurationException
- The configuration is incorrectprotected Map<String,List<String>> _configureDependencies(Configuration configuration) throws ConfigurationException
configuration
- The root configurationConfigurationException
- if a dependency element is present but emptyprotected boolean hasRight(Map<String,String> rights)
rights
- The rights (name, context) to check. Can be empty.public final List<ClientSideElement.Script> getScripts(Map<String,Object> contextParameters)
ClientSideElement
getScripts
in interface ClientSideElement
contextParameters
- Contextuals parameters transmitted by the environment.public List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String,Object> contextParameters)
ClientSideElement
getScripts
in interface ClientSideElement
ignoreRights
- True to ignore the rights verification.contextParameters
- Contextuals parameters transmitted by the environment.public Map<String,String> getRights(Map<String,Object> contextParameters)
ClientSideElement
getRights
in interface ClientSideElement
contextParameters
- Contextuals parameters transmitted by the environment.public String getPluginName()
ClientSideElement
getPluginName
in interface ClientSideElement
public String getId()
ClientSideElement
getId
in interface ClientSideElement
public Map<String,List<String>> getDependencies()
ClientSideElement
getDependencies
in interface ClientSideElement