|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.rest.XWikiResource
org.xwiki.annotation.rest.internal.AbstractAnnotationRESTResource
public abstract class AbstractAnnotationRESTResource
Base class for the annotation REST services, to implement common functionality to all annotation REST services.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.xwiki.rest.XWikiResource |
|---|
XWikiResource.DocumentInfo |
| Field Summary | |
|---|---|
protected AnnotationRightService |
annotationRightService
The annotations rights checking service, to check user rights to perform annotations actions. |
protected AnnotationService |
annotationService
The annotations service to be used by this REST interface. |
protected static java.lang.String |
DEFAULT_ACTION
The default action to render the document for. |
protected org.xwiki.context.Execution |
execution
The execution needed to get the annotation author from the context user. |
| Fields inherited from class org.xwiki.rest.XWikiResource |
|---|
componentManager, logger, objectFactory, queryManager, uriInfo |
| Constructor Summary | |
|---|---|
AbstractAnnotationRESTResource()
|
|
| Method Summary | |
|---|---|
protected java.util.Collection<Annotation> |
filterAnnotations(java.util.Collection<Annotation> annotations,
AnnotationRequest request)
Helper method to filter a set of annotations according to the criteria in the passed annotation request. |
protected AnnotationResponse |
getErrorResponse(java.lang.Throwable exception)
Helper function to create an error response from a passed exception. |
protected AnnotationResponse |
getSuccessResponseWithAnnotatedContent(java.lang.String documentName,
AnnotationRequest request)
Builds an annotation response containing the annotated content along with the annotation stubs, according to the requirements in the passed annotations request. |
protected java.lang.String |
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 |
| Field Detail |
|---|
protected static final java.lang.String DEFAULT_ACTION
@Inject protected AnnotationService annotationService
@Inject protected AnnotationRightService annotationRightService
@Inject protected org.xwiki.context.Execution execution
| Constructor Detail |
|---|
public AbstractAnnotationRESTResource()
| Method Detail |
|---|
protected AnnotationResponse getSuccessResponseWithAnnotatedContent(java.lang.String documentName,
AnnotationRequest request)
throws AnnotationServiceException,
XWikiException
request - the annotations requestdocumentName - the name of the document to provide an annotated response for
AnnotationServiceException - in case something goes wrong handling the annotations
XWikiException - in case something goes wrong manipulating the xwiki context & documentsprotected AnnotationResponse getErrorResponse(java.lang.Throwable exception)
exception - the exception that was encountered during regular execution of service
protected java.util.Collection<Annotation> filterAnnotations(java.util.Collection<Annotation> annotations,
AnnotationRequest request)
annotations - the collection of annotations to filterrequest - the request according which to filter
protected java.lang.String getXWikiUser()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||