Package com.avoka.fc.core.service.fluent
Class FluentJobActionService
- java.lang.Object
-
- com.avoka.fc.core.service.fluent.AbstractFluentService
-
- com.avoka.fc.core.service.fluent.FluentJobActionService
-
- All Implemented Interfaces:
IFluentService
,IServiceDefinitionAware
,IUnitTestableService
,IJobActionService
public class FluentJobActionService extends AbstractFluentService implements IJobActionService
Provides a Fluent Job Action service.- Since:
- 5.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected JobEventLogService
jobEventLogService
The JobEventLog service.protected int
maxErrorRetryAttempts
The maximum number of error retry attempts, default 0.protected Integer
retryDelayMins
The execute retry delay in minutes.-
Fields inherited from interface com.avoka.fc.core.service.fluent.IFluentService
PARAM_ACTION_PROPERTIES, PARAMS_FILEDATA, PARAMS_FILENAME, PARAMS_FORM, PARAMS_FORM_XML, PARAMS_FUNC_PARAM, PARAMS_JOB, PARAMS_JOB_ACTION, PARAMS_PARAMS, PARAMS_REQUEST, PARAMS_ROWS, PARAMS_SVC_DEF, PARAMS_TEST_PARAMS, PARAMS_TXN, PARAMS_USER
-
-
Constructor Summary
Constructors Constructor Description FluentJobActionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionResult
execute(ActionContext actionContext)
Execute the action and return the result.String
getErrorType()
Integer
getMaxErrorRetryAttempts()
Return the maximum number of error retry attempts should be performed.Integer
getRetryDelayMins()
Return the minimum action execute retry delay in minutes.void
setMaxErrorRetryAttempts(Integer attempts)
Set the maximum number of action attempts.void
setRetryDelayMins(Integer delayMins)
Set the minimum action execute retry delay in minutes.String
validateProperties(ActionStepProperties actionStepProperties, Client client)
Validate the action service using the given action step service properties, returning null if valid or an error string otherwise.-
Methods inherited from class com.avoka.fc.core.service.fluent.AbstractFluentService
createExceptionAndLog, getCause, getClient, getCommitChanges, getExecutionTimeout, getFunctionTrigger, getGroovyScript, getGroovyServiceLog, getLogger, getRequestUser, getServiceDefinition, getServiceNameAndVersion, getServiceTimeout, getSlf4jLogger, getTestLogOutput, invoke, isExceptionDebugLoggingEnabled, isGroovyDebugLogging, isGroovyLoggingEnabled, runUnitTest, setCommitChanges, setExceptionDebugLoggingEnabled, setExecutionTimeout, setGroovyDebugLogging, setGroovyLoggingEnabled, setGroovyScript, setLogger, setServiceDefinition
-
-
-
-
Field Detail
-
jobEventLogService
protected JobEventLogService jobEventLogService
The JobEventLog service.
-
maxErrorRetryAttempts
protected int maxErrorRetryAttempts
The maximum number of error retry attempts, default 0.
-
retryDelayMins
protected Integer retryDelayMins
The execute retry delay in minutes.
-
-
Method Detail
-
execute
public ActionResult execute(ActionContext actionContext)
Execute the action and return the result.- Specified by:
execute
in interfaceIJobActionService
- Parameters:
actionContext
- the job action execution context (required)- Returns:
- the action result
- See Also:
IJobActionService.execute(ActionContext)
-
validateProperties
public String validateProperties(ActionStepProperties actionStepProperties, Client client)
Validate the action service using the given action step service properties, returning null if valid or an error string otherwise.- Specified by:
validateProperties
in interfaceIJobActionService
- Parameters:
actionStepProperties
- the action step properties (required)client
- the Job Controller client (required)- Returns:
- null
- See Also:
IJobActionService.validateProperties(ActionStepProperties, Client)
-
getMaxErrorRetryAttempts
public Integer getMaxErrorRetryAttempts()
Description copied from interface:IJobActionService
Return the maximum number of error retry attempts should be performed.- Specified by:
getMaxErrorRetryAttempts
in interfaceIJobActionService
- Returns:
- the maximum number of error retry attempts should be performed
- See Also:
IJobActionService.getMaxErrorRetryAttempts()
-
setMaxErrorRetryAttempts
public void setMaxErrorRetryAttempts(Integer attempts)
Set the maximum number of action attempts.- Parameters:
attempts
- the maximum number of error retry attempts should be performed
-
getRetryDelayMins
public Integer getRetryDelayMins()
Description copied from interface:IJobActionService
Return the minimum action execute retry delay in minutes.- Specified by:
getRetryDelayMins
in interfaceIJobActionService
- Returns:
- the minimum action execute retry delay in minutes.
- See Also:
IJobActionService.getRetryDelayMins()
-
setRetryDelayMins
public void setRetryDelayMins(Integer delayMins)
Set the minimum action execute retry delay in minutes.- Parameters:
delayMins
- the retry delay in minutes
-
getErrorType
public String getErrorType()
- Specified by:
getErrorType
in interfaceIFluentService
- Returns:
- the service error type to be used to classify the error logging records
- See Also:
IFluentService.getErrorType()
-
-