Package com.embabel.agent.core.hitl
Class FormBindingRequest
-
- All Implemented Interfaces:
-
com.embabel.agent.core.hitl.Awaitable,com.embabel.common.core.Identified,com.embabel.common.core.StableIdentified,com.embabel.common.core.types.HasInfoString,com.embabel.common.core.types.Timestamped
public final class FormBindingRequest<O extends Object> extends AbstractAwaitable<Form, FormResponse>
Present the user with a form and bind it to the given class
-
-
Field Summary
Fields Modifier and Type Field Description private final Class<O>outputClassprivate final Opopulationprivate final List<ValidationError>validationErrorsprivate final Formpayloadprivate final Stringidprivate final Instanttimestamp
-
Constructor Summary
Constructors Constructor Description FormBindingRequest(Form form, Class<O> outputClass, O population, List<ValidationError> validationErrors, Boolean persistent)FormBindingRequest(Form form, Class<O> outputClass, O population, List<ValidationError> validationErrors)FormBindingRequest(Form form, Class<O> outputClass, O population)FormBindingRequest(Form form, Class<O> outputClass)
-
Method Summary
Modifier and Type Method Description final Class<O>getOutputClass()final OgetPopulation()final List<ValidationError>getValidationErrors()ResponseImpactonResponse(FormResponse response, AgentProcess agentProcess)Update process state based on this response final ResponseImpactbind(O boundInstance, AgentProcess agentProcess)StringtoString()-
Methods inherited from class com.embabel.agent.core.hitl.AbstractAwaitable
getId, getPayload, getTimestamp, persistent -
Methods inherited from class com.embabel.agent.core.hitl.Awaitable
infoString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
FormBindingRequest
FormBindingRequest(Form form, Class<O> outputClass, O population, List<ValidationError> validationErrors, Boolean persistent)
- Parameters:
form- the form to present to the useroutputClass- the class to bind the form submission topopulation- an optional instance to pre-populate the formvalidationErrors- optional validation errors to display on the formpersistent- whether this request should be persisted
-
FormBindingRequest
FormBindingRequest(Form form, Class<O> outputClass, O population, List<ValidationError> validationErrors)
- Parameters:
form- the form to present to the useroutputClass- the class to bind the form submission topopulation- an optional instance to pre-populate the formvalidationErrors- optional validation errors to display on the form
-
FormBindingRequest
FormBindingRequest(Form form, Class<O> outputClass, O population)
- Parameters:
form- the form to present to the useroutputClass- the class to bind the form submission topopulation- an optional instance to pre-populate the form
-
-
Method Detail
-
getOutputClass
final Class<O> getOutputClass()
-
getPopulation
final O getPopulation()
-
getValidationErrors
final List<ValidationError> getValidationErrors()
-
onResponse
ResponseImpact onResponse(FormResponse response, AgentProcess agentProcess)
Update process state based on this response
-
bind
final ResponseImpact bind(O boundInstance, AgentProcess agentProcess)
-
-
-
-