wrapperEvent = dateSelectEvent;
}
else if(eventName.equals("eventSelect")) {
String selectedEventId = params.get(clientId + "_selectedEventId");
ScheduleEvent selectedEvent = this.getValue().getEvent(selectedEventId);
wrapperEvent = new ScheduleEntrySelectEvent(this, behaviorEvent.getBehavior(), selectedEvent);
}
else if(eventName.equals("eventMove")) {
String movedEventId = params.get(clientId + "_movedEventId");
ScheduleEvent movedEvent = this.getValue().getEvent(movedEventId);
int dayDelta = Integer.valueOf(params.get(clientId + "_dayDelta"));
int minuteDelta = Integer.valueOf(params.get(clientId + "_minuteDelta"));
Calendar calendar = Calendar.getInstance();
calendar.setTime(movedEvent.getStartDate());
calendar.roll(Calendar.DATE, dayDelta);
movedEvent.getStartDate().setTime(calendar.getTimeInMillis());
calendar = Calendar.getInstance();
calendar.setTime(movedEvent.getEndDate());
calendar.roll(Calendar.DATE, dayDelta);
movedEvent.getEndDate().setTime(calendar.getTimeInMillis());
wrapperEvent = new ScheduleEntryMoveEvent(this, behaviorEvent.getBehavior(), movedEvent, dayDelta, minuteDelta);
}
else if(eventName.equals("eventResize")) {
String resizedEventId = params.get(clientId + "_resizedEventId");
ScheduleEvent resizedEvent = this.getValue().getEvent(resizedEventId);
int dayDelta = Integer.valueOf(params.get(clientId + "_dayDelta"));
int minuteDelta = Integer.valueOf(params.get(clientId + "_minuteDelta"));
Calendar calendar = Calendar.getInstance();
calendar.setTime(resizedEvent.getEndDate());
calendar.roll(Calendar.DATE, dayDelta);
resizedEvent.getEndDate().setTime(calendar.getTimeInMillis());
wrapperEvent = new ScheduleEntryResizeEvent(this, behaviorEvent.getBehavior(), resizedEvent, dayDelta, minuteDelta);
}
wrapperEvent.setPhaseId(behaviorEvent.getPhaseId());