java.lang.Object
de.focus_shift.jollyday.core.ManagerParameters
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull ManagerParametercreate(@NonNull HolidayCalendar calendar) Uses the holiday calendar based country if it exists or its language otherwise.static @NonNull ManagerParametercreate(@NonNull HolidayCalendar calendar, @Nullable Properties properties) Uses the holiday calendar based country if it exists or its language otherwise.static @NonNull ManagerParameterUses the calendar part as identification for the holidaysstatic @NonNull ManagerParameterUses a given calendar file urlstatic @NonNull ManagerParametercreate(@NonNull URL calendarFileUrl, @Nullable Properties properties) Uses a given calendar file urlstatic @NonNull ManagerParameterUses the locales country if it exists or its language otherwise.static @NonNull ManagerParametercreate(@NonNull Locale locale, @Nullable Properties properties) Uses the locales country if it exists or its language otherwise.static @NonNull ManagerParametercreate(@Nullable String calendarPart, @Nullable Properties properties) Uses the calendar part as identification for the holidays
-
Method Details
-
create
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 @NonNull ManagerParameter create(@Nullable String calendarPart, @Nullable 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
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 @NonNull ManagerParameter create(@NonNull Locale locale, @Nullable 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
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 @NonNull ManagerParameter create(@NonNull HolidayCalendar calendar, @Nullable 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
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 @NonNull ManagerParameter create(@NonNull URL calendarFileUrl, @Nullable 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
-