org.chronicj
Interface Schedule

All Known Implementing Classes:
DefaultSchedule

public interface Schedule

Represents a coherent collection of logical events that are expected to occur over the course of time. A Schedule is composed of zero or more ScheduleElements which are queried to handle requests for schedule information.

Schedule also provides the public API for adding, editing and removing scheduled events for a given entity.

This class is based directly on patterns described in a paper by Martin Fowler which can be found here.

Author:
Matthew Lipper
See Also:
Recurring Events for Calendars

Method Summary
 void add(org.chronicj.Event anEvent, org.chronicj.TemporalExpression aTemporalExpression)
          Adds an Eventwhose occurance is determined by the given TemporalExpression.
 java.util.List dates(org.chronicj.Event anEvent, org.chronicj.DateRange during)
          Returns a Listof TimePoints on which the supplied event occurs given the specified DateRange.
 boolean isOccuring(org.chronicj.Event anEvent, org.chronicj.DateRange aDateRange)
          Determines if a given event occurs within a particular date range for this schedule.
 boolean isOccuring(org.chronicj.Event anEvent, org.chronicj.TimePoint aTimePoint)
          Determines if a given event occurs during a particular instant in time.
 org.chronicj.TimePoint nextOccurence(org.chronicj.Event anEvent, org.chronicj.TimePoint aTimePoint)
          Returns a TimePointindicating the next occurence of the supplied Eventon or after the given point in time.
 

Method Detail

isOccuring

public boolean isOccuring(org.chronicj.Event anEvent,
                          org.chronicj.TimePoint aTimePoint)
Determines if a given event occurs during a particular instant in time.

Parameters:
anEvent - the Event whose schedule is being queried
aTimePoint - the moment in time
Returns:
a boolean value indicating whether the event occurs during the specified TimePoint

isOccuring

public boolean isOccuring(org.chronicj.Event anEvent,
                          org.chronicj.DateRange aDateRange)
Determines if a given event occurs within a particular date range for this schedule.

Parameters:
anEvent - the Event whose schedule is being queried
aDateRange - the time period in which to check schedule information
Returns:
a boolean value indicating whether the event occurs within the specified DateRange

dates

public java.util.List dates(org.chronicj.Event anEvent,
                            org.chronicj.DateRange during)
Returns a Listof TimePoints on which the supplied event occurs given the specified DateRange.

Parameters:
anEvent - the Event whose schedule is being queried
Returns:
a boolean value indicating whether the event occurs within the specified DateRange

nextOccurence

public org.chronicj.TimePoint nextOccurence(org.chronicj.Event anEvent,
                                            org.chronicj.TimePoint aTimePoint)
Returns a TimePointindicating the next occurence of the supplied Eventon or after the given point in time.

Parameters:
anEvent - the Event whose schedule is being queried
aTimePoint - point in time after which to check the Event's next occurrence.
Returns:
a boolean value indicating whether the event occurs within the specified DateRange

add

public void add(org.chronicj.Event anEvent,
                org.chronicj.TemporalExpression aTemporalExpression)
Adds an Eventwhose occurance is determined by the given TemporalExpression.

Parameters:
anEvent - the Event to add
aTemporalExpression - the date/time(s) when this Event occurs.


Copyright © 2003-2004 Digital Clash Software. All Rights Reserved.