de.hs_rm.cs.lecturenotes.client.core.transport.service
Interface AnnotationCommServiceAsync


public interface AnnotationCommServiceAsync

Interface description to the (asynchronous) Annotation GWT RPC Servlet.

Version:
$LastChangedRevision: 259 $
Author:
Enrico Homann

Method Summary
 void createAnnotation(Annotation annotation, com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
          Creates a new annotation Annotation entity, whether a) DoecentAnnotation, or b) UserAnnotation.
 void deleteAnnotation(long annotationId, com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
          Removes a Annotation and it's children from the database.
 void getAnnotationListByParagraphId(AnnotationDiscriminatorEnum annotationDiscr, long paragraphId, AnnotationAttributeEnum orderAttribute, SQLSortDirectionEnum sortDirection, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> callback)
          Will return a List of Annotation object for the row identifier long paragraphId of Paragraph.
 void getAnnotationListByParaId(AnnotationDiscriminatorEnum annotationDiscr, long paraId, AnnotationAttributeEnum orderAttribute, SQLSortDirectionEnum sortDirection, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> callback)
          Will return a List of Annotation object for the paragraph identifier long paraId of Paragraph.
 void getAnnotationListByParaId(long paraId, AnnotationAttributeEnum orderAttribute, SQLSortDirectionEnum sortDirection, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> callback)
          Will return a list with all known annotations for long paraId.
 void getChildAnnotationByAnnotation(long parentId, AnnotationAttributeEnum orderAttribute, SQLSortDirectionEnum sortDirection, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> callback)
          Will return a List of children Annotation, that are represented as "Answers/Comments" to annotations.
 void getNumberAnnotationsForParagraph(long paraId, boolean withResponses, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Long> callback)
          Will return the number of annotations for Paragraph with long paraId.
 void getNumberResponsesForAnnotation(long annotationId, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Long> callback)
          Will return the number of responses to Annotation with long annotationId.
 void getOwnershipAnnotationListByParaId(long paraId, AnnotationAttributeEnum orderAttribute, SQLSortDirectionEnum sortDirection, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> callback)
          Will return a list with all known annotations for long paraId and the current session User.
 void getTopAnnotatedParagraphs(long lectureId, long limitValue, boolean withResponses, boolean withContents, SQLSortDirectionEnum sortDirection, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<ParagraphStats>> callback)
          Will return a List of ParagraphStats objects that hold a Paragraph and its number of all known annotations.
 void updateAnnotationPosition(long annotationId, AnnotationStickyPositionEnum position, com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
          Will update the position of the Annotation identified by long annotationId.
 

Method Detail

createAnnotation

void createAnnotation(Annotation annotation,
                      com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
Creates a new annotation Annotation entity, whether a) DoecentAnnotation, or b) UserAnnotation.

Parameters:
annotation - Annotation
callback - AsyncCallback of ResponseStatusEnum

getAnnotationListByParagraphId

void getAnnotationListByParagraphId(AnnotationDiscriminatorEnum annotationDiscr,
                                    long paragraphId,
                                    AnnotationAttributeEnum orderAttribute,
                                    SQLSortDirectionEnum sortDirection,
                                    com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> callback)
Will return a List of Annotation object for the row identifier long paragraphId of Paragraph.

Parameters:
annotationDiscr - AnnotationDiscriminatorEnum, discriminator to separate DocentAnnotation and UserAnnotation
paragraphId - long
orderAttribute - AnnotationAttributeEnum
sortDirection - SQLSortDirection
callback - AsyncCallback

getAnnotationListByParaId

void getAnnotationListByParaId(AnnotationDiscriminatorEnum annotationDiscr,
                               long paraId,
                               AnnotationAttributeEnum orderAttribute,
                               SQLSortDirectionEnum sortDirection,
                               com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> callback)
Will return a List of Annotation object for the paragraph identifier long paraId of Paragraph.

Parameters:
annotationDiscr - AnnotationDiscriminatorEnum, discriminator to separate DocentAnnotation and UserAnnotation
paraId - long
orderAttribute - AnnotationAttributeEnum
sortDirection - SQLSortDirection
callback - AsyncCallback

getAnnotationListByParaId

void getAnnotationListByParaId(long paraId,
                               AnnotationAttributeEnum orderAttribute,
                               SQLSortDirectionEnum sortDirection,
                               com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> callback)
Will return a list with all known annotations for long paraId.

Parameters:
paraId - attribute from table annotation
orderAttribute - AnnotationAttributeEnum
sortDirection - SQLSortDirection
callback - AsyncCallback

getOwnershipAnnotationListByParaId

void getOwnershipAnnotationListByParaId(long paraId,
                                        AnnotationAttributeEnum orderAttribute,
                                        SQLSortDirectionEnum sortDirection,
                                        com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> callback)
Will return a list with all known annotations for long paraId and the current session User.

Parameters:
paraId - attribute from table annotation
orderAttribute - AnnotationAttributeEnum
sortDirection - SQLSortDirection
callback - AsyncCallback

getChildAnnotationByAnnotation

void getChildAnnotationByAnnotation(long parentId,
                                    AnnotationAttributeEnum orderAttribute,
                                    SQLSortDirectionEnum sortDirection,
                                    com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> callback)
Will return a List of children Annotation, that are represented as "Answers/Comments" to annotations.

Parameters:
parentId - long annotationId
orderAttribute - AnnotationAttributeEnum
sortDirection - SQLSortDirection
callback - AsyncCallback

deleteAnnotation

void deleteAnnotation(long annotationId,
                      com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
Removes a Annotation and it's children from the database. It's a hard delete. This action cannot be undone.

Parameters:
annotationId - long
callback - AsyncCallback

getNumberResponsesForAnnotation

void getNumberResponsesForAnnotation(long annotationId,
                                     com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Long> callback)
Will return the number of responses to Annotation with long annotationId.

Parameters:
annotationId - long
callback - AsyncCallback

getNumberAnnotationsForParagraph

void getNumberAnnotationsForParagraph(long paraId,
                                      boolean withResponses,
                                      com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Long> callback)
Will return the number of annotations for Paragraph with long paraId. Uses paraId to get the numbers for all versions of a Paragraph. boolean withResponses indicates whether responses shall be included in the calculation.

Parameters:
paraId - long
withResponses - boolean
callback - AsyncCallback

getTopAnnotatedParagraphs

void getTopAnnotatedParagraphs(long lectureId,
                               long limitValue,
                               boolean withResponses,
                               boolean withContents,
                               SQLSortDirectionEnum sortDirection,
                               com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<ParagraphStats>> callback)
Will return a List of ParagraphStats objects that hold a Paragraph and its number of all known annotations. boolean withResponses indicated whether responses to a Annotation shall be included in the calc.

Parameters:
lectureId - long
limitValue - long
withResponses - boolean
withContents - boolean
sortDirection - SQLSortDirectionEnum
callback - AsyncCallback

updateAnnotationPosition

void updateAnnotationPosition(long annotationId,
                              AnnotationStickyPositionEnum position,
                              com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
Will update the position of the Annotation identified by long annotationId. Returns SUCCESS if operation was successful, or FAILURE otherwise.

Parameters:
annotationId - long
position - AnnotationStickyPositionEnum
callback - AsyncCallback