/** This method prepares view to reset filtered dates and sorts them by the scheduled date. */ public void resetFilterDatesView() { for (CommitteeScheduleBase committeeSchedule : getSortedCommitteeScheduleList()) { committeeSchedule.setFilter(true); } getScheduleData().setFilterStartDate(null); getScheduleData().setFilerEndDate(null); }
/** * Helper method prepares a view for deleteable CommitteeSchedules, sorted by the scheduled date. */ private void prepareCommitteeScheduleDeleteView() { boolean flag = false; CommitteeScheduleServiceBase service = getCommitteeScheduleService(); for (CommitteeScheduleBase committeeSchedule : getSortedCommitteeScheduleList()) { flag = service.isCommitteeScheduleDeletable(committeeSchedule); committeeSchedule.setDelete(flag); } }
public List<Boolean> canViewSpecificSchedule() { List<Boolean> canViewSchedule = new ArrayList<Boolean>(); for (CommitteeScheduleBase committeeSchedule : getCommittee().getCommitteeSchedules()) { CommitteeTaskBase task = getNewCommitteeScheduleTaskInstanceHook( TaskName.VIEW_SCHEDULE, committeeSchedule.getParentCommittee(), committeeSchedule); canViewSchedule.add(getTaskAuthorizationService().isAuthorized(getUserIdentifier(), task)); } return canViewSchedule; }
/** * This method prepares a view to filter dates between start and end date, sorted by the scheduled * date. * * @param startDate * @param endDate */ public void prepareFilterDatesView(java.util.Date startDate, java.util.Date endDate) { startDate = DateUtils.addDays(startDate, -1); endDate = DateUtils.addDays(endDate, 1); java.util.Date scheduleDate = null; for (CommitteeScheduleBase committeeSchedule : getSortedCommitteeScheduleList()) { scheduleDate = committeeSchedule.getScheduledDate(); if ((scheduleDate != null) && scheduleDate.after(startDate) && scheduleDate.before(endDate)) { committeeSchedule.setFilter(true); } else { committeeSchedule.setFilter(false); } } }