@Path(value="/")
@Consumes(value={"application/json","application/x-www-form-urlencoded"})
@Produces(value="application/json")
@Secured(value={"ROLE_USER","ROLE_ADMIN"})
public class GenericFormService
extends SecurableService
implements ChangeGenerator<Object[]>
HttpServletRequest to the submit TransformerResponse object and sent back synchronously to the client
setSubmitTransformer(Transformer) = TransformerChain {
Transfomer.transform(Map<Class, Entity>)ChangeGenerator; it will also generate Events of Type| Modifier and Type | Field and Description |
|---|---|
static String |
USER_REQ_CONTEXT_KEY
The input
Map passed to the submitTransformer will contain an entry for the current User request |
applicationContext, CACHE, NO_CACHE, request, response| Constructor and Description |
|---|
GenericFormService() |
GenericFormService(boolean checkAuthFiltered) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ChangeListener changeListener)
Allow Notify all
ChangeListeners about a change |
List |
getListeners()
Get list directly.
|
org.apache.commons.collections.Transformer |
getSubmitTransformer()
Takes a
List of entities defined in sequence by #entities and validates them. |
org.apache.commons.collections.Transformer |
getValidationTransformer()
Takes a
List of entities defined in sequence by #entities and validates them. |
void |
notifyAllListeners(Object[] object)
Whenever a node is selected/updated, it also notifies its listeners.
|
void |
setListeners(List listeners)
Set list directly.
|
void |
setSubmitTransformer(org.apache.commons.collections.Transformer submitTransformer)
Takes a
List of entities defined in sequence by #entities and validates them. |
void |
setValidationTransformer(org.apache.commons.collections.Transformer validationTransformer)
Takes a
List of entities defined in sequence by #entities and validates them. |
Response |
submit(Object r) |
Response |
submitForm(javax.ws.rs.core.MultivaluedMap map) |
Response |
submitJSON(Map data) |
Response |
validate(Object r) |
Response |
validateForm(javax.ws.rs.core.MultivaluedMap map) |
Response |
validateJSON(Map data) |
checkAuthFilterInvoked, filter, queryfilter, getCacheDef, getTestString, querypublic static final String USER_REQ_CONTEXT_KEY
Map passed to the submitTransformer will contain an entry for the current User requestpublic GenericFormService()
public GenericFormService(boolean checkAuthFiltered)
@POST @Path(value="submitJSON") @Consumes(value="application/json") @Produces(value="application/json") public Response submitJSON(Map data)
@POST @Path(value="submit") @Consumes(value="application/x-www-form-urlencoded") @Produces(value="application/json") public Response submitForm(javax.ws.rs.core.MultivaluedMap map)
@POST @Path(value="validateJSON") @Consumes(value="application/json") @Produces(value="application/json") public Response validateJSON(Map data)
@POST @Path(value="validate") @Consumes(value="application/x-www-form-urlencoded") @Produces(value="application/json") public Response validateForm(javax.ws.rs.core.MultivaluedMap map)
public org.apache.commons.collections.Transformer getValidationTransformer()
List of entities defined in sequence by #entities and validates them.
The first element in this List will always be the HttpServletRequest that triggered the webserivce methodTransformer returns a null then it implies no validation was required and be interpreted as a success.public void setValidationTransformer(org.apache.commons.collections.Transformer validationTransformer)
List of entities defined in sequence by #entities and validates them.
The first element in this List will always be the HttpServletRequest that triggered the webserivce methodTransformer returns a null then it implies no validation was required and be interpreted as a success.public org.apache.commons.collections.Transformer getSubmitTransformer()
List of entities defined in sequence by #entities and validates them.
The first element in this List will always be the HttpServletRequest that triggered the webserivce methodvalidationTransformer. If there is any exception, an exception will be thrown.
else any object or null will be returned in a success scenario.public void setSubmitTransformer(org.apache.commons.collections.Transformer submitTransformer)
List of entities defined in sequence by #entities and validates them.
The first element in this List will always be the HttpServletRequest that triggered the webserivce methodvalidationTransformer. If there is any exception, an exception will be thrown.
else any object or null will be returned in a success scenario.public void addChangeListener(ChangeListener changeListener)
ChangeGeneratorChangeListeners about a changeaddChangeListener in interface ChangeGenerator<Object[]>public void notifyAllListeners(Object[] object)
ChangeGeneratornotifyAllListeners in interface ChangeGenerator<Object[]>public List getListeners()
ChangeGeneratorgetListeners in interface ChangeGenerator<Object[]>public void setListeners(List listeners)
ChangeGeneratorsetListeners in interface ChangeGenerator<Object[]>Copyright © 2018. All rights reserved.