org.jfin.date.holiday
Class HolidayCalendarFactory
- java.lang.Object
-
- org.jfin.date.holiday.HolidayCalendarFactory
-
- Direct Known Subclasses:
- HolidayCalendarFactoryFinancialCalendarImpl, HolidayCalendarFactoryImpl
public abstract class HolidayCalendarFactory extends java.lang.ObjectFactory class for providing a layer of abstraction from the actual implementation of the HolidayCalendar. The default HolidayCalendarFactory only provides for "WE" or weekends. It is expected that integrators will want to reuse an existing service within their organisation to provide an authoratitive reference of holiday calendars. It is not within the scope of jFin to provide this data. Use -HolidayCalendarFactory=ImplementationClass to use a different implementation from the default. If you wish to use more than one concrete implementation of the HolidayCalendarFactory within the same JVM use the static newInstance(String holidayCalendarFactoryClassName) method.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringdefaultHolidayCalendarFactoryClassNamestatic java.lang.StringdefaultHolidayCalendarFactoryClassNameParameter
-
Constructor Summary
Constructors Constructor and Description HolidayCalendarFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract java.lang.String[]getAvailableLocales()abstract HolidayCalendargetHolidayCalendar(java.lang.String locale)Get the HolidayCalendar that represents the locale.HolidayCalendargetHolidayCalendar(java.lang.String[] locales)<T extends Period>
HolidayCalendar<T>getHolidayCalendar(java.lang.String[] locales, java.lang.Class<T> c)Get the HolidayCalendar that represents the locales provided as an array of Strings.abstract <T extends Period>
HolidayCalendar<T>getHolidayCalendar(java.lang.String locale, java.lang.Class<T> c)Get the HolidayCalendar that represents the locales provided as an array of Strings.static HolidayCalendarFactorynewInstance()Get a new instance of the concrete implementation of the HolidayCalendarFactory based upon the System parameter jfin.HolidayCalendarFactory.static HolidayCalendarFactorynewInstance(java.lang.String holidayCalendarFactoryClassName)Create a concrete instance of a HolidayCalendarFactory based upon:
-
-
-
Field Detail
-
defaultHolidayCalendarFactoryClassName
public static java.lang.String defaultHolidayCalendarFactoryClassName
-
defaultHolidayCalendarFactoryClassNameParameter
public static java.lang.String defaultHolidayCalendarFactoryClassNameParameter
-
-
Method Detail
-
newInstance
public static HolidayCalendarFactory newInstance()
Get a new instance of the concrete implementation of the HolidayCalendarFactory based upon the System parameter jfin.HolidayCalendarFactory. If this parameter does not exist then it returns the default concrete implementation org.jfin.date.holiday.defaultimpl.HolidayCalendarFactoryImpl.- Returns:
- The new HolidayCalendarFactory instance
-
newInstance
public static HolidayCalendarFactory newInstance(java.lang.String holidayCalendarFactoryClassName)
Create a concrete instance of a HolidayCalendarFactory based upon:
- The class name in the system property jfin.HolidayCalendarFactory
- And if this doesn't exist:
- Default to org.jfin.date.test.holiday.defaultimpl.HolidayCalendarFactoryImpl
- Returns:
- The default HolidayCalendarProvider
-
getHolidayCalendar
public abstract HolidayCalendar getHolidayCalendar(java.lang.String locale)
Get the HolidayCalendar that represents the locale.
- Parameters:
locale-- Returns:
- The HolidayCalendar for the given Locale
- Throws:
HolidayCalendarException
-
getHolidayCalendar
public abstract <T extends Period> HolidayCalendar<T> getHolidayCalendar(java.lang.String locale, java.lang.Class<T> c)
Get the HolidayCalendar that represents the locales provided as an array of Strings.
- Parameters:
locale-c-- Returns:
- The holiday calendar
-
getHolidayCalendar
public <T extends Period> HolidayCalendar<T> getHolidayCalendar(java.lang.String[] locales, java.lang.Class<T> c)
Get the HolidayCalendar that represents the locales provided as an array of Strings.
- Parameters:
locales-c- the type of the HolidayCalendar to return- Returns:
- The holiday calendar
-
getHolidayCalendar
public HolidayCalendar getHolidayCalendar(java.lang.String[] locales)
-
getAvailableLocales
public abstract java.lang.String[] getAvailableLocales()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG