Class SurveyClassroomIntrusionHandler

java.lang.Object
ch.tocco.nice2.optional.classroomsurvey.impl.handlers.SurveyClassroomIntrusionHandler
All Implemented Interfaces:
ClassroomIntrusionHandler

@Component public class SurveyClassroomIntrusionHandler extends Object implements ClassroomIntrusionHandler
used to create and delete intrusions for Survey entities with a Classroom additional to a Survey_intrusion entity, the authors on a survey are set to the admins and moderators of the classroom
  • Constructor Details

  • Method Details

    • getRelation

      public String getRelation()
      Description copied from interface: ClassroomIntrusionHandler
      returns the relation for which this handler is registrered
      Specified by:
      getRelation in interface ClassroomIntrusionHandler
    • handleCreate

      public PersistTask<Entity,Entity> handleCreate(org.joda.time.LocalDate from, org.joda.time.LocalDate to)
      Description copied from interface: ClassroomIntrusionHandler
      returns a task which is then executed for a classroom will usually create a intrusion entity of some kind for the User entities on a Classroom note: from and to can be null when calling this method, but will never be null when the task is actually executed
      Specified by:
      handleCreate in interface ClassroomIntrusionHandler
      Parameters:
      from - the start of the intrusion
      to - the end of the intrusion
      Returns:
      a task with the classroom as the argument and the return value
    • handleDelete

      public PersistTask<Entity,Entity> handleDelete()
      Description copied from interface: ClassroomIntrusionHandler
      returns a task which is then executed for a classroom will usually delete all intrusions that were created for a classroom
      Specified by:
      handleDelete in interface ClassroomIntrusionHandler
      Returns:
      a task with the classroom as the argument and the return value