|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.collab.domino.RepeatPattern
This class represents the repeating pattern. A repeating
pattern defines how a calendar item or task repeats, for example, daily.
Use the methods starting with create
to
create common repeating patterns.
Field Summary | |
static int |
BYWEEK_FIFTH
The value that represents the 'fifth week'. |
static int |
BYWEEK_FIRST
The value that represents the 'first week'. |
static int |
BYWEEK_FOURTH
The value that represents the 'fourth week'. |
static int |
BYWEEK_SECOND
The value that represents the 'second week'. |
static int |
BYWEEK_THIRD
The value that represents the 'third week'. |
static int |
FRIDAY
The value that represents the day Friday. |
static int |
MONDAY
The value that represents the day Monday. |
static int |
SATURDAY
The value that represents the day Saturday. |
static int |
SUNDAY
The value that represents the day Sunday. |
static int |
THURSDAY
The value that represents the day Thursday. |
static int |
TUESDAY
The value that represents the day Tuesday. |
static int |
UPDATE_ALL
The value that represents the update all rule. |
static int |
UPDATE_THIS_INSTANCE
The value that represents the update this instance rule. |
static int |
WEDNESDAY
The value that represents the day Wednesday. |
Constructor Summary | |
RepeatPattern(ISession session,
RepeatType type,
java.util.Date startDate,
int iInterval,
java.util.Date untilDate,
RepeatForUnit forUnit,
int iFor,
RepeatWeekends weekends,
java.util.Date[] customDates,
RepeatAdjust adjust)
Constructor. |
Method Summary | |
static RepeatPattern |
createCustom(ISession session,
java.util.Date[] dates)
Creates a custom repeating pattern. |
static RepeatPattern |
createDaily(ISession session,
java.util.Date startDate,
int iInterval,
RepeatWeekends weekends,
java.util.Date untilDate)
Creates a daily repeating pattern. |
static RepeatPattern |
createDaily(ISession session,
java.util.Date startDate,
int iInterval,
RepeatWeekends weekends,
RepeatForUnit forUnit,
int iFor)
Creates a daily repeating pattern. |
static RepeatPattern |
createMonthlyByDate(ISession session,
java.util.Date startDate,
int iInterval,
int[] daysOfMonth,
RepeatWeekends weekends,
java.util.Date untilDate)
Creates a monthly by date repeating pattern. |
static RepeatPattern |
createMonthlyByDate(ISession session,
java.util.Date startDate,
int iInterval,
int[] daysOfMonth,
RepeatWeekends weekends,
RepeatForUnit forUnit,
int iFor)
Creates a monthly by date repeating pattern. |
static RepeatPattern |
createMonthlyByDay(ISession session,
java.util.Date startDate,
int iInterval,
int[] daysOfWeek,
RepeatWeekends weekends,
java.util.Date untilDate)
Creates a monthly by day repeating pattern. |
static RepeatPattern |
createMonthlyByDay(ISession session,
java.util.Date startDate,
int iInterval,
int[] daysOfWeek,
RepeatWeekends weekends,
RepeatForUnit forUnit,
int iFor)
Creates a monthly by day repeating pattern. |
static RepeatPattern |
createWeekly(ISession session,
java.util.Date startDate,
int iInterval,
int[] daysOfWeek,
RepeatWeekends weekends,
java.util.Date untilDate)
Creates a weekly repeating pattern. |
static RepeatPattern |
createWeekly(ISession session,
java.util.Date startDate,
int iInterval,
int[] daysOfWeek,
RepeatWeekends weekends,
RepeatForUnit forUnit,
int iFor)
Creates a weekly repeating pattern. |
static RepeatPattern |
createYearly(ISession session,
java.util.Date startDate,
int iInterval,
RepeatWeekends weekends,
java.util.Date untilDate)
Creates a yearly repeating pattern. |
static RepeatPattern |
createYearly(ISession session,
java.util.Date startDate,
int iInterval,
RepeatWeekends weekends,
RepeatForUnit forUnit,
int iFor)
Creates a yearly repeating pattern. |
RepeatAdjust |
getAdjust()
Gets the adjust for the repeat pattern. |
static java.lang.String |
getDayByNumber(int iDay)
Gets the localized string for a day. |
static java.lang.String |
getDayByNumber(int iDay,
int iFieldWidth,
java.util.Calendar cal,
java.util.Locale locale)
Gets the localized string for a day. |
static java.lang.String |
getDayByNumber(int iDay,
java.util.Locale locale)
Gets the localized string for a day. |
int |
getFor()
Gets the repeat pattern for. |
RepeatForUnit |
getForUnit()
Gets the repeat pattern for unit. |
RepeatHow |
getHow()
Gets the repeat pattern how. |
java.util.Date[] |
getInstanceDates()
Gets a list of the dates for the repeat pattern. |
int |
getInterval()
Gets the repeat pattern interval. |
Key[] |
getKeys()
Gets a list of the values from the repeat pattern. |
RepeatPattern |
getPatternInstance(java.util.Date startDate)
Gets a new instance of the repeat pattern with the new start date. |
RepeatPattern |
getPatternInstance(java.util.Date startDate,
java.util.Date untilDate)
Gets a new instance of the repeat pattern with the new start date. |
RepeatWeekends |
getRepeatWeekends()
Gets the repeat pattern weekends. |
java.util.Date |
getStartDate()
Gets the start date for the repeat pattern. |
RepeatType |
getType()
Gets the repeat pattern type. |
java.util.Date |
getUntilDate()
Gets the until date for the repeat pattern. |
java.util.List |
getValues()
Gets a list of the values from the repeat pattern. |
IValue[] |
getValuesArray()
Gets a list of the values from the repeat pattern. |
void |
setStartDate(java.util.Date startDate)
Sets the start date for the repeat pattern. |
static void |
sliceDates(java.util.Date instanceDate,
java.util.Date[] dates,
java.util.List previousDates,
java.util.List futureDates)
Slices the specified dates into previous and future dates using the instance date. |
java.lang.String |
toString()
Returns the string representation of this object. |
void |
updateDigest(java.security.MessageDigest digest)
Updates the specified MessageDigest with the object's internal state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int BYWEEK_FIRST
public static final int BYWEEK_SECOND
public static final int BYWEEK_THIRD
public static final int BYWEEK_FOURTH
public static final int BYWEEK_FIFTH
public static final int SUNDAY
public static final int MONDAY
public static final int TUESDAY
public static final int WEDNESDAY
public static final int THURSDAY
public static final int FRIDAY
public static final int SATURDAY
public static final int UPDATE_ALL
public static final int UPDATE_THIS_INSTANCE
Constructor Detail |
public RepeatPattern(ISession session, RepeatType type, java.util.Date startDate, int iInterval, java.util.Date untilDate, RepeatForUnit forUnit, int iFor, RepeatWeekends weekends, java.util.Date[] customDates, RepeatAdjust adjust) throws java.lang.IllegalArgumentException, CollaborationException
session
- the session (not null
)type
- the repeat typeiInterval
- the intervalstartDate
- the start date (may not be null
)untilDate
- the repeat until date or null
to repeat 'for'forUnit
- the for unitiFor
- the number of for unitsweekends
- the weekends rule (see WEEKENDS_
constants)customDates
- the custom dates (ignored if not CUSTOM
type)adjust
- the date adjustmentMethod Detail |
public RepeatPattern getPatternInstance(java.util.Date startDate) throws java.lang.IllegalArgumentException, CollaborationException
startDate
- the start date (may not be null
)public RepeatPattern getPatternInstance(java.util.Date startDate, java.util.Date untilDate) throws java.lang.IllegalArgumentException, CollaborationException
startDate
- the start date (may not be null
)untilDate
- the until date (may not be null
)public RepeatAdjust getAdjust()
public RepeatType getType()
public java.util.Date getUntilDate()
null
if the repeat how is untilpublic int getInterval()
public int getFor()
public RepeatHow getHow()
getUntilDate()
,
getFor()
,
getForUnit()
public RepeatForUnit getForUnit()
public java.util.Date getStartDate()
public void setStartDate(java.util.Date startDate) throws java.lang.IllegalArgumentException, CollaborationException
startDate
- the start date (may not be null
)public RepeatWeekends getRepeatWeekends()
public java.util.Date[] getInstanceDates()
public java.util.List getValues()
IValue
objects (unmodifiable)public IValue[] getValuesArray()
IValue
objects (not null
)public Key[] getKeys()
Key
objectspublic static RepeatPattern createDaily(ISession session, java.util.Date startDate, int iInterval, RepeatWeekends weekends, java.util.Date untilDate) throws java.lang.IllegalArgumentException, CollaborationException
session
- the session (not null
)startDate
- the start date (may not be null
)iInterval
- the interval (i.e. every=1, every other=2, every third=3, etc)weekends
- the weekends rule (may not be null
untilDate
- the until date (may not be null
and must be after the start date)java.lang.IllegalArgumentException
- if the specified rule is invalidpublic static RepeatPattern createDaily(ISession session, java.util.Date startDate, int iInterval, RepeatWeekends weekends, RepeatForUnit forUnit, int iFor) throws java.lang.IllegalArgumentException, CollaborationException
session
- the session (not null
)startDate
- the start date (may not be null
)iInterval
- the interval (i.e. every=1, every other=2, every third=3, etc)weekends
- the weekends rule (may not be null
forUnit
- the for unitiFor
- the number of for unitsjava.lang.IllegalArgumentException
- if the specified rule is invalidpublic static RepeatPattern createCustom(ISession session, java.util.Date[] dates) throws java.lang.IllegalArgumentException, CollaborationException
session
- the session (not null
)dates
- the dates for the repeating patternjava.lang.IllegalArgumentException
- if the specified rule is invalidpublic static RepeatPattern createYearly(ISession session, java.util.Date startDate, int iInterval, RepeatWeekends weekends, java.util.Date untilDate) throws java.lang.IllegalArgumentException, CollaborationException
session
- the session (not null
)startDate
- the start date (may not be null
)iInterval
- the interval (i.e. every=1, every other=2, every third=3, etc)weekends
- the weekends rule (may not be null
untilDate
- the until date (may not be null
and must be after the start date)java.lang.IllegalArgumentException
- if the specified rule is invalidpublic static RepeatPattern createYearly(ISession session, java.util.Date startDate, int iInterval, RepeatWeekends weekends, RepeatForUnit forUnit, int iFor) throws java.lang.IllegalArgumentException, CollaborationException
When setting the for unit and number of units, since
this is a yearly repeating pattern, the for unit
must be at a minimum RepeatForUnitEnum.YEARS
. If
not, there could potentially be no instance dates for
the pattern therefore creating an invalid pattern.
If you pass in a for unit less than RepeatForUnitEnum.YEARS
,
the for unit is automatically adjusted.
session
- the session (not null
)startDate
- the start date (may not be null
)iInterval
- the interval (i.e. every=1, every other=2, every third=3, etc)weekends
- the weekends rule (may not be null
forUnit
- the for unit (minimum RepeatForUnitEnum.YEARS
)iFor
- the number of for unitsjava.lang.IllegalArgumentException
- if the specified rule is invalidpublic static RepeatPattern createWeekly(ISession session, java.util.Date startDate, int iInterval, int[] daysOfWeek, RepeatWeekends weekends, java.util.Date untilDate) throws java.lang.IllegalArgumentException, CollaborationException
session
- the session (not null
)startDate
- the start date (may not be null
)iInterval
- the interval (i.e. every=1, every other=2, every third=3, etc)daysOfWeek
- the days of week (array of int of SUNDAY-SATURDAY
constants)weekends
- the weekends rule (may not be null
untilDate
- the until date (may not be null
and must be after the start date)java.lang.IllegalArgumentException
- if the specified rule is invalidpublic static RepeatPattern createWeekly(ISession session, java.util.Date startDate, int iInterval, int[] daysOfWeek, RepeatWeekends weekends, RepeatForUnit forUnit, int iFor) throws java.lang.IllegalArgumentException, CollaborationException
When setting the for unit and number of units, since
this is a weekly repeating pattern, the for unit
must be at a minimum RepeatForUnitEnum.WEEKS
. If
not, there could potentially be no instance dates for
the pattern therefore creating an invalid pattern.
If you pass in a for unit less than RepeatForUnitEnum.WEEKS
,
the for unit is automatically adjusted.
session
- the session (not null
)startDate
- the start date (may not be null
)iInterval
- the interval (i.e. every=1, every other=2, every third=3, etc)daysOfWeek
- the days of week (array of int of SUNDAY-SATURDAY
constants)weekends
- the weekends rule (may not be null
forUnit
- the for unit (minimum RepeatForUnitEnum.WEEKS
)iFor
- the number of for unitsjava.lang.IllegalArgumentException
- if the specified rule is invalidpublic static RepeatPattern createMonthlyByDate(ISession session, java.util.Date startDate, int iInterval, int[] daysOfMonth, RepeatWeekends weekends, java.util.Date untilDate) throws java.lang.IllegalArgumentException, CollaborationException
session
- the session (not null
)startDate
- the start date (may not be null
)iInterval
- the interval (i.e. every=1, every other=2, every third=3, etc)daysOfMonth
- the days of month (array of days, 1-31)weekends
- the weekends rule (may not be null
untilDate
- the until date (may not be null
and must be after the start date)java.lang.IllegalArgumentException
- if the specified rule is invalidpublic static RepeatPattern createMonthlyByDate(ISession session, java.util.Date startDate, int iInterval, int[] daysOfMonth, RepeatWeekends weekends, RepeatForUnit forUnit, int iFor) throws java.lang.IllegalArgumentException, CollaborationException
When setting the for unit and number of units, since
this is a monthly repeating pattern, the for unit
must be at a minimum RepeatForUnitEnum.MONTHS
. If
not, there could potentially be no instance dates for
the pattern therefore creating an invalid pattern.
If you pass in a for unit less than RepeatForUnitEnum.MONTHS
,
the for unit is automatically adjusted.
session
- the session (not null
)startDate
- the start date (may not be null
)iInterval
- the interval (i.e. every=1, every other=2, every third=3, etc)daysOfMonth
- the days of month (array of days, 1-31)weekends
- the weekends rule (may not be null
forUnit
- the for unit (minimum RepeatForUnitEnum.MONTHS
)iFor
- the number of for unitsjava.lang.IllegalArgumentException
- if the specified rule is invalidpublic static RepeatPattern createMonthlyByDay(ISession session, java.util.Date startDate, int iInterval, int[] daysOfWeek, RepeatWeekends weekends, java.util.Date untilDate) throws java.lang.IllegalArgumentException, CollaborationException
session
- the session (not null
)startDate
- the start date (may not be null
)iInterval
- the interval (i.e. every=1, every other=2, every third=3, etc)daysOfWeek
- the days of week (array of SUNDAY-SATURDAY
constants possibly or'd with one of the BYWEEK_
constants)weekends
- the weekends rule (may not be null
untilDate
- the until date (may not be null
and must be after the start date)java.lang.IllegalArgumentException
- if the specified rule is invalidpublic static RepeatPattern createMonthlyByDay(ISession session, java.util.Date startDate, int iInterval, int[] daysOfWeek, RepeatWeekends weekends, RepeatForUnit forUnit, int iFor) throws java.lang.IllegalArgumentException, CollaborationException
When setting the for unit and number of units, since
this is a monthly repeating pattern, the for unit
must be at a minimum RepeatForUnitEnum.MONTHS
. If
not, there could potentially be no instance dates for
the pattern therefore creating an invalid pattern.
If you pass in a for unit less than RepeatForUnitEnum.MONTHS
,
the for unit is automatically adjusted.
session
- the session (not null
)startDate
- the start date (may not be null
)iInterval
- the interval (i.e. every=1, every other=2, every third=3, etc)daysOfWeek
- the days of week (array of SUNDAY-SATURDAY
constants possibly or'd with one of the BYWEEK_
constants)weekends
- the weekends rule (may not be null
forUnit
- the for unit (minimum RepeatForUnitEnum.MONTHS
)iFor
- the number of for unitsjava.lang.IllegalArgumentException
- if the specified rule is invalidpublic static java.lang.String getDayByNumber(int iDay)
iDay
- day number (see SUNDAY-SATURDAY
constants)public static java.lang.String getDayByNumber(int iDay, java.util.Locale locale)
iDay
- day number (see SUNDAY-SATURDAY
constants)locale
- locale to usepublic static java.lang.String getDayByNumber(int iDay, int iFieldWidth, java.util.Calendar cal, java.util.Locale locale)
iDay
- day number (see SUNDAY-SATURDAY
constants)iFieldWidth
- width of day fieldlocale
- locale to usecal
- calendar to usepublic static void sliceDates(java.util.Date instanceDate, java.util.Date[] dates, java.util.List previousDates, java.util.List futureDates)
instanceDate
- the instance datedates
- the array of dates to slicepreviousDates
- a list of java.util.Date
s before the instance datefutureDates
- a list of java.util.Date
s after the instance datepublic java.lang.String toString()
toString
in class java.lang.Object
public void updateDigest(java.security.MessageDigest digest)
updateDigest
in interface com.compoze.collab.util.IDigestSupport
digest
- the digest to update (not null
)
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |