Class ServiceLimitBreachedTriggerExecutor
java.lang.Object
com.codebarrel.automation.api.component.trigger.servicelimit.ServiceLimitBreachedTriggerExecutor
- All Implemented Interfaces:
ComponentExecutor,TriggerExecutor
@Component
public class ServiceLimitBreachedTriggerExecutor
extends Object
implements TriggerExecutor
-
Constructor Summary
ConstructorsConstructorDescriptionServiceLimitBreachedTriggerExecutor(RuleStatisticsService ruleStatisticsService, HourlyRuleExecutionDurationLimit hourlyRuleExecutionDurationLimit, DailyRuleExecutionDurationLimit dailyRuleExecutionDurationLimit, AutomationConfigService automationConfigService, I18nFactory i18nFactory, UserService userService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(ComponentContext context, ComponentInputs inputs) 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
-
ServiceLimitBreachedTriggerExecutor
@Inject public ServiceLimitBreachedTriggerExecutor(RuleStatisticsService ruleStatisticsService, HourlyRuleExecutionDurationLimit hourlyRuleExecutionDurationLimit, DailyRuleExecutionDurationLimit dailyRuleExecutionDurationLimit, AutomationConfigService automationConfigService, I18nFactory i18nFactory, UserService userService)
-
-
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:
context- The context to execute this componentinputs- 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.
-