use of org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.activitycalendar.WeekProfile in project open-smart-grid-platform by OSGP.
the class SetActivityCalendarRequestBuilder method getWeekType.
private WeekType getWeekType(final String weekName) {
final WeekType wt = new WeekType();
final WeekProfile wp = this.activityCalendar.getWeekProfiles().get(weekName);
wt.setWeekProfileName(wp.getName());
wt.setMonday(this.getDayType(wp.getMondayDayId()));
wt.setTuesday(this.getDayType(wp.getTuesdayDayId()));
wt.setWednesday(this.getDayType(wp.getWednesdayDayId()));
wt.setThursday(this.getDayType(wp.getThursdayDayId()));
wt.setFriday(this.getDayType(wp.getFridayDayId()));
wt.setSaturday(this.getDayType(wp.getSaturdayDayId()));
wt.setSunday(this.getDayType(wp.getSundayDayId()));
return wt;
}
use of org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.activitycalendar.WeekProfile in project open-smart-grid-platform by OSGP.
the class BundledSetActivityCalendarSteps method theActivityCalendarContainsAWeekProfile.
@Given("^the activity calendar contains a week profile$")
public void theActivityCalendarContainsAWeekProfile(final Map<String, String> parameters) throws Throwable {
final ActivityCalendar activityCalendar = (ActivityCalendar) ScenarioContext.current().get(PlatformSmartmeteringKeys.ACTIVITY_CALENDAR);
final String name = parameters.get(PlatformSmartmeteringKeys.WEEK_PROFILE_NAME);
final int monday = Integer.parseInt(parameters.get(PlatformSmartmeteringKeys.WEEK_PROFILE_MONDAY_DAY_ID));
final int tuesday = Integer.parseInt(parameters.get(PlatformSmartmeteringKeys.WEEK_PROFILE_TUESDAY_DAY_ID));
final int wednesday = Integer.parseInt(parameters.get(PlatformSmartmeteringKeys.WEEK_PROFILE_WEDNESDAY_DAY_ID));
final int thursday = Integer.parseInt(parameters.get(PlatformSmartmeteringKeys.WEEK_PROFILE_THURSDAY_DAY_ID));
final int friday = Integer.parseInt(parameters.get(PlatformSmartmeteringKeys.WEEK_PROFILE_FRIDAY_DAY_ID));
final int saturday = Integer.parseInt(parameters.get(PlatformSmartmeteringKeys.WEEK_PROFILE_SATURDAY_DAY_ID));
final int sunday = Integer.parseInt(parameters.get(PlatformSmartmeteringKeys.WEEK_PROFILE_SUNDAY_DAY_ID));
final WeekProfile profile = new WeekProfile(name, monday, tuesday, wednesday, thursday, friday, saturday, sunday);
activityCalendar.getWeekProfiles().put(name, profile);
ScenarioContext.current().put(PlatformSmartmeteringKeys.ACTIVITY_CALENDAR, activityCalendar);
}
Aggregations