Method for scheduling holidays in distributed computer enterprise locales6275810Abstract A scheduling method operative in association with a display device of a data processing system connected in a distributed computing environment having nodes located across geographically-dispersed boundaries. The method begins by defining a set of holiday objects corresponding to a set of holidays specific to a given locale. The calendar, together with at least one holiday defined by at least one of the set of holiday objects, are then selectively displayed. A management task (e.g., a software load distribution) is then initiated to take place during a given holiday in the locale to minimize disruption to the computer enterprise. Claims What is claimed is: Description BACKGROUND OF THE INVENTION
String sHolidayName // name of the holiday
Vector vLocales // vector of a locale the
holiday is effective in; if
null, it is worldwide
int iCalGroup // calendar style group
long IStartDate // starting date and time
UTC
long IEndDate // ending date and time UTC
boolean fSunset // the holiday follows a
sunset rule (.sub.--------
holidays)
boolean fRepeating // regularly repeating
boolean fOptional // optional holiday
UFCFormula formulaHoliday // the formula for the
holiday
The capture of the beginning and ending dates of the holiday allows the definition to describe events that span more than one day. As noted above, this function is provided using the Holiday Dialog Panel 48 and, in particular, the Start and Stop fields 51 and 53. Also, because observance of some religious holidays begin with sundown and ends with sunrise, the present invention enables the administrator to also capture the initiation of a given holiday with respect to a portion of the day. Thus, for example, Jewish holidays normally begin on sundown. A display calendar running on a managed computer in Israel would thus illustrate a typical holiday as beginning at sunset on a given day and then ending on a subsequent day. Thus, two or more days would then be illustrated and displayed as a holiday as shown in FIG. 8. The capture of start and stop time using the object-oriented holiday class construct thus is quite advantageous. Where such information is not specified, however, the default definition of a holiday preferably is one day beginning at 00:00 GMT and ending at the beginning of the following day. Using the GUI calendar preferences and the class, particular holidays may be defined to be effective on a worldwide basis or only in certain locales. The vector vLocales defined in the holiday class preferably contains the list of locales supported in the distributed computer enterprise environment. Thus, for example, if the managed region includes computers operative in the United States, the United Kingdom and Italy, the vector would include appropriate data identifying those countries. As has been discussed above and illustrated in FIG. 7, holidays are denoted on the visible calendar (e.g., running on an endpoint computer) by a (user configurable) color change from normal days. The calendar will also display the holiday name in the textbox 71 as previously described. As previously described, a default file is loaded as a resource if the calendar is loaded in a locale that is unsupported. This file preferably contains no holidays so the calendar will not have any holidays displayed. This default operation prevents inappropriate displaying of holidays that are not observed in the locale. For example, U.S. Independence Day (July 4th) is not displayed if the calendar is invoked on a non-U.S. endpoint computer, say, in an Egyptian locale. Using the calendar preferences dialog (FIGS. 5D and 6), however, the users in other locales can create their own list of holidays. The present invention is conveniently implemented in Java. As is known in the art, Java is an object-oriented, multi-threaded, portable, platform-independent, secure programming environment used to develop, test and maintain software programs. These programs include full-featured interactive, standalone applications, as well as smaller programs, known as applets, that executed by a Java virtual machine (JVM). The basic calendar functionality (called UFCalendar for convenience only) preferably is implemented with the currently available Sun Java Development Kit (JDK 1.1.6) and the Java Foundation Classes (JFC 1.0.2). Familiarity with those resources is presumed in the following discussion. In particular, the calendar functionality described herein is based upon the Java Calendar abstract base class and uses the Java Gregorian calendar class. Other calendars (e.g., the Hijri and Hebrew calendars) are preferably implemented with subclasses provided by the former Taligent Inc. until such time as Sun provides the classes to support those calendar systems with the JDK. According to the invention, a Java class file (e.g., CalendarHolidays_en_US.java) contains the basic list of legal holidays for the United States of America. Other holidays may be added by individual administrators using the Add Holiday Dialog as previously described. Supported locales add their own list of holidays during translation. Other holidays may be added by administrators later. The present invention provides numerous advantages. It provides a calendar usable world-wide, presented in a culturally correct format. It is fully internalized and enabled for all locales and languages supported by the distributed computer enterprise. It provides a user-configurable, locale independent holiday listing. It provides locale-sensitive classes for date and time formatting. The invention further provides a means for selecting single and multiple dates from a graphical representation of a monthly calendar. Multiple calendar styles are supported, and the calendar supports runtime switching between all calendar styles. As noted above, the calendar adapts its display to the conventions of the locale in which it is being run or the stored preferences of the administrator. FIG. 9 illustrates a flowchart showing the runtime switching functionality of the present invention. The routine begins at step 60 with the creation of a first set of holiday objects that define a set of holidays for a first locale of the distributed computing environment. Continuing with the above example, the first locale is assumed to be a location within the United States, and thus the first set of holiday objects include conventional U.S. holidays; e.g., New Year's Day, Martin Luther King Day, Memorial Day, Independence Day, and the like. Step 60 involves defining an object for each holiday using the class structure described above. The resulting file is saved. At step 62, the administrator creates a second set of holiday objects for a second locale in which the distributed computer environment is managed. Thus, for example, this locale is assumed to be Italy, with the appropriate local holidays then defined in the manner previously described. These local holidays (defined by the class objects) are then stored. At step 64, a display method is invoked to display the calendar. At step 66, a test is run to determine whether the locale in which the calendar is to be displayed has an associated holiday file listing. If the outcome of the test at step 66 is negative, the routine branches to step 68 to display a default holiday file listing, i.e. a listing with no holidays included. This step ensures that non-local holidays are not displayed by mistake or in a manner that might otherwise offend local culture or custom. If, however, the outcome of the test at step 68 indicates that the calendar has an associated holiday file listing, the routine continues at step 70 to retrieve the file. The holidays are then selectively displayed at step 72. By "selectively", it is meant that a given holiday is displayed on the calendar if it occurs in the given time period (e.g., a "month") being then currently displayed. Of course, date/holiday information may be displayed in other than monthly cycles. At step 74, a test is run repeatedly to determine whether the locale has been changed. If the outcome of the test is negative, the routine cycles. If, however, the result of the test at step 74 indicates that the locale has changed, the routine returns to step 66 and repeats the above-described steps. This processing provides runtime switching between selected sets of holiday objects that comprise the individual locale-specific calendars. The inventive holiday calendar is useful to provide support for all significant calendar systems in use in the business world today. As is well-known, the Gregorian calendar is the primary calendar in world-wide business use. It is a solar calendar with a 365 day year, with leap year rules adjusting for variations in the Earth's rotational speed. The Gregorian calendar is a derivative of the Julian calendar using expanded leap year rules to compensate for differences between the solar year and the calendar year length. According to the invention, Gregorian is the default calendar displayed if no calendar style is specified. The Gregorian calendar also implements the proper leap year rules to be year 2000 (Y2K) compliant. Referring now back to FIG. 7, as noted above, the days of the week are displayed in the calendar in a locale-specific context. Thus, the day names preferably are loaded from Java-supplied resource bundles and are derived from the current locale setting or the stored administrator preferences of locale and language. The beginning day of the week for the set locale is also honored. The days are abbreviated where permitted by language and locale and calendar style. As illustrated in FIG. 5A, the calendar preferences panel enables the user to select the default calendar style of the calendar. Selecting different types of calendars alters the options available as well as the default first days. With reference to FIG. 5A, the following are the options that apply to the selected calendar style. The following options apply to the selected calendar style. Display eras--Add the era to the year display Abbreviated days--Show days as abbreviated or in full on the days of the week controls This option is disabled if the calendar style is Hijri, Hebrew or Japanese Era. Abbreviated months--Show months as abbreviated or in full on the month control. This option is disabled if the calendar style is Hijri, Hebrew or Japanese Era. Display bi-directionally--Allows Hijri or Hebrew calendars to be displayed in a left to right form, Constrain date selection--Allows selection of dates prior to the current date. Minimum days in the first week--Number of days that compose a complete first week of the month. An array of radio buttons is provided to allow the user to set the first day of the week shown on the calendar. This element is set by the current locale. The default setting is the Java default for the current locale. Referring now to FIG. 5B, the date panel allows the administrator to select preferences for the display of time zone, formal and informal date format. The following options are preferably available: Time Zone--Select the time zone that you wish to use for date calculation. Dates are stored as an offset from GMT. Formal date format--The display mask that the user wishes to use for formatting the formal (long) date display. The format varies by locale. SHORT is completely numeric, such as 12.13.52 or 3:30pm MEDIUM is longer, such as Jan 12, 1952 LONG is longer, such as January 12, 1952 or 3:30:32pm FULL is pretty completely specified, such as Tuesday, April 12, 1952 AD or 3:30:42pm PST. Formal date format example--An example of the formal (long) date display. Informal date format--The display mask that the user wishes to use for formatting the informal (short) date display. Tracking and storing changes to user configurable aspects of the calendar is preferably done by preserving the alterations in a serialized file. The calendar preference class (CalendarPrefs.class) encapsulates all of the preferences.
//Calendar preference properties:
public int ivCalStyle; //preferred calendar
style
public TimeZone ivCalTZ; //local timezone
public TimeZone ivUTCTZ; //UTC timezone
public SimpleDateFormat ivFormalDateFormat; //LONG, SHORT,
MEDIUM or LONG
public SimpleDateFormat ivInformalDateFormat; // LONG, SHORT,
MEDIUM or LONG
public int ivFirstDayOfWeek; //first day of the
week
public int ivMinFirstDaysInWeek; //minimal days -
first week
public Vector ivWeekend; //days of the
weekend
public boolean ivEras; //display eras
public boolean ivAbbDays; //abbreviated days
public boolean ivAbbMonths; //abbreviated
months
public boolean ivAbbAllowed; //abbreviations
allowed
public boolean ivDisplayBIDI; //display Bi-
directionally
public boolean ivConstrain //date constraining
on
public Point ivSetDateLocation; //Set date dialogue
location
public Dimension ivSetDateSize; //Set date dialogue
size
public Point ivAddHolidayLocation; //Add holiday
dialogue location
public Dimension ivAddHolidaySize; //Add holiday
dialogue size
public Point ivPreferencesLocation; //Preferences
dialogue location
public Dimension ivPreferencesSize; //Preferences
dialogue size
Preferences for calendar styles:
//Gregorian calendars
//AL_GREGORIAN && CAL_GREGORIAN_WRAP
//Hijri calendar
//CAL_HIJRI_ARABIC && CAL_HIJRI_ARABIC_EN &&
CAL_HIJRI_HINDI
public int ivHijriFirstDayOfweek; //first day of the week
public Vector ivHijriWeekend; //days of the weekend
//Hebrew
//CAL_HEBREW && CAL_HEBREW_EN
public int ivHebrewFirstDayOfWeek; //first day of the week
public Vector ivHebrewWeekend; //days of the weekend
//Japanese era
// CAL_JAPANESE_ERA && CAL_JAPANESE_ERA_EN
Component Files: The following components of UFCalendar may be obtained from a calendar file system:
AddHolidayDialog.java Dialogue to add a holiday to the
serialized holiday list
CalendarPrefs.java Calendar preferences
DatePanel.java Date style panel for preferences
dialogue
DefineHolidayPanel Dialogue to create a holiday
FormulaPanel Dialogue for specifying holiday
repetition
HebrewCalendar.java Hebrew calendar class
HijriCalendar.java Hijri calendar class
HolidayPanel.java Holiday panel for preferences dialogue
PrefPanel.java Color panel for preferences dialogue
SetDateDialog.java Set the calendar date dialogue
StylePanel.java Style panel for preferences dialogue
UFCalendar.java The main calendar class
UFCalendarButton.java A popup calendar button
UFCalendarField.java Calendar field class
UFCalendarFormula Class definition for holiday formula
UFCalendarHoliday.java Calendar holiday class
UFCalendarJapanEra.java Japanese Era calendar class
UFCalendarListener.java Calendar listener class
UFCalendarMultiField.java Calendar Multi-field class
UFCalendarPrefs.java Calendar preferences class
UFPopupWindow.java Popup window for UFCalendar button
TCal.java Driver for testing calendar
The following resources of UFCalendar may be obtained from a resource file system:
CalendarHolidays.java Holidays list default (no holidays)
CalendarHolidays_en_US.java USA holidays list
CalendarJapanEras.java Japanese eras
CalendarResources.java Calendar human language data
CalendarSymbols.java Element of calendar to utilize
LanguageResources.java Language resources.
The following framework dependencies may be obtained from the file system:
UFResourceLoader Framework resource loaded
UFExceptionHandler Exception handler for framework.
IString International strings
Calendar Constructors: The calendar implements a variety of constructors for creation. For complete details on the constructors, reference may be made to the Javadoc html file. UFCalendar ( ) Default parameter less constructor for creating the calendar as a bean. UFCalendar (boolean fAddPopupMenu) Constructs a calendar using the current time in the default time zone with the default locale. The user must specify a frame for the calendar and a boolean value for addition of the popup menu. UFCalendar (int iCalendarType, boolean fAddPopupMenu) Constructs a calendar using the default time in the default time zone with the default locale. The user must specify a panel for the calendar, a calendar style and a boolean value for addition of the popup menu. UFCalendar (boolean fAddPopupMenu, boolean fAddMonthSel, boolean fAddYearSel) Constructs a calendar using the default time in the default time zone with the default locale. The user must specify a panel for the calendar, a boolean value for addition of the popup menu, a boolean value for addition or deletion of the month selector and a boolean value for the addition or deletion of the year selector. UFCalendar (boolean fAddPopupMenu, Locale loc) Constructs a calendar using the default time in the default time zone with the provided locale. The user must specify a panel for the calendar, a calendar style and a locale of the calendar. UFCalendar (boolean fAddPopupMenu, Date pDate) Constructs a calendar using the provided date. The user must specify a panel for the calendar, a boolean value for addition of the popup menu, and a date for the intial calendar date. UFCalendar (boolean fAddPopupMenu, Locale loc, Date pDate, TimeZone Tz) Constructs a calendar using the provided locale, date, and TimeZone. The user must specify a panel for the calendar, a locale value, a date for the initial calendar date and a timezone. Programmable Interface (APIs): This section outlines the methods that may be programmatically set in the UFCalendar. These methods are for programs to invoke at runtime. Detailed usage information can be obtained from the Javadoc html file for UFCalendar.
setDate
Sets the calendar's date. The calendar will display the month
that contains the passed Gregorian Java date irrespective of the
style of the calendar.
public void seDat(Date dt)
get Date
Return the calendar's currently selected date.
public Date getDate ( )
setSelectedDays
Set the vector of selected days.
public void getSelectedDays(Vector v)
getSelectedDays
Return the vector of selected days.
public Vector getSelectedDays ( )
setYear
Set the year.
public void setYear (int iYr)
getYear
Return the currently selected year.
public int getYear ( )
setMonth
Return the currently selected month
public int getMonth ( )
setMultiSelect
Allow multiple selection of dates.
public void setMultiSelect(boolean fMulti)
goToDate
Go to date.
public void goToDate(Date dt)
setTimeZone
Set the time zone.
public void setTimeZone (TimeZone tzID)
getTimeZone
Set the time zone.
public TimeZone getTimeZone ( )
setLocale
Set the locale.
public void setLocale (Locale loc)
getLocale
Return the locale.
public Locale getLocale ( )
setCalendarStyle
Set the calendar style, with one of the following constants used.
CAL_GREGORIAN Gregorian calendar (default)
CAL_GREGORIAN_WRAP Gregorian calendar, wrapped head to
tail
CAL_JAPANESE_ERA Japanese Era calendar
CAL_JAPANESE_ERA_EN Japanese Era calendar in Romanji
CAL_HIJRI_ARABIC Hijri calendar, Arabic numerals
CAL_HIJRI_ARABIC_EN Hijri calendar English, Arabic numerals
CAL_HIJRI_HINDI Hijri calendar, Hindi numerals
CAL_HEBREW Hebrew calendar
CAL_HEBREW_EN Hebrew, English transliteration
CAL_CHINESE_LUNAR Chinese Lunar calendar
CAL_CHINESE_TAIWAN Chinese Taiwan Era calendar
CAL_ISO ISO commercial calendar
CAL_JULIAN Julian calendar
CAL_SCALIGER Scaliger calendar
Creating Calendars Creating a Calendar in a Panel To display a calendar in a panel; invoke the following constructor, and register a PropertyChangeListener to notify the application of date selection events. boolean fAddMenu=true; UFCalendar UFCal=new UFCalendar(fAddMenu); Creating a Calendar Date Field To display a calendar field in a panel; invoke the following constructor, and register a PropertyChangeListener to notify your application of date selection events. UFCalendarField dateField=new UFCalendarField(); Creating a Multiple Date Selection Calendar To display a calendar multiple selection field in a panel invoke the following constructor, and register a PropertyChangeListener to notify your application of date selection events. UFCalendarMultiField dateField=new UFCalendarMultiField(); Translation to Other Languages The calendar component is designed to be as simple as possible and to contain all text for translation to a small number of files. Items Not Translated Day and Month Names The month names and day of the week names are loaded from Java resources, the calendar does not contain any of this text. Thus, no translation of these items is necessary, all languages and locales supported by Java will display correct weekday and month names without translation. Japanese Era, Hebrew and Hijri Calendars The weekday and month names for Japanese Era, Hebrew and Hijri calendar are stored in the resource bundle CalendarSymbols.java. This file preferably does not require translation as they are always presented in the original languages. Holidays Add the holidays that are used in your locale. The format is date as mm/dd/yyyy and holiday name. The text of the names for holidays and the dates are stored in a resource named CalendarHolidays_+(language code)+_+(country code). Thus holidays for the United States of America are stored in the file CalendarHolidays_en_US.java. For the Italian languages and locale, the file should be named CalendarHolidays_it_IT.java. The translator must create this file. Use CalendarHolidays_en_US.java as a template for the file. One of ordinary skill in the art will appreciate that the inventive holiday calendar is adapted for display on a display device of a data processing system. One such system is illustrated in FIG. 10 and includes system unit 112, display device 114, keyboard 116, mouse 118 and printer 120. The system unit 112 receives data for processing from input devices such as keyboard 116 and mouse 118, or via networking interfaces (not illustrated). Mouse 118 is preferably used in conjunction with a graphical user interface (GUI) in which hardware and software system objects, including data processing system components and application programs, are controlled through the selection and manipulation of associated graphical objects displayed on display device 114. To support storage and retrieval of data, system unit 112 further includes diskette drive 122, hard disk drive 123, and CD-ROM drive 124, which are connected to system unit 112 in a well-known manner. Data processing system may be diskless, otherwise known as a network computer. One of ordinary skill will appreciate that a "holiday" as envisioned by the present invention should not be limited to a holiday in the legal or political sense of the word (e.g., a U.S. legal holiday such as Independence Day). Generalizing, a "holiday" should be broadly construed to cover any given type of event that may be designated by the administrator or a third party to have local significance in the locale (even though the event may not have significance in some other locale in which the managed region is supported). Thus, the present invention thus may also be used to display locale-sensitive information besides legal holidays. For example, given locales may designate certain days of the calendar for carrying out given management or other operations. One of ordinary skill will also appreciate that the present invention has particular utility in the scheduling of management tasks in a distributed computer environment to take advantage of local-specific holidays. Thus, for example, assume a system administrator determines that a particular software load is to be distributed to multiple offices (namely, managed nodes) located across multinational environments. One node is located in the United States while another is located in Italy. Using the calendar display mechanism described above, the administrator may selectively display the U.S. and Italian versions of the calendar (see, e.g., FIGS. 4A and 4B) and thus determine an appropriate date/time for the software distribution. As noted above, each of the locale-specific calendars will display local holidays during which the distribution may take place without interfering with existing work or network usage. Moreover, using the locale-specific calendaring techniques disclosed herein, the administrator may easily identify particular holidays that are specific to the managed node. A company operating across multinational environments thus may readily schedule events around such holidays and be assured that such events do not otherwise impact operations. As a result, the distributed computing enterprise environment is more efficiently managed and run. The holiday calendar is useful to plan the initiation of any particular management task that may be required to manage the distributed computer enterprise environment. Such management tasks typically include software load distribution, resource management and/or inventory, network configuration, network administration, and the like. The term "management task" should thus be broadly construed. One of the preferred implementations of the invention is as a set of instructions in a code module resident in the random access memory of a computer. Until required by the computer, the set of instructions may be stored in another computer memory, for example, in a hard disk drive, or in a removable memory such as an optical disk (for eventual use in a CD ROM) or floppy disk (for eventual use in a floppy disk drive), or even downloaded via the Internet. In addition, although the various methods described are conveniently implemented in a general purpose computer selectively activated or reconfigured by software, one of ordinary skill in the art would also recognize that such methods may be carried out in hardware, in firmware, or in more specialized apparatus constructed to perform the required method steps. Further, although the invention has been described in terms of a preferred embodiment in a specific network environment, those skilled in the art will recognize that the invention can be practiced, with modification, in other and different network architectures with the spirit and scope of the appended claims. Having thus described our invention, what we claim as new and desire to secure by letters patent is set forth in the following claims:
|
Same subclass Same class Consider this |
||||||||||
