Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Appendix B Sample Programs : Schedule Samples

Schedule Samples
The example Java source files in examples/schedule_api show how to use the Schedule-related classes of the Configuration Object API.
For details of the code, refer to the Java source files.
ScheduleCreateAndSave.java
This sample shows how to create a simple schedule and save it to a file.
The schedule created contains a period which is in-schedule from 8:00am to 5:59pm every Monday.
ScheduleUsingExclusion.java
This sample creates a schedule named BusinessHourInSummer. The purpose is to show the use of both inclusion and exclusion periods.
This schedule is in-schedule from Monday to Friday, 8:00 AM to 5:59 PM. The hours between 12:00 PM and 2:00 PM in June, July and August are excluded.
This schedule definition uses both inclusion and exclusion period even though the same schedule could be created without using the exclusion period but using a more specific inclusion period.
ScheduleWithPeriodGroup.java
This sample extends ScheduleUsingExclusion to demonstrate the use of PeriodGroup and PeriodGroupReference.
The exclusion period in ScheduleWithPeriodGroup.java is replaced by a period group that specifies the same time period. The resulting schedule contains an exclusion period equivalent to the one in ScheduleUsingExclusion.
ScheduleGetAndSet.java
This sample demonstrates how an application can get and set schedules dynamically on a repository using the Configuration Object API and Console API.
The sample performs the following steps:
1.
2.
3.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved