|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.annotation.rest.internal.representations.AbstractFormUrlEncodedAnnotationRequestReader<T>
T - the type read from the url encoded formpublic abstract class AbstractFormUrlEncodedAnnotationRequestReader<T extends AnnotationRequest>
Partial implementation of a reader from form submits requests for annotation related types, to handle generic request reader code.
| Field Summary | |
|---|---|
protected static java.lang.String |
FILTER_FIELD_PREFIX
The prefix of the parameters of the annotations filters. |
protected static java.lang.String |
REQUESTED_FIELD
The parameter name for a field requested to appear in the annotations stub. |
| Constructor Summary | |
|---|---|
AbstractFormUrlEncodedAnnotationRequestReader()
|
|
| Method Summary | |
|---|---|
protected abstract T |
getReadObjectInstance(ObjectFactory factory)
Helper function to provide an instance of the read object from the object factory. |
T |
readFrom(java.lang.Class<T> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders,
java.io.InputStream entityStream)
|
protected boolean |
saveField(T readObject,
java.lang.String key,
java.lang.String value,
ObjectFactory objectFactory)
Helper function to save a parameter in the read object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.ws.rs.ext.MessageBodyReader |
|---|
isReadable |
| Field Detail |
|---|
protected static final java.lang.String REQUESTED_FIELD
protected static final java.lang.String FILTER_FIELD_PREFIX
| Constructor Detail |
|---|
public AbstractFormUrlEncodedAnnotationRequestReader()
| Method Detail |
|---|
protected abstract T getReadObjectInstance(ObjectFactory factory)
factory - the object factory
public T readFrom(java.lang.Class<T> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders,
java.io.InputStream entityStream)
throws java.io.IOException,
javax.ws.rs.WebApplicationException
readFrom in interface javax.ws.rs.ext.MessageBodyReader<T extends AnnotationRequest>java.io.IOException
javax.ws.rs.WebApplicationExceptionMessageBodyReader.readFrom(java.lang.Class, java.lang.reflect.Type,
java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap,
java.io.InputStream)
protected boolean saveField(T readObject,
java.lang.String key,
java.lang.String value,
ObjectFactory objectFactory)
readObject - the request to fill with datakey - the key of the fieldvalue - the value of the fieldobjectFactory - the objects factory to create the annotation fields
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||