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
,IGroovyDebugLogService
,IServiceDefinitionAware
,IUnitTestableService
,IFluentFunction
Provides a Fluent Function service.
- Since:
- 17.10.0
-
Field Summary
Fields inherited from class com.avoka.fc.core.service.fluent.AbstractFluentService
inputParams
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
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(String triggerType, jakarta.servlet.http.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.protected Client
Method to resolve the client for Fluent Function Serviceprotected String
Return the function trigger.boolean
boolean
void
setFunctionDisabled
(Boolean functionDisabled) void
setMaxDeliveryAttempts
(Integer maxDeliveryAttempts) void
setRetryDelayMins
(Integer retryDelayMins) Methods inherited from class com.avoka.fc.core.service.fluent.AbstractFluentService
buildErrorMessage, createExceptionAndLog, getCause, getCommitChanges, getExecutionTimeout, getGroovyDebugLogging, getGroovyScript, getGroovyServiceLog, getLogger, getRequestUser, getServiceDefinition, getServiceNameAndVersion, getServiceTimeout, getSlf4jLogger, getTestLogOutput, invoke, isExceptionDebugLoggingEnabled, 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.IGroovyDebugLogService
isGroovyDebugLogging
Methods inherited from interface com.avoka.fc.core.service.IServiceDefinitionAware
getServiceDefinition, setServiceDefinition
-
Constructor Details
-
FluentFunctionService
public FluentFunctionService()
-
-
Method Details
-
execute
public FuncResult execute(String triggerType, jakarta.servlet.http.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:
-
isDeliveryFunction
public boolean isDeliveryFunction()- Specified by:
isDeliveryFunction
in interfaceIFluentFunction
- Returns:
- true if the function is a Delivery Function
-
getErrorType
- Specified by:
getErrorType
in interfaceIFluentService
- Returns:
- the service error type to be used to classify the error logging records
-
getMaxDeliveryAttempts
- Specified by:
getMaxDeliveryAttempts
in interfaceIFluentFunction
- Returns:
- the maximum number of times a delivery function should be attempted if an error occurs.
-
setMaxDeliveryAttempts
- Parameters:
maxDeliveryAttempts
- the maxDeliveryAttempts to set
-
getRetryDelayMins
- Specified by:
getRetryDelayMins
in interfaceIFluentFunction
- Returns:
- the minimum retry delay in minutes
-
setRetryDelayMins
- Parameters:
retryDelayMins
- the retryDelayMins to set
-
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
- Parameters:
functionDisabled
- specify whether the function is disabled and should not be executed
-
getClient
Method to resolve the client for Fluent Function Service- Overrides:
getClient
in classAbstractFluentService
- Returns:
- client return service definition associated client if it is org level, otherwise resolve from PARAMS_FUNC_PARAM submission client.
- Since:
- 23.10.0
-