public class WorkflowStepsClientSideElement extends StaticFileImportsClientSideElement implements MenuClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected ContentHelper |
_contentHelper
The content helper
|
protected ThreadSafeComponentManager<ClientSideElement> |
_menuItemManager
The client side element component manager for menu items.
|
protected Map<String,List<ClientSideElement>> |
_menuItems
The menu items
|
protected List<ClientSideElement> |
_referencedClientSideElement
The referenced client side element
|
protected AmetysObjectResolver |
_resolver
Ametys object resolver
|
protected List<ClientSideElement.Script> |
_scripts
The scripts
|
protected ServiceManager |
_smanager
The service manager
|
protected Map<String,List<String>> |
_unresolvedMenuItems
The unresolved items
|
protected UserManager |
_userManager
Runtime users manager
|
protected WorkflowHelper |
_workflowHelper
Workflow helper
|
protected WorkflowProvider |
_workflowProvider
Workflow provider
|
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
WorkflowStepsClientSideElement() |
Modifier and Type | Method and Description |
---|---|
protected void |
_additionalMenuItemConfiguration(Configuration itemConf,
DefaultConfiguration classConf,
int actionId,
Map<String,Object> parameters)
Additional configuration for menu items
|
protected void |
_configureDefaultDescriptions(Map<String,Object> parameters)
Configure the default description
|
protected void |
_configureMenuItems(ClientSideElement.Script script,
Configuration configuration)
Configure the menu items
|
protected void |
_configureParameters(Map<String,Object> parameters)
Configure parameters recursively
|
protected ClientSideElement.Script |
_configureScript(Configuration configuration)
Configure the script
|
protected void |
_configureScripts(Configuration workflowConfiguration,
List<Integer> stepIds,
Map<Integer,Configuration> stepsConfiguration,
List<Integer> allowedActionIds,
com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor)
Configure the list of Scripts, for each step available to the workflow.
|
protected void |
_configureWorkflow(Configuration configuration)
Read the workflow configuration, to set up the scripts.
|
protected void |
_configureWorkflowStep(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor,
Integer stepId,
Map<String,Object> stepParameters,
Configuration stepConfiguration,
List<Integer> allowedActionIds)
Configure the parameters specific to the workflow, for the given step
|
protected List<Integer> |
_configureWorkflowStepActions(String workflowName,
Integer stepId,
List<Integer> currentStepActions,
List<Integer> allowedStepActions,
Configuration stepActionsConfiguration)
Get the list of actions available for a step, from the configuration
|
protected List<Integer> |
_getAllowedActions(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor,
List<Integer> stepIds,
boolean actionsIncludeMode,
List<Integer> configuredActions)
Get the actions allowed for the current workflow and only for the specified steps.
|
protected List<Integer> |
_getAllowedSteps(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor,
boolean stepsIncludeMode,
List<Integer> configuredSteps)
Get the steps allowed for the current workflow
|
private Map<String,Object> |
_getContentParameters(Content content,
WorkflowProvider.AmetysObjectWorkflow workflow,
ClientSideElement.Script script,
long wId) |
protected String |
_getDefaultActionClassName()
Get the default class name for workflow action
|
protected String |
_getDefaultMenuClassName()
Get the default class name for workflow menu
|
protected String |
_getDefaultPluginName()
Get the default plugin name
|
protected String |
_getSelectionTargetId()
Get the selection target id (can be a Regexp)
|
private void |
_resolveMenuItems() |
void |
configure(Configuration configuration) |
List<ClientSideElement> |
getReferencedClientSideElements()
This method returns the
ClientSideElement referenced by the menu through its menu or gallery items |
List<ClientSideElement.Script> |
getScripts(boolean ignoreRights,
Map<String,Object> contextParameters)
This method return the scripts that will be used on client side.
|
Map<String,Object> |
getWorkflowState(List<String> contentsId,
String scriptId)
Get the workflow state of contents
|
void |
service(ServiceManager manager) |
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getRights, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
protected ThreadSafeComponentManager<ClientSideElement> _menuItemManager
protected ServiceManager _smanager
protected UserManager _userManager
protected WorkflowProvider _workflowProvider
protected WorkflowHelper _workflowHelper
protected AmetysObjectResolver _resolver
protected ContentHelper _contentHelper
protected List<ClientSideElement> _referencedClientSideElement
protected Map<String,List<ClientSideElement>> _menuItems
protected Map<String,List<String>> _unresolvedMenuItems
protected List<ClientSideElement.Script> _scripts
public WorkflowStepsClientSideElement()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class StaticFileImportsClientSideElement
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
configure
in class StaticFileImportsClientSideElement
ConfigurationException
protected void _configureWorkflow(Configuration configuration) throws ConfigurationException
configuration
- The configurationConfigurationException
- If an error occursprotected List<Integer> _getAllowedSteps(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, boolean stepsIncludeMode, List<Integer> configuredSteps)
workflowDescriptor
- The workflow descriptorstepsIncludeMode
- True if the step listed should be the only steps included, false if they should be excluded from all available workflow's steps.configuredSteps
- A list of step ids.protected List<Integer> _getAllowedActions(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, List<Integer> stepIds, boolean actionsIncludeMode, List<Integer> configuredActions)
workflowDescriptor
- The workflow descriptorstepIds
- The list of steps specifiedactionsIncludeMode
- True if the action listed should be the only actions included, false if they should be excluded from all available workflow's actions.configuredActions
- A list of actions ids.protected void _configureScripts(Configuration workflowConfiguration, List<Integer> stepIds, Map<Integer,Configuration> stepsConfiguration, List<Integer> allowedActionIds, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor) throws ConfigurationException
workflowConfiguration
- The configurationstepIds
- The list of stepsstepsConfiguration
- The parameters for each stepallowedActionIds
- The list of globally allowed actions for this workflowworkflowDescriptor
- The descriptor for the current workflowConfigurationException
- If an error occursprotected String _getDefaultMenuClassName()
protected String _getDefaultActionClassName()
protected void _configureWorkflowStep(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, Integer stepId, Map<String,Object> stepParameters, Configuration stepConfiguration, List<Integer> allowedActionIds) throws ConfigurationException
workflowDescriptor
- The descriptor of the workflowstepId
- The stepstepParameters
- The parameters of the stepstepConfiguration
- The step configurationallowedActionIds
- The list of globally allowed actionsConfigurationException
- If an error occursprotected List<Integer> _configureWorkflowStepActions(String workflowName, Integer stepId, List<Integer> currentStepActions, List<Integer> allowedStepActions, Configuration stepActionsConfiguration) throws ConfigurationException
workflowName
- The name of the current workflowstepId
- The stepcurrentStepActions
- All the actions available for this stepallowedStepActions
- The actions allowed by the configuration for this stepstepActionsConfiguration
- The configuration for the step actionsConfigurationException
- If an error occurspublic List<ClientSideElement> getReferencedClientSideElements()
MenuClientSideElement
ClientSideElement
referenced by the menu through its menu or gallery itemsgetReferencedClientSideElements
in interface MenuClientSideElement
public List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String,Object> contextParameters)
ClientSideElement
getScripts
in interface ClientSideElement
getScripts
in class StaticFileImportsClientSideElement
ignoreRights
- True to ignore the rights verification.contextParameters
- Contextuals parameters transmitted by the environment.protected ClientSideElement.Script _configureScript(Configuration configuration) throws ConfigurationException
StaticFileImportsClientSideElement
_configureScript
in class StaticFileImportsClientSideElement
configuration
- the global configurationConfigurationException
- The configuration is incorrectprotected void _configureParameters(Map<String,Object> parameters) throws ConfigurationException
parameters
- The parameters map to fillConfigurationException
- The configuration is incorrectprotected String _getDefaultPluginName()
protected String _getSelectionTargetId()
protected void _configureMenuItems(ClientSideElement.Script script, Configuration configuration)
script
- The parameters map to fillconfiguration
- The items configurationprotected void _additionalMenuItemConfiguration(Configuration itemConf, DefaultConfiguration classConf, int actionId, Map<String,Object> parameters)
itemConf
- The item configurationclassConf
- The class configurationactionId
- The workflow action idparameters
- The script parametersprotected void _configureDefaultDescriptions(Map<String,Object> parameters)
parameters
- The parameterspublic Map<String,Object> getWorkflowState(List<String> contentsId, String scriptId)
contentsId
- The ids of contents to test workflow statusscriptId
- The script idprivate Map<String,Object> _getContentParameters(Content content, WorkflowProvider.AmetysObjectWorkflow workflow, ClientSideElement.Script script, long wId)
private void _resolveMenuItems() throws Exception
Exception