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

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
All Known Implementing Classes:
ExerciseCommServiceImpl

@RemoteServiceRelativePath(value="ExerciseCommService")
public interface ExerciseCommService
extends com.google.gwt.user.client.rpc.RemoteService

GWT RPC Service for everything related to system object Exercise .

Version:
$LastChangedRevision: 242 $
Author:
Enrico Homann

Nested Class Summary
static class ExerciseCommService.Util
          Utility class for simplifying access to the instance of async service.
 
Method Summary
 ResponseStatusEnum createExercise(Exercise exercise)
          Will create a new Exercise exercise in the database.
 ResponseStatusEnum deleteExercise(Exercise exercise)
          Will hard delete a new Exercise exercise in the database.
 java.util.List<Exercise> getExerciseListBy(long paraId, ExerciseAttributeEnum sortAttribute, SQLSortDirectionEnum sortDirection)
          Will return all Exercise objects for Paragraph identified by long paraId every version.
 ResponseStatusEnum updateExercise(Exercise exercise)
          Will update a new Exercise exercise in the database.
 

Method Detail

getExerciseListBy

java.util.List<Exercise> getExerciseListBy(long paraId,
                                           ExerciseAttributeEnum sortAttribute,
                                           SQLSortDirectionEnum sortDirection)
                                           throws InvalidPermissionException
Will return all Exercise objects for Paragraph identified by long paraId every version. Sorts by using the ExerciseAttributeEnum sortAttribute and SQLSortDirectionEnum sortDirection.

Parameters:
paraId - long
sortAttribute - ExerciseAttributeEnum to be used in ORDER BY SQL Query statement
sortDirection - SQLSortDirectionEnum to be used in ORDER BY SQL Query statement
Returns:
List of Exercise
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

createExercise

ResponseStatusEnum createExercise(Exercise exercise)
                                  throws InvalidPermissionException
Will create a new Exercise exercise in the database. Returns SUCCESS at operation success, and FAILURE at operation failure.

Parameters:
exercise - Exercise
Returns:
ResponseStatusEnum
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

updateExercise

ResponseStatusEnum updateExercise(Exercise exercise)
                                  throws InvalidPermissionException
Will update a new Exercise exercise in the database. Returns SUCCESS at operation success, and FAILURE at operation failure.

Parameters:
exercise - Exercise
Returns:
ResponseStatusEnum
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

deleteExercise

ResponseStatusEnum deleteExercise(Exercise exercise)
                                  throws InvalidPermissionException
Will hard delete a new Exercise exercise in the database. Returns SUCCESS at operation success, and FAILURE at operation failure.

Parameters:
exercise - Exercise
Returns:
ResponseStatusEnum
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.