Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.exchange
Class RecurrencePattern

    java.lang.Object
      com.compoze.exchange.RecurrencePattern

public class RecurrencePattern
extends java.lang.Object

This class contains the parameters for recurring appointments. The following properties control the recurrence behavior:

Property | Description
RecurrenceType | The type of recurrence (daily, weekly, monthly, monthly nth, yearly and yearly nth).
DayOfMonth | The day of the month that the appointment recurs.
DayOfWeekMask | The days of the week that the appointment recurs. See `DaysOfWeek`.
Duration | The duration of the recurring appointment in minutes.
StartTime | The starting time for each occurrence of the appointment.
EndTime | The ending time for each occurrence of the appointment.
Instance | The instance of the day within the month that the appointment recurs.
Interval | The number of recurrence units between recurrences of the appointment.
MonthOfYear | The month of the year on which the appointment recurs.
Occurrences | The number of occurrences in the recurrence pattern.
PatternDates | Sets the start and end dates of the pattern (i.e. the PatternStartDate property is the day on or after which the appointment first recurs and the PatternEndDate is the day on or before which the appointment last recurs).

There is a limit of December 31, 3999 on the pattern start date and 1,489,999 on the occurrences. If either of these properties exceeds its limit, setNoEndDate (true) is automatically called, occurrences is reset to 1,490,000, the pattern end date is reset to the month and day of the pattern start date in the year 4001, and the recurrence pattern is considered to extend infinitely far into the future.

Field Summary
`static RecurrencePattern` | `NONE` This constant represents no recurrence, and may be passed in to clear the recurrence pattern on an existing appointment.

Method Summary
`static RecurrencePattern` | `createDaily(java.util.Date startTime, java.util.Date endTime, int iInterval, boolean bNoEndDate, int iOccurrences, java.util.Date patternStartDate, java.util.Date patternEndDate)` Creates a daily recurrence.
`static RecurrencePattern` | `createMonthly(java.util.Date startTime, java.util.Date endTime, int iDayOfMonth, int iInterval, boolean bNoEndDate, int iOccurrences, java.util.Date patternStartDate, java.util.Date patternEndDate)` Creates a monthly recurrence.
`static RecurrencePattern` | `createMonthlyNth(java.util.Date startTime, java.util.Date endTime, DaysOfWeek daysOfWeek, int iInstance, int iInterval, boolean bNoEndDate, int iOccurrences, java.util.Date patternStartDate, java.util.Date patternEndDate)` Creates a monthly nth recurrence.
`static RecurrencePattern` | `createWeekly(java.util.Date startTime, java.util.Date endTime, DaysOfWeek daysOfWeek, int iInterval, boolean bNoEndDate, int iOccurrences, java.util.Date patternStartDate, java.util.Date patternEndDate)` Creates a weekly recurrence.
`static RecurrencePattern` | `createYearly(java.util.Date startTime, java.util.Date endTime, int iDayOfMonth, int iInterval, int iMonthOfYear, boolean bNoEndDate, int iOccurrences, java.util.Date patternStartDate, java.util.Date patternEndDate)` Creates a yearly recurrence.
`static RecurrencePattern` | `createYearlyNth(java.util.Date startTime, java.util.Date endTime, DaysOfWeek daysOfWeek, int iInstance, int iMonthOfYear, boolean bNoEndDate, int iOccurrences, java.util.Date patternStartDate, java.util.Date patternEndDate)` Creates a yearly nth recurrence.
`int` | `getDayOfMonth()` Gets the day of the month on which the appointment occurs (only valid for `RecurrenceType.MONTHLY` and `RecurrenceType.YEARLY`).
`DaysOfWeek` | `getDaysOfWeek()` Gets the days of the week on which the appointment recurs (only valid for `RecurrenceType.WEEKLY`, `RecurrenceType.MONTHLY_NTH` and `RecurrenceType.YEARLY_NTH`).
`int` | `getDuration()` Gets the duration of the appointment.
`java.util.Date` | `getEndTime()` Gets the end time of the appointment.
`int` | `getInstance()` Gets the instance of the day within the month that the appointment recurs (only valid for `RecurrenceType.MONTHLY_NTH` and `RecurrenceType.YEARLY_NTH`).
`int` | `getInterval()` Gets the number of recurrence units between recurrences of the appointment.
`int` | `getMonthOfYear()` Gets the month of the year on which the appointment recurs (only valid for `RecurrenceType.YEARLY` and `RecurrenceType.YEARLY_NTH`).
`int` | `getOccurrences()` Gets the number of occurrences in the recurrence pattern.
`java.util.Date` | `getPatternEndDate()` Gets the date on or before which the appointment last recurs.
`java.util.Date` | `getPatternStartDate()` Gets the date on or after which the appointment first recurs.
`RecurrenceType` | `getRecurrenceType()` Gets the type of the recurrence.
`java.util.Date` | `getStartTime()` Gets the start time of the event.
`boolean` | `hasNoEndDate()` Returns `true` if the pattern has no end date.
`void` | `setDayOfMonth(int iDayOfMonth)` Sets the day of the month on which the appointment occurs (only valid for `RecurrenceType.MONTHLY` and `RecurrenceType.YEARLY`).
`void` | `setDaysOfWeek(DaysOfWeek daysOfWeek)` Sets the days of the week on which the appointment recurs (only valid for `RecurrenceType.WEEKLY`, `RecurrenceType.MONTHLY_NTH` and `RecurrenceType.YEARLY_NTH`).
`void` | `setEndTime(java.util.Date endTime)` Sets the end time of the appointment.
`void` | `setInstance(int iInstance)` Sets the instance of the day within the month that the appointment recurs (only valid for `RecurrenceType.MONTHLY_NTH` and `RecurrenceType.YEARLY_NTH`).
`void` | `setInterval(int iInterval)` Sets the number of recurrence units between recurrences of the appointment.
`void` | `setMonthOfYear(int iMonthOfYear)` Sets the month of the year on which the appointment recurs (only valid for `RecurrenceType.YEARLY` and `RecurrenceType.YEARLY_NTH`).
`void` | `setNoEndDate(boolean bNoEndDate)` Sets `true` if the pattern has no end date.
`void` | `setOccurrences(int iOccurrences)` Sets the number of occurrences in the recurrence pattern.
`void` | `setPatternEndDate(java.util.Date patternEndDate)` Sets the date on or before which the appointment last recurs.
`void` | `setPatternStartDate(java.util.Date patternStartDate)` Sets the date on or after which the appointment first recurs.
`void` | `setRecurrenceType(RecurrenceType type)` Sets the type of the recurrence.
`void` | `setStartTime(java.util.Date startTime)` Sets the start time of the event.
`java.lang.String` | `toString()` Creates a string representation of the object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NONE

    public static final RecurrencePattern NONE

  This constant represents no recurrence, and may be passed in to clear the recurrence pattern on an existing appointment.

Method Detail

### createDaily

    public static RecurrencePattern createDaily(java.util.Date startTime,
                                                java.util.Date endTime,
                                                int iInterval,
                                                boolean bNoEndDate,
                                                int iOccurrences,
                                                java.util.Date patternStartDate,
                                                java.util.Date patternEndDate)

  Creates a daily recurrence.

  Parameters:
    `startTime` - the start time of the appointment (must not be `null`)
    `endTime` - the end time of the appointment (must not be `null`)
    `iInterval` - sets the number of recurrence units between recurrences in the appointment (`1` is the minimum value)
    `bNoEndDate` - if `true`, then the recurrence has no end date
    `iOccurrences` - the number of occurrences (or `0` to not restrict the end date by number of occurrences)
    `patternStartDate` - the pattern start date (or `null` to start on the date specified in `startTime`)
    `patternEndDate` - the pattern end date (or `null` to not restrict the ending date of the recurrence pattern)

### createWeekly

    public static RecurrencePattern createWeekly(java.util.Date startTime,
                                                 java.util.Date endTime,
                                                 DaysOfWeek daysOfWeek,
                                                 int iInterval,
                                                 boolean bNoEndDate,
                                                 int iOccurrences,
                                                 java.util.Date patternStartDate,
                                                 java.util.Date patternEndDate)

  Creates a weekly recurrence.

  Parameters:
    `startTime` - the start time of the appointment (must not be `null`)
    `endTime` - the end time of the appointment (must not be `null`)
    `daysOfWeek` - the days of the week to recur (or `null` to use the day of the week of the pattern start date)
    `iInterval` - sets the number of recurrence units between recurrences in the appointment (`1` is the minimum value)
    `bNoEndDate` - if `true`, then the recurrence has no end date
    `iOccurrences` - the number of occurrences (or `0` to not restrict the end date by number of occurrences)
    `patternStartDate` - the pattern start date (or `null` to start on the date specified in `startTime`)
    `patternEndDate` - the pattern end date (or `null` to not restrict the ending date of the recurrence pattern)

### createMonthly

    public static RecurrencePattern createMonthly(java.util.Date startTime,
                                                  java.util.Date endTime,
                                                  int iDayOfMonth,
                                                  int iInterval,
                                                  boolean bNoEndDate,
                                                  int iOccurrences,
                                                  java.util.Date patternStartDate,
                                                  java.util.Date patternEndDate)

  Creates a monthly recurrence.

  Parameters:
    `startTime` - the start time of the appointment (must not be `null`)
    `endTime` - the end time of the appointment (must not be `null`)
    `iDayOfMonth` - the day of the month to recur (or `0` to use the day of the month that the pattern starts on)
    `iInterval` - sets the number of recurrence units between recurrences in the appointment (`1` is the minimum value)
    `bNoEndDate` - if `true`, then the recurrence has no end date
    `iOccurrences` - the number of occurrences (or `0` to not restrict the end date by number of occurrences)
    `patternStartDate` - the pattern start date (or `null` to start on the date specified in `startTime`)
    `patternEndDate` - the pattern end date (or `null` to not restrict the ending date of the recurrence pattern)

### createMonthlyNth

    public static RecurrencePattern createMonthlyNth(java.util.Date startTime,
                                                     java.util.Date endTime,
                                                     DaysOfWeek daysOfWeek,
                                                     int iInstance,
                                                     int iInterval,
                                                     boolean bNoEndDate,
                                                     int iOccurrences,
                                                     java.util.Date patternStartDate,
                                                     java.util.Date patternEndDate)

  Creates a monthly nth recurrence. NOTE: monthly nth recurrences can only occur on one day of the week.

  Parameters:
    `startTime` - the start time of the appointment (must not be `null`)
    `endTime` - the end time of the appointment (must not be `null`)
    `daysOfWeek` - the days of the week to recur, which may only be one day (or `null` to use the day of the week of the pattern start date)
    `iInstance` - the instance of the day within the month that the appointment recurs
    `iInterval` - sets the number of recurrence units between recurrences in the appointment (`1` is the minimum value)
    `bNoEndDate` - if `true`, then the recurrence has no end date
    `iOccurrences` - the number of occurrences (or `0` to not restrict the end date by number of occurrences)
    `patternStartDate` - the pattern start date (or `null` to start on the date specified in `startTime`)
    `patternEndDate` - the pattern end date (or `null` to not restrict the ending date of the recurrence pattern)

### createYearly

    public static RecurrencePattern createYearly(java.util.Date startTime,
                                                 java.util.Date endTime,
                                                 int iDayOfMonth,
                                                 int iInterval,
                                                 int iMonthOfYear,
                                                 boolean bNoEndDate,
                                                 int iOccurrences,
                                                 java.util.Date patternStartDate,
                                                 java.util.Date patternEndDate)

  Creates a yearly recurrence.

  Parameters:
    `startTime` - the start time of the appointment (must not be `null`)
    `endTime` - the end time of the appointment (must not be `null`)
    `iDayOfMonth` - the day of the month to recur
    `iInterval` - sets the number of recurrence units between recurrences in the appointment (`1` is the minimum value)
    `iMonthOfYear` - the month of the year
    `bNoEndDate` - if `true`, then the recurrence has no end date
    `iOccurrences` - the number of occurrences (or `0` to not restrict the end date by number of occurrences)
    `patternStartDate` - the pattern start date (or `null` to start on the date specified in `startTime`)
    `patternEndDate` - the pattern end date (or `null` to not restrict the ending date of the recurrence pattern)

### createYearlyNth

    public static RecurrencePattern createYearlyNth(java.util.Date startTime,
                                                    java.util.Date endTime,
                                                    DaysOfWeek daysOfWeek,
                                                    int iInstance,
                                                    int iMonthOfYear,
                                                    boolean bNoEndDate,
                                                    int iOccurrences,
                                                    java.util.Date patternStartDate,
                                                    java.util.Date patternEndDate)

  Creates a yearly nth recurrence.

  Parameters:
    `startTime` - the start time of the appointment (must not be `null`)
    `endTime` - the end time of the appointment (must not be `null`)
    `daysOfWeek` - the days of the week to recur, which may only be one day (or `null` to use the day of the week of the pattern start date)
    `iInstance` - the instance of the day within the month that the appointment recurs
    `iMonthOfYear` - the month of the year
    `bNoEndDate` - if `true`, then the recurrence has no end date
    `iOccurrences` - the number of occurrences (or `0` to not restrict the end date by number of occurrences)
    `patternStartDate` - the pattern start date (or `null` to start on the date specified in `startTime`)
    `patternEndDate` - the pattern end date (or `null` to not restrict the ending date of the recurrence pattern)

### getRecurrenceType

    public RecurrenceType getRecurrenceType()

  Gets the type of the recurrence.

  Returns:
    the recurrence type

### setRecurrenceType

    public void setRecurrenceType(RecurrenceType type)

  Sets the type of the recurrence.

  Parameters:
    `type` - the recurrence type

### getDayOfMonth

    public int getDayOfMonth()

  Gets the day of the month on which the appointment occurs (only valid for `RecurrenceType.MONTHLY` and `RecurrenceType.YEARLY`).

  Returns:
    the day of the month on which the appointment occurs

### setDayOfMonth

    public void setDayOfMonth(int iDayOfMonth)

  Sets the day of the month on which the appointment occurs (only valid for `RecurrenceType.MONTHLY` and `RecurrenceType.YEARLY`).

  Parameters:
    `iDayOfMonth` - the day of the month on which the appointment occurs

### getDaysOfWeek

    public DaysOfWeek getDaysOfWeek()

  Gets the days of the week on which the appointment recurs (only valid for `RecurrenceType.WEEKLY`, `RecurrenceType.MONTHLY_NTH` and `RecurrenceType.YEARLY_NTH`).

  Returns:
    the days of the week on which the appointment recurs

### setDaysOfWeek

    public void setDaysOfWeek(DaysOfWeek daysOfWeek)

  Sets the days of the week on which the appointment recurs (only valid for `RecurrenceType.WEEKLY`, `RecurrenceType.MONTHLY_NTH` and `RecurrenceType.YEARLY_NTH`).

  Parameters:
    `daysOfWeek` - the days of the week on which the appointment recurs

### getDuration

    public int getDuration()

  Gets the duration of the appointment.

  Returns:
    the duration (in minutes)

### getEndTime

    public java.util.Date getEndTime()

  Gets the end time of the appointment.

  Returns:
    the end time

### setEndTime

    public void setEndTime(java.util.Date endTime)

  Sets the end time of the appointment.

  Parameters:
    `endTime` - the end time

### getInstance

    public int getInstance()

  Gets the instance of the day within the month that the appointment recurs (only valid for `RecurrenceType.MONTHLY_NTH` and `RecurrenceType.YEARLY_NTH`).

  Returns:
    the instance of the day within the month that the appointment recurs

### setInstance

    public void setInstance(int iInstance)

  Sets the instance of the day within the month that the appointment recurs (only valid for `RecurrenceType.MONTHLY_NTH` and `RecurrenceType.YEARLY_NTH`).

  Parameters:
    `iInstance` - the instance of the day within the month that the appointment recurs

### getInterval

    public int getInterval()

  Gets the number of recurrence units between recurrences of the appointment.

  Returns:
    the number of recurrence units between recurrences of the appointment

### setInterval

    public void setInterval(int iInterval)

  Sets the number of recurrence units between recurrences of the appointment.

  Parameters:
    `iInterval` - the number of recurrence units between recurrences of the appointment

### getMonthOfYear

    public int getMonthOfYear()

  Gets the month of the year on which the appointment recurs (only valid for `RecurrenceType.YEARLY` and `RecurrenceType.YEARLY_NTH`).

  Returns:
    the month of the year on which the appointment recurs

### setMonthOfYear

    public void setMonthOfYear(int iMonthOfYear)

  Sets the month of the year on which the appointment recurs (only valid for `RecurrenceType.YEARLY` and `RecurrenceType.YEARLY_NTH`).

  Parameters:
    `iMonthOfYear` - the month of the year on which the appointment recurs

### hasNoEndDate

    public boolean hasNoEndDate()

  Returns `true` if the pattern has no end date. If this property is `true`, then `Occurrences` is set to 1490000 and `PatternEndDate` is set to the date of `PatternStartDate` in the year 4001.

### setNoEndDate

    public void setNoEndDate(boolean bNoEndDate)

  Sets `true` if the pattern has no end date. If this property is `true`, then `Occurrences` is set to 1490000 and `PatternEndDate` is set to the date of `PatternStartDate` in the year 4001.

### getOccurrences

    public int getOccurrences()

  Gets the number of occurrences in the recurrence pattern.

  Returns:
    the number of occurrences

### setOccurrences

    public void setOccurrences(int iOccurrences)

  Sets the number of occurrences in the recurrence pattern.

  Parameters:
    `iOccurrences` - the number of occurrences

### getPatternStartDate

    public java.util.Date getPatternStartDate()

  Gets the date on or after which the appointment first recurs.

  Returns:
    the pattern start date

### setPatternStartDate

    public void setPatternStartDate(java.util.Date patternStartDate)

  Sets the date on or after which the appointment first recurs.

### getPatternEndDate

    public java.util.Date getPatternEndDate()

  Gets the date on or before which the appointment last recurs.

  Returns:
    the pattern end date

### setPatternEndDate

    public void setPatternEndDate(java.util.Date patternEndDate)

  Sets the date on or before which the appointment last recurs.

  Parameters:
    `patternEndDate` - the pattern end date

### getStartTime

    public java.util.Date getStartTime()

  Gets the start time of the event.

  Returns:
    the start time of the event

### setStartTime

    public void setStartTime(java.util.Date startTime)

  Sets the start time of the event.

  Parameters:
    `startTime` - the start time of the event

### toString

    public java.lang.String toString()

  Creates a string representation of the object.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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