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


public interface LectureCommServiceAsync

Asynchronous Comm Service interface for everything regarding the system object Filecard.

Version:
$LastChangedRevision: 260 $
Author:
Enrico Homann

Method Summary
 void createNewLecture(Lecture lecture, com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
          Creates a new Lecture on the server.
 void createNewParagraph(long position, long parent, long lecture, java.lang.String title, java.lang.String content, com.google.gwt.user.client.rpc.AsyncCallback<Paragraph> callback)
          Will create a new Paragraph object.
 void deleteLecture(Lecture lecture, com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
          Hard deletes a Lecture and all its dependencies (but the user).
 void deleteParagraph(long paraId, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> callback)
          Will soft-remove a Paragraph identified by long paraId.
 void extractCode(long lectureId, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
          Extracts source code from Lecture identified by long lectureId.
 void getCompleteLecture(long lectureId, com.google.gwt.user.client.rpc.AsyncCallback<Lecture> callback)
          Will return the complete Lecture object for long lectureId.
 void getCompleteParagraph(long paraId, long lectureId, com.google.gwt.user.client.rpc.AsyncCallback<Paragraph> callback)
          Will return a full Paragraph with contents and children and their contents.
 void getLatestVersionOfParagraph(long paraId, com.google.gwt.user.client.rpc.AsyncCallback<Paragraph> callback)
          Will return the latest version of a Paragraph identified by long paraId.
 void getLectureListAll(LectureAttributeEnum sortAttribute, SQLSortDirectionEnum sortDirection, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Lecture>> callback)
          Will return the list with Lecture objects with all known Lecture objects.
 void getLectureListMostAnnotations(SQLSortDirectionEnum sortDirection, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Lecture>> callback)
          Will return the list with Lecture objects, sorted by the most annotations.
 void getLectureListOwnership(LectureAttributeEnum sortAttribute, SQLSortDirectionEnum sortDirection, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Lecture>> callback)
          Will return the list with Lecture objects owned by the current session User.
 void getParagraphHistory(long paraId, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Paragraph>> callback)
          Will return a List of Paragraph with all known versions to Paragraph with long paraId.
 void renderParaAsHTML(java.lang.String para, long lectureId, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
          Renders a Lecture based String para to HTML.
 void updateLectureHeader(Lecture lecture, com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
          Updates the header information of a Lecture without any Paragraphs.
 void updateParagraph(Paragraph para, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> callback)
          Will update a Paragraph object using the values provided by Paragraph para.
 

Method Detail

getCompleteLecture

void getCompleteLecture(long lectureId,
                        com.google.gwt.user.client.rpc.AsyncCallback<Lecture> callback)
Will return the complete Lecture object for long lectureId. Includes paragraphs and their children and Exercise objects.

Parameters:
lectureId - long
callback - AsyncCallback of Lecture

getLatestVersionOfParagraph

void getLatestVersionOfParagraph(long paraId,
                                 com.google.gwt.user.client.rpc.AsyncCallback<Paragraph> callback)
Will return the latest version of a Paragraph identified by long paraId.

Parameters:
paraId - long
callback - AsyncCallback of Paragraph

updateParagraph

void updateParagraph(Paragraph para,
                     com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> callback)
Will update a Paragraph object using the values provided by Paragraph para. Always returns true.

Parameters:
para - Paragraph
callback - AsyncCallback of Boolean

createNewParagraph

void createNewParagraph(long position,
                        long parent,
                        long lecture,
                        java.lang.String title,
                        java.lang.String content,
                        com.google.gwt.user.client.rpc.AsyncCallback<Paragraph> callback)
Will create a new Paragraph object.

Parameters:
position - long
parent - long
lecture - lecture
title - String
content - String
callback - AsyncCallback of Paragraph

getCompleteParagraph

void getCompleteParagraph(long paraId,
                          long lectureId,
                          com.google.gwt.user.client.rpc.AsyncCallback<Paragraph> callback)
Will return a full Paragraph with contents and children and their contents.

Parameters:
paraId - long
lectureId - long
callback - AsyncCallback of Paragraph

deleteParagraph

void deleteParagraph(long paraId,
                     com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> callback)
Will soft-remove a Paragraph identified by long paraId.

Parameters:
paraId - long
callback - AsyncCallback of Boolean

renderParaAsHTML

void renderParaAsHTML(java.lang.String para,
                      long lectureId,
                      com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
Renders a Lecture based String para to HTML. Replaces Editor Tags with valid HTML Tags.

Parameters:
para - String
lectureId - long
callback - AsyncCallback of String

extractCode

void extractCode(long lectureId,
                 com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
Extracts source code from Lecture identified by long lectureId. Will return the URL of the index HTML file to show up the result or null if there was an error.

Parameters:
lectureId - long
callback - AsyncCallback of String

getLectureListAll

void getLectureListAll(LectureAttributeEnum sortAttribute,
                       SQLSortDirectionEnum sortDirection,
                       com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Lecture>> callback)
Will return the list with Lecture objects with all known Lecture objects.

Parameters:
sortAttribute - LectureAttributeEnum attribute to sort for
sortDirection - SQLSortDirectionEnum direction of sorting
callback - AsyncCallback of List of Lecture objects

getLectureListMostAnnotations

void getLectureListMostAnnotations(SQLSortDirectionEnum sortDirection,
                                   com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Lecture>> callback)
Will return the list with Lecture objects, sorted by the most annotations.

Parameters:
sortDirection - SQLSortDirectionEnum direction of sorting
callback - AsyncCallback of List of Lecture objects

getLectureListOwnership

void getLectureListOwnership(LectureAttributeEnum sortAttribute,
                             SQLSortDirectionEnum sortDirection,
                             com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Lecture>> callback)
Will return the list with Lecture objects owned by the current session User.

Parameters:
sortAttribute - LectureAttributeEnum attribute to sort for
sortDirection - SQLSortDirectionEnum direction of sorting
callback - AsyncCallback of List of Lecture objects

createNewLecture

void createNewLecture(Lecture lecture,
                      com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
Creates a new Lecture on the server. Returns SUCCESS if the lecture was created or FAILURE if there was a failure.

Parameters:
lecture - Lecture object
callback - AsyncCallback with ResponseStatusEnum

updateLectureHeader

void updateLectureHeader(Lecture lecture,
                         com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
Updates the header information of a Lecture without any Paragraphs. Returns SUCCESS if the operation was successful, or FAILURE otherwise

Parameters:
lecture - Lecture
callback - AsyncCallback with ResponseStatusEnum

deleteLecture

void deleteLecture(Lecture lecture,
                   com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> callback)
Hard deletes a Lecture and all its dependencies (but the user). Removes Lecture's Paragraphs and their attachements. Returns SUCCESS at successfull operation, or FAILURE at a failure.

Parameters:
lecture - Lecture
callback - AsyncCallback with ResponseStatusEnum

getParagraphHistory

void getParagraphHistory(long paraId,
                         com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Paragraph>> callback)
Will return a List of Paragraph with all known versions to Paragraph with long paraId.

Parameters:
paraId - long
callback - AsyncCallback with List of Paragraph