D
- public abstract static class ResponseManager.Response<D extends DynamicFormManager.DynamicForm> extends DataObject
DynamicFormManager.DynamicForm
The logic for how a response is generated (and how the form we are responding to is selected)
is up to the sub-class. For example this may be an application to a particular funding call
and the form to be completed is encoded in funding-call object. Or the system might
have a single application form where the current valid form is specified in some manner.DEBUG, record
MAX_IDENTIFIER
Constructor and Description |
---|
Response(ResponseManager<? extends ResponseManager.Response<D>,D> manager,
Repository.Record r) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canEdit(SessionService<?> sess)
Access control method to edit the response
|
abstract boolean |
canView(SessionService<?> sess)
Access control method to view the response
|
<T> T |
getData(QuestionManager.Question q)
get the data provided in response to a particular question.
|
abstract MimeStreamData |
getDataStream()
get a
MimeStreamData representing a downloadable version of the response |
abstract java.lang.String |
getDescriptor()
a text descriptor for the response.
|
D |
getForm()
Get the
DynamicFormManager.DynamicForm we are in response to. |
ResponseManager<? extends ResponseManager.Response<D>,D> |
getResponseManager() |
<T> ResponseDataManager.ResponseData<T,? extends ResponseManager.Response<D>,D> |
getWrapper(QuestionManager.Question q)
get the data-object that contains the response data.
|
<T> void |
setData(QuestionManager.Question q,
T data)
set the data in response to a question
|
void |
setForm(D form)
Set the
DynamicFormManager.DynamicForm . |
abstract FormResult |
submit()
method to be called when the form is finally submitted.
|
abstract boolean |
validate()
This method must return true before the form edit transition allows
the submit button to be pressed.
|
addToMap, addToMap, addToMap, commit, delete, empty, equals, formUpdate, getContext, getDatabaseService, getFactoryTag, getID, getIdentifier, getIdentifier, getLogger, getMap, getMap, getOwningFactory, getRecord, getRecord, getRecord, getSQLContext, getUniqueIdName, hashCode, isLocked, lock, post_commit, postCreate, pre_commit, release, setContents, setDirty, setMap, toString
public Response(ResponseManager<? extends ResponseManager.Response<D>,D> manager, Repository.Record r)
r
- public ResponseManager<? extends ResponseManager.Response<D>,D> getResponseManager()
public D getForm() throws DataException
DynamicFormManager.DynamicForm
we are in response to.
This should be a frozen form as we assume it is static.DataException
public void setForm(D form)
DynamicFormManager.DynamicForm
.
This should be set once when the response if first created.form
- public <T> void setData(QuestionManager.Question q, T data) throws java.lang.Exception
q
- data
- java.lang.Exception
public <T> T getData(QuestionManager.Question q) throws java.lang.Exception
q
- java.lang.Exception
public <T> ResponseDataManager.ResponseData<T,? extends ResponseManager.Response<D>,D> getWrapper(QuestionManager.Question q) throws java.lang.Exception
q
- java.lang.Exception
public abstract boolean canView(SessionService<?> sess)
sess
- public abstract boolean canEdit(SessionService<?> sess)
sess
- public abstract java.lang.String getDescriptor()
public abstract FormResult submit() throws java.lang.Exception
canEdit(SessionService)
so
the response contents don't change while the response is reviewed.
Other submit time side-effects could also be included here
The reviewers could return the response to the submitter returning it
to a previous statejava.lang.Exception
public abstract boolean validate() throws java.lang.Exception
java.lang.Exception
public abstract MimeStreamData getDataStream() throws DataException
MimeStreamData
representing a downloadable version of the responseDataException