Package com.avoka.fc.core.service.fluent
Class FluentFormPrefillService
- java.lang.Object
-
- com.avoka.fc.core.service.fluent.AbstractFluentService
-
- com.avoka.fc.core.service.fluent.FluentFormPrefillService
-
- All Implemented Interfaces:
IFluentService
,FormPrefillService
,IServiceDefinitionAware
,IUnitTestableService
public class FluentFormPrefillService extends AbstractFluentService implements FormPrefillService
Provides a Fluent Groovy API Form Prefill Service.- Since:
- 5.0
-
-
Field Summary
-
Fields inherited from interface com.avoka.fc.core.service.FormPrefillService
RUN_ON_SAVE_RESUME
-
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 FluentFormPrefillService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAuthenticationService
getAuthenticationService()
Return the authentication service for determining the authenticated user.String
getErrorType()
Object
getFormPrefillData(Form form, Document schemaSeed, HttpServletRequest request)
Return the form pre-population data for the given form, the schema seed and request.void
setSubmission(Submission submission)
Optionally set the task submission record before thegetFormPrefillData
method is called.-
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
-
-
-
-
Method Detail
-
getFormPrefillData
public Object getFormPrefillData(Form form, Document schemaSeed, HttpServletRequest request) throws RedirectException
Return the form pre-population data for the given form, the schema seed and request.- Specified by:
getFormPrefillData
in interfaceFormPrefillService
- Parameters:
form
- the get the pre-population data for (required)schemaSeed
- the form schema seed XML (required)request
- the form request- Returns:
- the XML prefill data either a Document, String or null
- Throws:
RedirectException
- if an user redirect required- See Also:
FormPrefillService.getFormPrefillData(Form, Document, HttpServletRequest)
-
getAuthenticationService
public IAuthenticationService getAuthenticationService()
Return the authentication service for determining the authenticated user.- Specified by:
getAuthenticationService
in interfaceFormPrefillService
- Returns:
- the authentication service for determining the authenticated user
- See Also:
FormPrefillService.getAuthenticationService()
-
getErrorType
public String getErrorType()
- Specified by:
getErrorType
in interfaceIFluentService
- Returns:
- the service error type to be used to classify the error logging records
-
setSubmission
public void setSubmission(Submission submission)
Optionally set the task submission record before thegetFormPrefillData
method is called.- Specified by:
setSubmission
in interfaceFormPrefillService
- Parameters:
submission
- the task submission record (required)
-
-