public class TriggerWebHookFunctionPluginFactory extends AbstractWorkflowPluginFactory implements WorkflowPluginFunctionFactory
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_FIELD_ID |
static String |
SELECTED_WEBHOOK |
static String |
TARGET_FIELD_ID |
static String |
WEBHOOK_NAME |
static String |
WEBHOOKS |
Constructor and Description |
---|
TriggerWebHookFunctionPluginFactory(com.atlassian.webhooks.api.register.listener.WebHookListenerService webHookCustomerService) |
Modifier and Type | Method and Description |
---|---|
Map<String,?> |
getDescriptorParams(Map<String,Object> formParams)
Given a set of name:value parameters from the plugin configuration page (ie.
|
protected void |
getVelocityParamsForEdit(Map<String,Object> velocityParams,
com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
Populates the given map with velocity parameters for 'edit-parameters' velocity template.
|
protected void |
getVelocityParamsForInput(Map<String,Object> velocityParams)
Get velocity parameters for 'input-parameters' velocity template.
|
protected void |
getVelocityParamsForView(Map<String,Object> velocityParams,
com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
Populates the given map with velocity parameters for 'view' velocity template.
|
createMap, extractMultipleParams, extractSingleParam, getVelocityParams
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVelocityParams
public static final String PARAM_FIELD_ID
public static final String TARGET_FIELD_ID
public static final String WEBHOOKS
public static final String SELECTED_WEBHOOK
public static final String WEBHOOK_NAME
public TriggerWebHookFunctionPluginFactory(com.atlassian.webhooks.api.register.listener.WebHookListenerService webHookCustomerService)
protected void getVelocityParamsForInput(Map<String,Object> velocityParams)
AbstractWorkflowPluginFactory
getVelocityParamsForInput
in class AbstractWorkflowPluginFactory
velocityParams
- Map to populate.AbstractWorkflowPluginFactory.getVelocityParams(String, com.opensymphony.workflow.loader.AbstractDescriptor)
protected void getVelocityParamsForEdit(Map<String,Object> velocityParams, com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
AbstractWorkflowPluginFactory
descriptor.getArgs()
to retrieve the current configuration, and populate velocityParams from that.getVelocityParamsForEdit
in class AbstractWorkflowPluginFactory
velocityParams
- Map to populate.descriptor
- Eg. FunctionDescriptor
or ConditionDescriptor
describing the function/condition and its current configuration.AbstractWorkflowPluginFactory.getVelocityParams(String, com.opensymphony.workflow.loader.AbstractDescriptor)
protected void getVelocityParamsForView(Map<String,Object> velocityParams, com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
AbstractWorkflowPluginFactory
descriptor.getArgs()
to retrieve the current
configuration, look up a displayable string for the value and and populate velocityParams with that.getVelocityParamsForView
in class AbstractWorkflowPluginFactory
velocityParams
- Map to populate.descriptor
- Eg. a FunctionDescriptor
or ConditionDescriptor
describing the function/condition and its current configuration.AbstractWorkflowPluginFactory.getVelocityParams(String, com.opensymphony.workflow.loader.AbstractDescriptor)
public Map<String,?> getDescriptorParams(Map<String,Object> formParams)
WorkflowPluginFactory
execute()
or conditions' passesCondition
methods.
The velocity page often submits values in array form, and this method extracts just the relevant value.getDescriptorParams
in interface WorkflowPluginFactory
formParams
- Parameters from the velocity template, eg. {"fieldId" : ["assignee"], "fieldValue":["-1"]}Copyright © 2002-2023 Atlassian. All Rights Reserved.