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

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.FilecardCommServiceImpl
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, FilecardCommService, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public final class FilecardCommServiceImpl
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements FilecardCommService

Comm Service for entity Filecard.

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.FilecardCommService
FilecardCommService.Util
 
Constructor Summary
FilecardCommServiceImpl()
           
 
Method Summary
 ResponseStatusEnum activateFilecard(long filecardId, boolean bActivate)
          Will activate or deactivate a Filecard for printing.
 ResponseStatusEnum createFilecard(Filecard entity)
          Will create a new Slide exercise in the database.
 ResponseStatusEnum deleteFilecard(Filecard entity)
          Will hard delete a new Slide exercise in the database.
 java.util.List<Filecard> getActivatedFilecardListBy(long paraId, FilecardAttributeEnum sortAttribute, SQLSortDirectionEnum sortDirection)
          Will return all activated Filecard objects for Paragraph identified by long paraId every version.
 java.util.List<Filecard> getAllActivatedFilecardListBy(long lectureId, FilecardAttributeEnum sortAttribute, SQLSortDirectionEnum sortDirection)
          Will return all activated Filecard objects for Lecture identified by long lectureId.
 java.util.List<Filecard> getOwnershipFilecardListBy(long paraId, FilecardAttributeEnum sortAttribute, SQLSortDirectionEnum sortDirection)
          Will return all Slide objects for Paragraph identified by long paraId every version.
 java.util.List<Filecard> getPendingFilecardListBy(long paraId, FilecardAttributeEnum sortAttribute, SQLSortDirectionEnum sortDirection)
          Will return all Slide objects for Paragraph identified by long paraId every version.
 ResponseStatusEnum updateFilecard(Filecard entity)
          Will update a new Filecard entity 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

FilecardCommServiceImpl

public FilecardCommServiceImpl()
Method Detail

getActivatedFilecardListBy

public java.util.List<Filecard> getActivatedFilecardListBy(long paraId,
                                                           FilecardAttributeEnum sortAttribute,
                                                           SQLSortDirectionEnum sortDirection)
                                                    throws InvalidPermissionException
Description copied from interface: FilecardCommService
Will return all activated Filecard objects for Paragraph identified by long paraId every version. Sorts by using the SlideAttributeEnum sortAttribute and SQLSortDirectionEnum sortDirection.

Specified by:
getActivatedFilecardListBy in interface FilecardCommService
Parameters:
paraId - long
sortAttribute - SlideAttributeEnum to be used in ORDER BY SQL Query statement
sortDirection - SQLSortDirectionEnum to be used in ORDER BY SQL Query statement
Returns:
List of Slide
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

getPendingFilecardListBy

public java.util.List<Filecard> getPendingFilecardListBy(long paraId,
                                                         FilecardAttributeEnum sortAttribute,
                                                         SQLSortDirectionEnum sortDirection)
                                                  throws InvalidPermissionException
Description copied from interface: FilecardCommService
Will return all Slide objects for Paragraph identified by long paraId every version. Sorts by using the SlideAttributeEnum sortAttribute and SQLSortDirectionEnum sortDirection.

Specified by:
getPendingFilecardListBy in interface FilecardCommService
Parameters:
paraId - long
sortAttribute - SlideAttributeEnum to be used in ORDER BY SQL Query statement
sortDirection - SQLSortDirectionEnum to be used in ORDER BY SQL Query statement
Returns:
List of Slide
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

getOwnershipFilecardListBy

public java.util.List<Filecard> getOwnershipFilecardListBy(long paraId,
                                                           FilecardAttributeEnum sortAttribute,
                                                           SQLSortDirectionEnum sortDirection)
                                                    throws InvalidPermissionException
Description copied from interface: FilecardCommService
Will return all Slide objects for Paragraph identified by long paraId every version. Sorts by using the SlideAttributeEnum sortAttribute and SQLSortDirectionEnum sortDirection.

Specified by:
getOwnershipFilecardListBy in interface FilecardCommService
Parameters:
paraId - long
sortAttribute - SlideAttributeEnum to be used in ORDER BY SQL Query statement
sortDirection - SQLSortDirectionEnum to be used in ORDER BY SQL Query statement
Returns:
List of Slide
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

createFilecard

public ResponseStatusEnum createFilecard(Filecard entity)
                                  throws InvalidPermissionException
Description copied from interface: FilecardCommService
Will create a new Slide exercise in the database. The Filecard will have set the activated flag to FALSE. Returns SUCCESS at operation success, and FAILURE at operation failure.

Specified by:
createFilecard in interface FilecardCommService
Parameters:
entity - Filecard
Returns:
ResponseStatusEnum
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

updateFilecard

public ResponseStatusEnum updateFilecard(Filecard entity)
                                  throws InvalidPermissionException
Description copied from interface: FilecardCommService
Will update a new Filecard entity in the database. This method does only allow the update of question and answer. Only the owner of the Filecard is allowed to update. Returns SUCCESS at operation success, and FAILURE at operation failure.

Specified by:
updateFilecard in interface FilecardCommService
Parameters:
entity - Slide
Returns:
ResponseStatusEnum
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

deleteFilecard

public ResponseStatusEnum deleteFilecard(Filecard entity)
                                  throws InvalidPermissionException
Description copied from interface: FilecardCommService
Will hard delete a new Slide exercise in the database. Returns SUCCESS at operation success, and FAILURE at operation failure.

Specified by:
deleteFilecard in interface FilecardCommService
Parameters:
entity - Slide
Returns:
ResponseStatusEnum
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

activateFilecard

public ResponseStatusEnum activateFilecard(long filecardId,
                                           boolean bActivate)
                                    throws InvalidPermissionException
Description copied from interface: FilecardCommService
Will activate or deactivate a Filecard for printing. Only the Docent is allowed change the activate state of a Filecard ssociated with his Lecture. Returns SUCCESS in case of a successful operation, or FAILURE otherwise.

Specified by:
activateFilecard in interface FilecardCommService
Parameters:
filecardId - long
bActivate - boolean
Returns:
ResponseStatusEnum
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.

getAllActivatedFilecardListBy

public java.util.List<Filecard> getAllActivatedFilecardListBy(long lectureId,
                                                              FilecardAttributeEnum sortAttribute,
                                                              SQLSortDirectionEnum sortDirection)
                                                       throws InvalidPermissionException
Description copied from interface: FilecardCommService
Will return all activated Filecard objects for Lecture identified by long lectureId. Sorts by using the SlideAttributeEnum sortAttribute and SQLSortDirectionEnum sortDirection.

Specified by:
getAllActivatedFilecardListBy in interface FilecardCommService
Parameters:
lectureId - long
sortAttribute - FilecardAttributeEnum
sortDirection - SQLSortDirectionEnum
Returns:
List of Filecard
Throws:
InvalidPermissionException - Thrown if caller has not the correct permissions.