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

public class FluentFunctionService extends AbstractFluentService implements IFluentFunction
Provides a Fluent Function service.
Since:
17.10.0
  • 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 interface IFluentFunction
      Parameters:
      triggerType - the function trigger type
      request - the servlet request
      submission - the submission record
      params - the request parameters
      formDoc - the form XML data
      fileAttachment - the uploaded file attachment
      userAccount - the user account record
      Returns:
      the function result object
      See Also:
    • isDeliveryFunction

      public boolean isDeliveryFunction()
      Specified by:
      isDeliveryFunction in interface IFluentFunction
      Returns:
      true if the function is a Delivery Function
    • getErrorType

      public String getErrorType()
      Specified by:
      getErrorType in interface IFluentService
      Returns:
      the service error type to be used to classify the error logging records
    • getMaxDeliveryAttempts

      public Integer getMaxDeliveryAttempts()
      Specified by:
      getMaxDeliveryAttempts in interface IFluentFunction
      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 interface IFluentFunction
      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 class AbstractFluentService
      Returns:
      the function trigger type
    • isFunctionDisabled

      public boolean isFunctionDisabled()
      Specified by:
      isFunctionDisabled in interface IFluentFunction
      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
    • getClient

      protected Client getClient()
      Method to resolve the client for Fluent Function Service
      Overrides:
      getClient in class AbstractFluentService
      Returns:
      client return service definition associated client if it is org level, otherwise resolve from PARAMS_FUNC_PARAM submission client.
      Since:
      23.10.0