Compoze Software, Inc.

com.compoze.collab.exchange
Class RecurrencePattern


java.lang.Object

  |

  +--com.compoze.collab.exchange.RecurrencePattern

Direct Known Subclasses:
AppointmentRecurrencePattern, TaskRecurrencePattern

public class RecurrencePattern
extends java.lang.Object

This class is used as a base class for Exchange recurrence patterns.

Recurrence patterns are not necessarily static upon calling any of the createXXX methods. After a pattern is created, it is internally normalized. This is done because the recurrence pattern must contain fields for number of occurrences and end date, even if those fields are not used directly by the pattern. Normalization also adjusts start pattern start dates to make sure it falls on the pattern. So for example, creating a weekly pattern with a start date on Tuesday with a day mask of Wednesday will alter the start date to the next available Wednesday to match the pattern.

Additionally, if creating a monthly or yearly pattern with DayOfMonth or MonthOfYear set to zero, those fields will be reset to the day or month of the pattern start date. In other words, calling getDayOfMonth() will not return zero.


Method Summary
 int getDayOfMonth()
          Gets the day of the month for the pattern (only valid for RecurrenceTypeEnum.MONTHLY and RecurrenceTypeEnum.YEARLY)
 DaysOfWeek getDaysOfWeek()
          Gets the days of the week mask for the recurrence (only valid for RecurrenceTypeEnum.WEEKLY, RecurrenceTypeEnum.MONTHLY_NTH and RecurrenceTypeEnum.YEARLY_NTH).
 RecurrenceEndType getEndType()
          Gets the end type of the pattern.
 RecurrenceInstance getInstance()
          Gets the instance of the day within the period (only valid for RecurrenceTypeEnum.MONTHLY_NTH and RecurrenceTypeEnum.YEARLY_NTH).
 int getInterval()
          Gets the number of recurrence units between instances.
 int getMonthOfYear()
          Gets the month of year for the pattern (only valid for types RecurrenceTypeEnum.YEARLY and RecurrenceTypeEnum.YEARLY_NTH).
 int getOccurrences()
          Gets the number of occurrences in the pattern.
 java.util.Date getPatternEndDate()
          Gets the date of the last recurring instance.
 java.util.Date getPatternStartDate()
          Gets the date of the first recurring instance.
 RecurrenceType getType()
          Gets the type of the recurrence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDayOfMonth


public int getDayOfMonth()
Gets the day of the month for the pattern (only valid for RecurrenceTypeEnum.MONTHLY and RecurrenceTypeEnum.YEARLY)
Returns:
the day of the month the task occurs

getDaysOfWeek


public DaysOfWeek getDaysOfWeek()
Gets the days of the week mask for the recurrence (only valid for RecurrenceTypeEnum.WEEKLY, RecurrenceTypeEnum.MONTHLY_NTH and RecurrenceTypeEnum.YEARLY_NTH).
Returns:
the days of week mask

getInstance


public RecurrenceInstance getInstance()
Gets the instance of the day within the period (only valid for RecurrenceTypeEnum.MONTHLY_NTH and RecurrenceTypeEnum.YEARLY_NTH).
Returns:
the instance, or null if not set

getInterval


public int getInterval()
Gets the number of recurrence units between instances.
Returns:
the number of units between instances

getMonthOfYear


public int getMonthOfYear()
Gets the month of year for the pattern (only valid for types RecurrenceTypeEnum.YEARLY and RecurrenceTypeEnum.YEARLY_NTH).
Returns:
the month of the year the appointment recurs

getOccurrences


public int getOccurrences()
Gets the number of occurrences in the pattern.
Returns:
the number of occurrences

getPatternStartDate


public java.util.Date getPatternStartDate()
Gets the date of the first recurring instance. Date values have no time associated with them since time information is stored separate from date information. The time portion of the returned date should be ignored. The date value is stored in GMT. Applying a timezone to the date is incorrect, and may cause the day to shift.
Returns:
the pattern start date

getPatternEndDate


public java.util.Date getPatternEndDate()
Gets the date of the last recurring instance. Date values have no time associated with them since time information is stored separate from date information. The time portion of the returned date should be ignored. The date value is stored in GMT. Applying a timezone to the date is incorrect, and may cause the day to shift.
Returns:
the pattern end date

getType


public RecurrenceType getType()
Gets the type of the recurrence.
Returns:
the recurrence type

getEndType


public RecurrenceEndType getEndType()
Gets the end type of the pattern.
Returns:
the end type of the pattern

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.