public class DefaultHolidayManager extends HolidayManager
| Modifier and Type | Field and Description |
|---|---|
protected de.jollyday.config.Configuration |
configuration
Configuration parsed on initialization.
|
calendarUtil| Constructor and Description |
|---|
DefaultHolidayManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
doInit()
Initializes the DefaultHolidayManager by loading the holidays XML file as resource
from the classpath.
|
CalendarHierarchy |
getCalendarHierarchy()
Returns the configured hierarchy structure for the specific manager.
|
Set<Holiday> |
getHolidays(int year,
String... args)
Returns the holidays for the requested year and hierarchy structure.
|
Set<Holiday> |
getHolidays(LocalDate startDateInclusive,
LocalDate endDateInclusive,
String... args)
Returns the holidays for the requested interval and hierarchy structure.
|
protected static void |
logHierarchy(de.jollyday.config.Configuration c,
int level)
Logs the hierarchy structure.
|
protected static void |
validateConfigurationHierarchy(de.jollyday.config.Configuration c)
Validates the content of the provided configuration by checking for
multiple hierarchy entries within one configuration.
|
clearManagerCache, getConfigurationDataSource, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getManagerParameter, getSupportedCalendarCodes, init, isHoliday, isHoliday, isManagerCachingEnabled, setConfigurationDataSource, setManagerCachingEnabledprotected de.jollyday.config.Configuration configuration
public Set<Holiday> getHolidays(int year, String... args)
Set<LocalDate> getHolidays(int year, Configuration c, String... args)
with the configuration from initialization.getHolidays in class HolidayManageryear - i.e. 2010args - i.e. args = {'ny'}. returns US/New York holidays. No args ->
holidays common to whole countrypublic Set<Holiday> getHolidays(LocalDate startDateInclusive, LocalDate endDateInclusive, String... args)
getHolidays(year, args) for each year within the
interval and returns a list of holidays which are then contained in the
interval.getHolidays in class HolidayManagerstartDateInclusive - the start date of the interval in which holidays lie, inclusiveendDateInclusive - the end date of the interval in which holidays lie, inclusiveargs - a String object.public void doInit()
doInit in class HolidayManagerprotected static void logHierarchy(de.jollyday.config.Configuration c,
int level)
c - Configuration to log hierarchy for.level - a int.protected static void validateConfigurationHierarchy(de.jollyday.config.Configuration c)
c - a Configuration object.public CalendarHierarchy getCalendarHierarchy()
getCalendarHierarchy in class HolidayManagerCopyright © 18.01.2010–2015. All rights reserved.