de.hs_rm.cs.lecturenotes.server.core.transport.service
Class ExerciseCommServiceImpl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by de.hs_rm.cs.lecturenotes.server.core.transport.service.ExerciseCommServiceImpl
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, ExerciseCommService, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public final class ExerciseCommServiceImpl
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements ExerciseCommService

GWT RPC Service Servlet for everything relevant to paragraph exercises.

Version:
$LastChangedRevision: 265 $
Author:
Enrico Homann
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.hs_rm.cs.lecturenotes.client.core.transport.service.ExerciseCommService
ExerciseCommService.Util
 
Constructor Summary
ExerciseCommServiceImpl()
           
 
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.
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
getSerializationPolicy, processCall, processPost
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExerciseCommServiceImpl

public ExerciseCommServiceImpl()
Method Detail

getExerciseListBy

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

Specified by:
getExerciseListBy in interface ExerciseCommService
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

public ResponseStatusEnum createExercise(Exercise exercise)
                                  throws InvalidPermissionException
Description copied from interface: ExerciseCommService
Will create a new Exercise exercise in the database. Returns SUCCESS at operation success, and FAILURE at operation failure.

Specified by:
createExercise in interface ExerciseCommService
Parameters:
exercise - Exercise
Returns:
ResponseStatusEnum
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

updateExercise

public ResponseStatusEnum updateExercise(Exercise exercise)
                                  throws InvalidPermissionException
Description copied from interface: ExerciseCommService
Will update a new Exercise exercise in the database. Returns SUCCESS at operation success, and FAILURE at operation failure.

Specified by:
updateExercise in interface ExerciseCommService
Parameters:
exercise - Exercise
Returns:
ResponseStatusEnum
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

deleteExercise

public ResponseStatusEnum deleteExercise(Exercise exercise)
                                  throws InvalidPermissionException
Description copied from interface: ExerciseCommService
Will hard delete a new Exercise exercise in the database. Returns SUCCESS at operation success, and FAILURE at operation failure.

Specified by:
deleteExercise in interface ExerciseCommService
Parameters:
exercise - Exercise
Returns:
ResponseStatusEnum
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.