org.xwiki.annotation.rest.internal
Class AnnotationsRESTResource
java.lang.Object
org.xwiki.rest.XWikiResource
org.xwiki.annotation.rest.internal.AbstractAnnotationRESTResource
org.xwiki.annotation.rest.internal.AnnotationsRESTResource
- All Implemented Interfaces:
- org.xwiki.component.phase.Initializable, XWikiRestComponent
@Component
@Named(value="org.xwiki.annotation.rest.internal.AnnotationsRESTResource")
@Singleton
public class AnnotationsRESTResource
- extends AbstractAnnotationRESTResource
- Since:
- 2.3M1
- Version:
- $Id$
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationsRESTResource
public AnnotationsRESTResource()
doGetAnnotatedContent
public javax.ws.rs.core.Response doGetAnnotatedContent(java.lang.String space,
java.lang.String page,
java.lang.String wiki,
AnnotationRequest request)
- Parameters:
wiki - the wiki of the document to get annotations forspace - the space of the document to get annotations forpage - the name of the document to get annotation forrequest - the extra fields to be returned from the annotation structure when returning the annotation resume
to the client side
- Returns:
- annotations of a given XWiki page. Note that we're returning a response holding the AnnotatedContent
instead of an AnnotatedContent object because we need to be able to set custom expire fields to prevent
IE from caching this resource.
doPostAnnotation
public AnnotationResponse doPostAnnotation(java.lang.String wiki,
java.lang.String space,
java.lang.String page,
AnnotationAddRequest request)
- Add annotation to a given page.
- Parameters:
wiki - the wiki of the document to add annotation onspace - the space of the document to add annotation onpage - the name of the document to add annotation onrequest - the request object with the annotation to be added
- Returns:
- AnnotationRequestResponse, responseCode = 0 if no error
getMap
protected java.util.Map<java.lang.String,java.lang.Object> getMap(AnnotationFieldCollection fields)
- Builds a simple map from a field collection.
- Parameters:
fields - the collection of fields to build a map for
- Returns:
- a map of the fields, as string key and Object value pair
Copyright © 2004-2011 XWiki. All Rights Reserved.