Organizational Calendar
When an Ebase system is installed within a
particular organization that organization has the option of defining a calendar
for that organization. This calendar defines the various days of a year
that represent working days. This information is used, for example, in
defining workflow escalations in the Workflow
Management System.
The essential idea of the organizational calendar is that it
contains knowledge of which days are non-working days. All other days
except inference are seen as working days.
There are two ways of defining non-working days:
The rest of this document provides more details of the rest
of the calendar system. Information is provided on configuration
of the Ebase system in order to define the implicit definitions and how the
user may add explicit definitions using
the user interface.
The basic approach to configuration of the calendar system
with implicit dates is that the implementing organization should write one or
more Java classes that implement the Holiday
interface. When the system is initialised each of these classes will be given a
chance to add its particular definitions to the calendar system.
In common with the rest of the Ebase system these
definitions are enabled by editing the UFSSetup.properties file. The relevant
part of the properties file should appear like this:
Ufs.HolidayClassNames=<comma separated list of
holiday class names>
For example, the properties file could contain:
Ufs.HolidayClassNames=com.company.calendar.Weekends,com.company.calendar.BankHolidays
Each of the classes in this list should implement the
As an example of all this, a particular implementation of a
holiday class could be:
/** Test implementation of holiday interface */
public class AprilSaturdays implements
{
public AprilSaturdays()
{
}
public void addDates(OrganisationCalendar
calendar, IUFSServletContextProxy
proxy)
throws PersistenceException
{
calendar.addNonWorkingDay(2006,
4, 8, "saturday");
calendar.addNonWorkingDay(2006,
4, 15, "saturday");
calendar.addNonWorkingDay(2006,
4, 22, "saturday");
calendar.addNonWorkingDay(2006,
4, 29, "saturday");
}
}
Note that the addNonWorkingDay
operation allows the code to pass in a “rule” which defines the type of
non-working day being defined. This string is not processed by the system
in any way, but it appears in tool-tips in the user interface so it is a good
idea to make it a meaningful string.
The Ebase user can make explicit
definitions of non working days by selecting from the tools menu (Tools
-> Calendar).
Implicit definitions are configured
programmatically, as described here, and will appear
in green. Implicit definitions are not manually editable in the calendar.
Special non-working days such as local holidays, company picnics, etc, can be added manually by selecting the date and optionally adding a description to it. To add a description, right click over the selected date and select “Set description”. This will display an edit box into which you can enter the description and then click OK.
Once configured, these dates will be used
to calculate time intervals when expressed as a number of working days from a
given point in time.