Class AbstractWorkflowPermissionPluginFactory
java.lang.Object
com.atlassian.jira.plugin.workflow.AbstractWorkflowPluginFactory
com.atlassian.jira.plugin.workflow.AbstractWorkflowPermissionPluginFactory
- All Implemented Interfaces:
WorkflowPluginFactory
- Direct Known Subclasses:
WorkflowPermissionConditionFactoryImpl,WorkflowPermissionValidatorPluginFactory
A common base class for Workflow Plugin Factories that are concerned with Permissions.
- Since:
- v3.13
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractWorkflowPermissionPluginFactory(JiraAuthenticationContext authenticationContext, PermissionManager permissionManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclearLegacyPermissionArgument(Map<?, ?> descriptorArgs) protected abstract Map<?, ?> extractArgs(com.opensymphony.workflow.loader.AbstractDescriptor descriptor) getDescriptorParams(Map<String, Object> params) Given a set of name:value parameters from the plugin configuration page (ie.protected voidgetVelocityParamsForEdit(Map<String, Object> velocityParams, com.opensymphony.workflow.loader.AbstractDescriptor descriptor) Populates the given map with velocity parameters for 'edit-parameters' velocity template.protected voidgetVelocityParamsForInput(Map<String, Object> velocityParams) Get velocity parameters for 'input-parameters' velocity template.protected voidgetVelocityParamsForView(Map<String, Object> velocityParams, com.opensymphony.workflow.loader.AbstractDescriptor descriptor) Populates the given map with velocity parameters for 'view' velocity template.protected voidpopulateTemplateParamsForInputAndEdit(Map<String, Object> velocityParams, Map<?, ?> descriptorArgs) protected voidpopulateTemplateParamsForView(Map<String, Object> velocityParams, Map<?, ?> descriptorArgs) Methods inherited from class com.atlassian.jira.plugin.workflow.AbstractWorkflowPluginFactory
createMap, extractMultipleParams, extractSingleParam, getVelocityParams
-
Constructor Details
-
AbstractWorkflowPermissionPluginFactory
protected AbstractWorkflowPermissionPluginFactory(JiraAuthenticationContext authenticationContext, PermissionManager permissionManager)
-
-
Method Details
-
getDescriptorParams
Description copied from interface:WorkflowPluginFactoryGiven a set of name:value parameters from the plugin configuration page (ie. the 'input-parameters' velocity template) return a map of sanitized parameters which will be passed into workflow plugin instances. For example, the results are passed in the 'arg' parameter of post-functions'execute()or conditions'passesConditionmethods. The velocity page often submits values in array form, and this method extracts just the relevant value.- Parameters:
params- Parameters from the velocity template, eg. {"fieldId" : ["assignee"], "fieldValue":["-1"]}- Returns:
- Parameters to be passed into workflow functions via the 'args' map. Eg. {"assignee": "-1"}
-
getVelocityParamsForInput
Description copied from class:AbstractWorkflowPluginFactoryGet velocity parameters for 'input-parameters' velocity template.- Specified by:
getVelocityParamsForInputin classAbstractWorkflowPluginFactory- Parameters:
velocityParams- Map to populate.- See Also:
-
getVelocityParamsForEdit
protected void getVelocityParamsForEdit(Map<String, Object> velocityParams, com.opensymphony.workflow.loader.AbstractDescriptor descriptor) Description copied from class:AbstractWorkflowPluginFactoryPopulates the given map with velocity parameters for 'edit-parameters' velocity template. Typically an implementation would calldescriptor.getArgs()to retrieve the current configuration, and populate velocityParams from that.- Specified by:
getVelocityParamsForEditin classAbstractWorkflowPluginFactory- Parameters:
velocityParams- Map to populate.descriptor- Eg.FunctionDescriptororConditionDescriptordescribing the function/condition and its current configuration.- See Also:
-
populateTemplateParamsForInputAndEdit
-
getVelocityParamsForView
protected void getVelocityParamsForView(Map<String, Object> velocityParams, com.opensymphony.workflow.loader.AbstractDescriptor descriptor) Description copied from class:AbstractWorkflowPluginFactoryPopulates the given map with velocity parameters for 'view' velocity template. Eg. calldescriptor.getArgs()to retrieve the current configuration, look up a displayable string for the value and and populate velocityParams with that.- Specified by:
getVelocityParamsForViewin classAbstractWorkflowPluginFactory- Parameters:
velocityParams- Map to populate.descriptor- Eg. aFunctionDescriptororConditionDescriptordescribing the function/condition and its current configuration.- See Also:
-
populateTemplateParamsForView
-
extractArgs
protected abstract Map<?,?> extractArgs(com.opensymphony.workflow.loader.AbstractDescriptor descriptor) -
clearLegacyPermissionArgument
-