Class ThirdPartyComponentExecutor
java.lang.Object
com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentExecutor
- All Implemented Interfaces:
ComponentExecutor,TriggerExecutor
public class ThirdPartyComponentExecutor
extends Object
implements ComponentExecutor, TriggerExecutor
Allows for 3rd party components to run inside our app.
-
Constructor Summary
ConstructorsConstructorDescriptionThirdPartyComponentExecutor(ThirdPartyContextHelper contextHelper, ThirdPartyComponentInputsFactory inputsFactory, com.codebarrel.automation.api.config.ComponentType type, com.codebarrel.automation.api.thirdparty.AutomationRuleComponent component) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(ComponentContext componentContext, ComponentInputs componentInputs) Checks if a trigger can handle the inputs provided.execute(ComponentContext context, ComponentInputs inputs, AuditComponentChangeBuilder audit) Executes an action, give the provided context and inputs.
-
Constructor Details
-
ThirdPartyComponentExecutor
public ThirdPartyComponentExecutor(ThirdPartyContextHelper contextHelper, ThirdPartyComponentInputsFactory inputsFactory, com.codebarrel.automation.api.config.ComponentType type, com.codebarrel.automation.api.thirdparty.AutomationRuleComponent component)
-
-
Method Details
-
canHandle
Description copied from interface:TriggerExecutorChecks if a trigger can handle the inputs provided. This method should return false if no inputs are available that this component can process. Note that this will stop the rule from executing at that point, so if you want to do nothing in the rule, return true and do checks in the execute method.- Specified by:
canHandlein interfaceTriggerExecutor- Parameters:
componentContext- The context to execute this componentcomponentInputs- Inputs needed by the component- Returns:
- false if this component can't handle the provided inputs.
-
execute
public ComponentExecutionResult execute(ComponentContext context, ComponentInputs inputs, AuditComponentChangeBuilder audit) Description copied from interface:ComponentExecutorExecutes an action, give the provided context and inputs. Implementations can pick and chose what inputs they wish to handle. Implementations can choose if they want to stop execution of the component chain by returning an appropriate execution reuls. Implementations can also add additional inputs for the next component in the chain.- Specified by:
executein interfaceComponentExecutor- Parameters:
context- The context to execute this componentinputs- Inputs needed by the component- Returns:
- the outputs of this executor (inputs with additional stuff) and what should happen next.
-