org.xwiki.annotation.rest.internal
Class SingleAnnotationRESTResource

java.lang.Object
  extended by org.xwiki.rest.XWikiResource
      extended by org.xwiki.annotation.rest.internal.AbstractAnnotationRESTResource
          extended by org.xwiki.annotation.rest.internal.SingleAnnotationRESTResource
All Implemented Interfaces:
org.xwiki.component.phase.Initializable, XWikiRestComponent

@Component
@Named(value="org.xwiki.annotation.rest.internal.SingleAnnotationRESTResource")
@Singleton
public class SingleAnnotationRESTResource
extends AbstractAnnotationRESTResource

This class allow to do delete a single annotation.

Since:
2.3M1
Version:
$Id$

Nested Class Summary
 
Nested classes/interfaces inherited from class org.xwiki.rest.XWikiResource
XWikiResource.DocumentInfo
 
Field Summary
 
Fields inherited from class org.xwiki.annotation.rest.internal.AbstractAnnotationRESTResource
annotationRightService, annotationService, DEFAULT_ACTION, execution
 
Fields inherited from class org.xwiki.rest.XWikiResource
componentManager, logger, objectFactory, queryManager, uriInfo
 
Constructor Summary
SingleAnnotationRESTResource()
           
 
Method Summary
 AnnotationResponse doDelete(java.lang.String space, java.lang.String page, java.lang.String wiki, java.lang.String id, AnnotationRequest request)
          Deletes the specified annotation.
 AnnotationResponse doUpdate(java.lang.String space, java.lang.String page, java.lang.String wiki, java.lang.String id, AnnotationUpdateRequest updateRequest)
          Updates the specified annotation with the values of the fields in received collection.
 
Methods inherited from class org.xwiki.annotation.rest.internal.AbstractAnnotationRESTResource
filterAnnotations, getErrorResponse, getSuccessResponseWithAnnotatedContent, getXWikiUser
 
Methods inherited from class org.xwiki.rest.XWikiResource
getDocumentInfo, getUriTemplate, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleAnnotationRESTResource

public SingleAnnotationRESTResource()
Method Detail

doDelete

public AnnotationResponse doDelete(java.lang.String space,
                                   java.lang.String page,
                                   java.lang.String wiki,
                                   java.lang.String id,
                                   AnnotationRequest request)
Deletes the specified annotation.

Parameters:
space - the space of the document to delete the annotation from
page - the name of the document to delete the annotation from
wiki - the wiki of the document to delete the annotation from
id - the id of the annotation to delete
request - the annotation request to configure the returned annotated content after the execution of the operation
Returns:
a annotation response for which the response code will be 0 in case of success and non-zero otherwise

doUpdate

public AnnotationResponse doUpdate(java.lang.String space,
                                   java.lang.String page,
                                   java.lang.String wiki,
                                   java.lang.String id,
                                   AnnotationUpdateRequest updateRequest)
Updates the specified annotation with the values of the fields in received collection.

Parameters:
space - the space of the document to update the annotation from
page - the name of the document to update the annotation from
wiki - the wiki of the document to update the annotation from
id - the id of the annotation to update
updateRequest - the request to update the annotation pointed by the id
Returns:
a annotation response for which the response code will be 0 in case of success and non-zero otherwise


Copyright © 2004-2011 XWiki. All Rights Reserved.