Class ManagerParameters

java.lang.Object
de.focus_shift.jollyday.core.ManagerParameters

public final class ManagerParameters extends Object
  • Method Details

    • create

      public static @NonNull ManagerParameter create(@NonNull String calendarPart)
      Uses the calendar part as identification for the holidays

      Example:

      final ManagerParameter parameters = ManagerParameters.create("de");
      Parameters:
      calendarPart - The calendar part to create parameters from.
      Returns:
      an CalendarPartManagerParameter based on ManagerParameter
    • create

      public static @NonNull ManagerParameter create(@Nullable String calendarPart, @Nullable Properties properties)
      Uses the calendar part as identification for the holidays

      Example:

      final ManagerParameter parameters = ManagerParameters.create("de", properties);
      Parameters:
      calendarPart - The calendar part to create parameters from.
      properties - Additional properties
      Returns:
      an CalendarPartManagerParameter based on ManagerParameter
    • create

      public static @NonNull ManagerParameter create(@NonNull 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 CalendarPartManagerParameter based on ManagerParameter
    • 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 CalendarPartManagerParameter based on ManagerParameter
    • create

      public static @NonNull ManagerParameter create(@NonNull 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 specific HolidayCalendar to create parameters from.
      Returns:
      an CalendarPartManagerParameter based on ManagerParameter
    • 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 specific HolidayCalendar to create parameters from.
      properties - Additional properties
      Returns:
      an CalendarPartManagerParameter based on ManagerParameter
    • create

      public static @NonNull ManagerParameter create(@NonNull URL calendarFileUrl)
      Uses a given calendar file url

      Example:

         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 file URL to create parameters from.
      Returns:
      an CalendarPartManagerParameter based on ManagerParameter
    • create

      public static @NonNull ManagerParameter create(@NonNull URL calendarFileUrl, @Nullable Properties properties)
      Uses a given calendar file url

      Example:

         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 file URL to create parameters from.
      properties - Additional properties
      Returns:
      an CalendarPartManagerParameter based on ManagerParameter