Package com.avoka.fc.core.service.fluent
Class FluentFunctionService
- java.lang.Object
-
- com.avoka.fc.core.service.fluent.AbstractFluentService
-
- com.avoka.fc.core.service.fluent.FluentFunctionService
-
- All Implemented Interfaces:
IFluentService
,IServiceDefinitionAware
,IUnitTestableService
,IFluentFunction
public class FluentFunctionService extends AbstractFluentService implements IFluentFunction
Provides a Fluent Function service.- Since:
- 17.10.0
-
-
Field Summary
-
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 FluentFunctionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FuncResult
execute(String triggerType, HttpServletRequest request, Submission submission, Map<String,Object> params, Document formDoc, org.apache.commons.fileupload.FileItem fileAttachment, UserAccount userAccount)
Execute the Fluent function and return a func result object.String
getErrorType()
protected String
getFunctionTrigger()
Return the function trigger.Integer
getMaxDeliveryAttempts()
Integer
getRetryDelayMins()
boolean
isDeliveryFunction()
boolean
isFunctionDisabled()
void
setFunctionDisabled(Boolean functionDisabled)
void
setMaxDeliveryAttempts(Integer maxDeliveryAttempts)
void
setRetryDelayMins(Integer retryDelayMins)
-
Methods inherited from class com.avoka.fc.core.service.fluent.AbstractFluentService
createExceptionAndLog, getCause, getClient, getCommitChanges, getExecutionTimeout, getGroovyScript, getGroovyServiceLog, getLogger, getRequestUser, getServiceDefinition, getServiceNameAndVersion, getServiceTimeout, getSlf4jLogger, getTestLogOutput, invoke, isExceptionDebugLoggingEnabled, isGroovyDebugLogging, isGroovyLoggingEnabled, runUnitTest, setCommitChanges, setExceptionDebugLoggingEnabled, setExecutionTimeout, setGroovyDebugLogging, setGroovyLoggingEnabled, setGroovyScript, setLogger, setServiceDefinition
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.avoka.tm.func.IFluentFunction
getGroovyServiceLog
-
Methods inherited from interface com.avoka.fc.core.service.IServiceDefinitionAware
getServiceDefinition, setServiceDefinition
-
-
-
-
Method Detail
-
execute
public FuncResult execute(String triggerType, HttpServletRequest request, Submission submission, Map<String,Object> params, Document formDoc, org.apache.commons.fileupload.FileItem fileAttachment, UserAccount userAccount)
Execute the Fluent function and return a func result object.- Specified by:
execute
in interfaceIFluentFunction
- Parameters:
triggerType
- the function trigger typerequest
- the servlet requestsubmission
- the submission recordparams
- the request parametersformDoc
- the form XML datafileAttachment
- the uploaded file attachmentuserAccount
- the user account record- Returns:
- the function result object
- See Also:
IFluentFunction.execute(String, HttpServletRequest, Submission, Map, Document, FileItem, UserAccount)
-
isDeliveryFunction
public boolean isDeliveryFunction()
- Specified by:
isDeliveryFunction
in interfaceIFluentFunction
- Returns:
- true if the function is a Delivery Function
-
getErrorType
public String getErrorType()
- Specified by:
getErrorType
in interfaceIFluentService
- Returns:
- the service error type to be used to classify the error logging records
-
getMaxDeliveryAttempts
public Integer getMaxDeliveryAttempts()
- Specified by:
getMaxDeliveryAttempts
in interfaceIFluentFunction
- Returns:
- the maximum number of times a delivery function should be attempted if an error occurs.
-
setMaxDeliveryAttempts
public void setMaxDeliveryAttempts(Integer maxDeliveryAttempts)
- Parameters:
maxDeliveryAttempts
- the maxDeliveryAttempts to set
-
getRetryDelayMins
public Integer getRetryDelayMins()
- Specified by:
getRetryDelayMins
in interfaceIFluentFunction
- Returns:
- the minimum retry delay in minutes
-
setRetryDelayMins
public void setRetryDelayMins(Integer retryDelayMins)
- Parameters:
retryDelayMins
- the retryDelayMins to set
-
getFunctionTrigger
protected String getFunctionTrigger()
Description copied from class:AbstractFluentService
Return the function trigger.- Overrides:
getFunctionTrigger
in classAbstractFluentService
- Returns:
- the function trigger type
-
isFunctionDisabled
public boolean isFunctionDisabled()
- Specified by:
isFunctionDisabled
in interfaceIFluentFunction
- Returns:
- specify whether the function is disabled and should not be executed.
-
setFunctionDisabled
public void setFunctionDisabled(Boolean functionDisabled)
- Parameters:
functionDisabled
- specify whether the function is disabled and should not be executed
-
-