org.sakaiproject.service.legacy.calendar
Interface RecurrenceRule

All Known Implementing Classes:
ExclusionRecurrenceRule, ExclusionSeqRecurrenceRule, RecurrenceRuleBase

public interface RecurrenceRule

RecurrenceRule is the interface for objects which add or remove multiple occurrences of timeranges.

Version:
$Revision: 632 $
Author:
University of Michigan, CHEF Software Development Team

Method Summary
 void excludeInstances(List ranges)
          Remove from the ranges list any RecurrenceInstance excluded by this rule.
 List generateInstances(TimeRange prototype, TimeRange range, TimeZone timeZone)
          Return a List of all RecurrenceInstance objects generated by this rule within the given time range, based on the prototype first range, in time order.
 int getCount()
          Access the number of times that this event should repeat.
 String getFrequencyDescription()
          Access a short text describing the rule's frequency.
 int getInterval()
          Access the number of natural frequency units between repeats.
 Time getUntil()
          Access the end time for recurring events.
 void set(Element el)
          Take values from this xml element
 Element toXml(Document doc, Stack stack)
          Serialize the resource into XML, adding an element to the doc under the top of the stack element.
 

Method Detail

set

public void set(Element el)
Take values from this xml element

Parameters:
el - The xml element.

toXml

public Element toXml(Document doc,
                     Stack stack)
Serialize the resource into XML, adding an element to the doc under the top of the stack element.

Parameters:
doc - The DOM doc to contain the XML (or null for a string return).
stack - The DOM elements, the top of which is the containing element of the new "resource" element.
Returns:
The newly added element.

generateInstances

public List generateInstances(TimeRange prototype,
                              TimeRange range,
                              TimeZone timeZone)
Return a List of all RecurrenceInstance objects generated by this rule within the given time range, based on the prototype first range, in time order.

Parameters:
prototype - The prototype first TimeRange.
range - A time range to limit the generated ranges.
Returns:
a List of RecurrenceInstance generated by this rule in this range.

excludeInstances

public void excludeInstances(List ranges)
Remove from the ranges list any RecurrenceInstance excluded by this rule.

Parameters:
ranges - The list (RecurrenceInstance) of ranges.

getFrequencyDescription

public String getFrequencyDescription()
Access a short text describing the rule's frequency.

Returns:
A frequency description.

getUntil

public Time getUntil()
Access the end time for recurring events.

Returns:
The end time for recurring events.

getCount

public int getCount()
Access the number of times that this event should repeat.

Returns:
The number of times that this event should repeat.

getInterval

public int getInterval()
Access the number of natural frequency units between repeats.

Returns:
The number of natural frequency units between repeats.