use of org.mifos.application.meeting.util.helpers.WeekDay in project head by mifos.
the class ViewOrganizationSettingsServiceFacadeWebTier method getWorkingDays.
private String getWorkingDays() {
List<WeekDay> workDaysList = new FiscalCalendarRules().getWorkingDays();
List<String> workDayNames = new ArrayList<String>();
for (WeekDay workDay : workDaysList) {
String weekdayName = ApplicationContextProvider.getBean(MessageLookup.class).lookup(workDay.getPropertiesKey());
workDay.setWeekdayName(weekdayName);
workDayNames.add(workDay.getName());
}
return StringUtils.join(workDayNames, DELIMITER);
}
use of org.mifos.application.meeting.util.helpers.WeekDay in project head by mifos.
the class ViewOrganizationSettingsServiceFacadeWebTier method getOffDays.
private String getOffDays() {
List<Short> offDaysList = new FiscalCalendarRules().getWeekDayOffList();
List<String> offDayNames = new ArrayList<String>();
for (Short offDayNum : offDaysList) {
WeekDay weekDay = WeekDay.getWeekDay(offDayNum);
String weekdayName = ApplicationContextProvider.getBean(MessageLookup.class).lookup(weekDay.getPropertiesKey());
weekDay.setWeekdayName(weekdayName);
offDayNames.add(weekDay.getName());
}
return StringUtils.join(offDayNames, DELIMITER);
}
use of org.mifos.application.meeting.util.helpers.WeekDay in project head by mifos.
the class CustomerServiceImpl method updateMeeting.
private boolean updateMeeting(final MeetingBO oldMeeting, final MeetingBO updatedDetails) throws CustomerException {
boolean isRegenerationOfSchedulesRequired = false;
try {
if (oldMeeting.isWeekly()) {
oldMeeting.setMeetingStartDate(updatedDetails.getMeetingStartDate());
WeekDay dayOfWeek = updatedDetails.getMeetingDetails().getWeekDay();
isRegenerationOfSchedulesRequired = oldMeeting.isDayOfWeekDifferent(dayOfWeek);
oldMeeting.update(dayOfWeek.getValue(), updatedDetails.getMeetingPlace());
oldMeeting.update(dayOfWeek, updatedDetails.getMeetingPlace());
} else if (oldMeeting.isDaily()) {
isRegenerationOfSchedulesRequired = false;
oldMeeting.update(updatedDetails.getMeetingPlace());
} else if (oldMeeting.isMonthlyOnDate()) {
isRegenerationOfSchedulesRequired = oldMeeting.isDayOfMonthDifferent(updatedDetails.getMeetingDetails().getDayNumber());
oldMeeting.update(updatedDetails.getMeetingDetails().getDayNumber(), updatedDetails.getMeetingPlace());
} else if (oldMeeting.isMonthly()) {
RankOfDay rankOfday = updatedDetails.getMeetingDetails().getWeekRank();
// WeekDay weekOfMonth = WeekDay.getWeekDay(updatedDetails.getMonthWeek());
WeekDay weekOfMonth = updatedDetails.getMeetingDetails().getWeekDay();
isRegenerationOfSchedulesRequired = oldMeeting.isWeekOfMonthDifferent(rankOfday, weekOfMonth);
oldMeeting.update(weekOfMonth, rankOfday, updatedDetails.getMeetingPlace());
}
} catch (MeetingException me) {
throw new CustomerException(me);
}
return isRegenerationOfSchedulesRequired;
}
use of org.mifos.application.meeting.util.helpers.WeekDay in project head by mifos.
the class SavingsScheduleIntegrationTest method weekDaysToPropertyString.
private String weekDaysToPropertyString(List<WeekDay> weekDays) {
String propertyString = "";
Boolean first = true;
for (WeekDay day : weekDays) {
if (!first) {
propertyString = propertyString + ",";
} else {
first = false;
}
propertyString = propertyString + day.toString();
}
return propertyString;
}
use of org.mifos.application.meeting.util.helpers.WeekDay in project head by mifos.
the class CenterScheduleCreationUsingCustomerServiceIntegrationTest method weekDaysToPropertyString.
private String weekDaysToPropertyString(List<WeekDay> weekDays) {
String propertyString = "";
Boolean first = true;
for (WeekDay day : weekDays) {
if (!first) {
propertyString = propertyString + ",";
} else {
first = false;
}
propertyString = propertyString + day.toString();
}
return propertyString;
}
Aggregations