- java.lang.Object
-
- de.focus_shift.jollyday.core.ManagerParameters
-
public final class ManagerParameters extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ManagerParametercreate(HolidayCalendar calendar)Uses the holiday calendar based country if it exists or its language otherwise.static ManagerParametercreate(HolidayCalendar calendar, Properties properties)Uses the holiday calendar based country if it exists or its language otherwise.static ManagerParametercreate(String calendarPart)Uses the calendar part as identification for the holidaysstatic ManagerParametercreate(String calendarPart, Properties properties)Uses the calendar part as identification for the holidaysstatic ManagerParametercreate(URL calendarFileUrl)Uses a given calendar file urlstatic ManagerParametercreate(URL calendarFileUrl, Properties properties)Uses a given calendar file urlstatic ManagerParametercreate(Locale locale)Uses the locales country if it exists or its language otherwise.static ManagerParametercreate(Locale locale, Properties properties)Uses the locales country if it exists or its language otherwise.
-
-
-
Method Detail
-
create
public static ManagerParameter create(String calendarPart)
Uses the calendar part as identification for the holidaysExample:
final ManagerParameter parameters = ManagerParameters.create("de");- Parameters:
calendarPart- The calendar part to create parameters from.- Returns:
- an
CalendarPartManagerParameterbased onManagerParameter
-
create
public static ManagerParameter create(String calendarPart, Properties properties)
Uses the calendar part as identification for the holidaysExample:
final ManagerParameter parameters = ManagerParameters.create("de", properties);- Parameters:
calendarPart- The calendar part to create parameters from.properties- Additional properties- Returns:
- an
CalendarPartManagerParameterbased onManagerParameter
-
create
public static ManagerParameter create(Locale locale)
Uses the locales country if it exists or its language otherwise.Example:
final ManagerParameter parameters = ManagerParameters.create(Locale.GERMANY, properties);
- Parameters:
locale- The locale to create parameters from.- Returns:
- an
CalendarPartManagerParameterbased onManagerParameter
-
create
public static ManagerParameter create(Locale locale, Properties properties)
Uses the locales country if it exists or its language otherwise.Example:
final ManagerParameter parameters = ManagerParameters.create(Locale.GERMANY, properties);
- Parameters:
locale- The locale to create parameters from.properties- Additional properties- Returns:
- an
CalendarPartManagerParameterbased onManagerParameter
-
create
public static ManagerParameter create(HolidayCalendar calendar)
Uses the holiday calendar based country if it exists or its language otherwise.Example:
final ManagerParameter parameters = ManagerParameters.create(HolidayCalendar.GERMANY);
- Parameters:
calendar- A specificHolidayCalendarto create parameters from.- Returns:
- an
CalendarPartManagerParameterbased onManagerParameter
-
create
public static ManagerParameter create(HolidayCalendar calendar, Properties properties)
Uses the holiday calendar based country if it exists or its language otherwise.Example:
final ManagerParameter parameters = ManagerParameters.create(HolidayCalendar.GERMANY, properties);
- Parameters:
calendar- A specificHolidayCalendarto create parameters from.properties- Additional properties- Returns:
- an
CalendarPartManagerParameterbased onManagerParameter
-
create
public static ManagerParameter create(URL calendarFileUrl)
Uses a given calendar file urlExample:
final ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); final URL url = classLoader.getResource("Holidays_de.xml"); final ManagerParameter parameters = ManagerParameters.create(url);- Parameters:
calendarFileUrl- A specific calendar fileURLto create parameters from.- Returns:
- an
CalendarPartManagerParameterbased onManagerParameter
-
create
public static ManagerParameter create(URL calendarFileUrl, Properties properties)
Uses a given calendar file urlExample:
final ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); final URL url = classLoader.getResource("Holidays_de.xml"); final ManagerParameter parameters = ManagerParameters.create(url, properties);- Parameters:
calendarFileUrl- A specific calendar fileURLto create parameters from.properties- Additional properties- Returns:
- an
CalendarPartManagerParameterbased onManagerParameter
-
-