org.xwiki.annotation.rest.internal.representations
Class FormUrlEncodedAnnotationAddRequestReader
java.lang.Object
org.xwiki.annotation.rest.internal.representations.AbstractFormUrlEncodedAnnotationRequestReader<T>
org.xwiki.annotation.rest.internal.representations.AbstractFormUrlEncodedAnnotationUpdateRequestReader<AnnotationAddRequest>
org.xwiki.annotation.rest.internal.representations.FormUrlEncodedAnnotationAddRequestReader
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<AnnotationAddRequest>, XWikiRestComponent
@Component(value="org.xwiki.annotation.rest.internal.representations.FormUrlEncodedAnnotationAddRequestReader")
@Provider
public class FormUrlEncodedAnnotationAddRequestReader
- extends AbstractFormUrlEncodedAnnotationUpdateRequestReader<AnnotationAddRequest>
Implementation of the form url encoded reader for the annotation creation requests.
- Since:
- 2.3M1
- Version:
- $Id$
|
Method Summary |
protected AnnotationAddRequest |
getReadObjectInstance(ObjectFactory factory)
Helper function to provide an instance of the read object from the object factory. |
boolean |
isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
protected boolean |
saveField(AnnotationAddRequest annotationAddRequest,
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 |
FormUrlEncodedAnnotationAddRequestReader
public FormUrlEncodedAnnotationAddRequestReader()
isReadable
public boolean isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
-
- See Also:
MessageBodyReader.isReadable(java.lang.Class, java.lang.reflect.Type,
java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType)
getReadObjectInstance
protected AnnotationAddRequest getReadObjectInstance(ObjectFactory factory)
- Helper function to provide an instance of the read object from the object factory.
- Specified by:
getReadObjectInstance in class AbstractFormUrlEncodedAnnotationRequestReader<AnnotationAddRequest>
- Parameters:
factory - the object factory
- Returns:
- an instance of the read type T, as built by the object factory.
- See Also:
#getReadObjectInstance(org.xwiki.annotation.rest.model.jaxb.ObjectFactory)
saveField
protected boolean saveField(AnnotationAddRequest annotationAddRequest,
java.lang.String key,
java.lang.String value,
ObjectFactory objectFactory)
- Helper function to save a parameter in the read object. To implement in subclasses to provide type specific
behaviour.
- Overrides:
saveField in class AbstractFormUrlEncodedAnnotationUpdateRequestReader<AnnotationAddRequest>
- Parameters:
annotationAddRequest - the request to fill with datakey - the key of the fieldvalue - the value of the fieldobjectFactory - the objects factory to create the annotation fields
- Returns:
- true if the field was saved at this level, false otherwise
- See Also:
#saveField(java.lang.Object, java.lang.String, java.lang.String,
org.xwiki.annotation.rest.model.jaxb.ObjectFactory)
Copyright © 2004-2011 XWiki. All Rights Reserved.