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 Summary
ConstructorDescriptionSurveyClassroomIntrusionHandler
(TimezoneResolverService timezoneResolverService, CascadingDeleteService deleteService) -
Method Summary
Modifier and TypeMethodDescriptionreturns the relation for which this handler is registreredhandleCreate
(org.joda.time.LocalDate from, org.joda.time.LocalDate to) 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 executedreturns a task which is then executed for a classroom will usually delete all intrusions that were created for a classroom
-
Constructor Details
-
SurveyClassroomIntrusionHandler
public SurveyClassroomIntrusionHandler(TimezoneResolverService timezoneResolverService, CascadingDeleteService deleteService)
-
-
Method Details
-
getRelation
Description copied from interface:ClassroomIntrusionHandler
returns the relation for which this handler is registrered- Specified by:
getRelation
in interfaceClassroomIntrusionHandler
-
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 interfaceClassroomIntrusionHandler
- Parameters:
from
- the start of the intrusionto
- the end of the intrusion- Returns:
- a task with the classroom as the argument and the return value
-
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 interfaceClassroomIntrusionHandler
- Returns:
- a task with the classroom as the argument and the return value
-