Package com.avoka.fc.core.service.fluent
Class FluentFormVersionSelectorService
- java.lang.Object
-
- com.avoka.fc.core.service.fluent.AbstractFluentService
-
- com.avoka.fc.core.service.fluent.FluentFormVersionSelectorService
-
- All Implemented Interfaces:
IFluentService
,IFormVersionSelectorService
,IServiceDefinitionAware
,IUnitTestableService
public class FluentFormVersionSelectorService extends AbstractFluentService implements IFormVersionSelectorService
Provides a service that returns the form version to be used in rendering. The Groovy script contains the logic to select the version.- Since:
- 5.1.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 FluentFormVersionSelectorService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getErrorType()
TemplateVersion
getFormVersionToRender(Form form, HttpServletRequest request)
Select the form version that shall be used to fulfill a form render request.void
setSupportFormVersionRequests(boolean supportFormVersionRequests)
Determine whether the service will support the request parameterParams.REQUEST_FORM_VERSION
boolean
supportFormVersionRequests()
Return whether the service will support the request parameterParams.REQUEST_FORM_VERSION
.-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.avoka.fc.core.service.IServiceDefinitionAware
getServiceDefinition, setServiceDefinition
-
-
-
-
Method Detail
-
getFormVersionToRender
public TemplateVersion getFormVersionToRender(Form form, HttpServletRequest request)
Select the form version that shall be used to fulfill a form render request.- Specified by:
getFormVersionToRender
in interfaceIFormVersionSelectorService
- Parameters:
form
- the form (required)request
- the HTTP servlet request (required)- Returns:
- the template version that shall be used when rendering the form
- See Also:
IFormVersionSelectorService.getFormVersionToRender(Form, HttpServletRequest)
-
getErrorType
public String getErrorType()
- Specified by:
getErrorType
in interfaceIFluentService
- Returns:
- the service error type to be used to classify the error logging records
-
supportFormVersionRequests
public boolean supportFormVersionRequests()
Return whether the service will support the request parameterParams.REQUEST_FORM_VERSION
. If set, the service will always return the current form version.- Returns:
- true if the service will support the request parameter
Params.REQUEST_FORM_VERSION
-
setSupportFormVersionRequests
public void setSupportFormVersionRequests(boolean supportFormVersionRequests)
Determine whether the service will support the request parameterParams.REQUEST_FORM_VERSION
- Parameters:
supportFormVersionRequests
- whether to support the service parameter request parameterParams.REQUEST_FORM_VERSION
-
-