Package com.liferay.portal.kernel.cal
Class Recurrence
Object
com.liferay.portal.kernel.cal.Recurrence
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TZSRecurrence
- Author:
- Jonathan Lennox
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DayAndPosition[]
Field byDayprotected int[]
Field byMonthprotected int[]
Field byMonthDayprotected int[]
Field byWeekNoprotected int[]
Field byYearDaystatic final int
Field DAILYprotected Calendar
Field dtStartprotected Duration
Field durationprotected int
Field frequencyprotected int
Field intervalstatic final int
Field MONTHLYstatic final int
Field NO_RECURRENCEprotected int
Field intervalprotected Calendar
Field untilstatic final int
Field WEEKLYstatic final int
Field YEARLY -
Constructor Summary
ConstructorsConstructorDescriptionConstructor RecurrenceRecurrence
(Calendar start, Duration dur) Constructor RecurrenceRecurrence
(Calendar start, Duration dur, int freq) Constructor Recurrence -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
candidateIsInRecurrence
(Calendar candidate, boolean debug) Method candidateIsInRecurrencegetByDay()
Method getByDayint[]
Method getByMonthint[]
Method getByMonthDayint[]
Method getByWeekNoint[]
Method getByYearDaygetCandidateStartTime
(Calendar current) Method getCandidateStartTimeprotected static long
getDayNumber
(Calendar cal) Method getDayNumbergetDtEnd()
Method getDtEndMethod getDtStartMethod getDurationint
Method getFrequencyint
Method getIntervalprotected int
Method getMinimumIntervalprotected static long
getMonthNumber
(Calendar cal) Method getMonthNumberint
Method getOccurrenceprotected int
getRecurrenceCount
(Calendar candidate) Method getRecurrenceCountgetUntil()
Method getUntilprotected static long
getWeekNumber
(Calendar cal) Method getWeekNumberint
Method getWeekStartboolean
isInRecurrence
(Calendar current) Method isInRecurrenceboolean
isInRecurrence
(Calendar current, boolean debug) Method isInRecurrenceprotected boolean
matchesByDay
(Calendar candidate) Method matchesByDayprotected boolean
matchesByField
(int[] array, int field, Calendar candidate, boolean allowNegative) Method matchesByFieldprotected boolean
matchesByMonth
(Calendar candidate) Method matchesByMonthprotected boolean
matchesByMonthDay
(Calendar candidate) Method matchesByMonthDayprotected boolean
matchesByWeekNo
(Calendar candidate) Method matchesByWeekNoprotected boolean
matchesByYearDay
(Calendar candidate) Method matchesByYearDayprotected boolean
matchesIndividualByDay
(Calendar candidate, DayAndPosition pos) Method matchesIndividualByDayprotected static void
reduce_constant_length_field
(int field, Calendar start, Calendar candidate) Method reduce_constant_length_fieldprotected static void
reduce_day_of_month
(Calendar start, Calendar candidate) Method reduce_day_of_monthprotected static void
reduce_day_of_year
(Calendar start, Calendar candidate) Method reduce_day_of_yearvoid
setByDay
(DayAndPosition[] b) Method setByDayvoid
setByMonth
(int[] b) Method setByMonthvoid
setByMonthDay
(int[] b) Method setByMonthDayvoid
setByWeekNo
(int[] b) Method setByWeekNovoid
setByYearDay
(int[] b) Method setByYearDayvoid
Method setDtEndvoid
setDtStart
(Calendar start) Method setDtStartvoid
Method setDurationvoid
setFrequency
(int freq) Method setFrequencyvoid
setInterval
(int intr) Method setIntervalvoid
setOccurrence
(int occur) Method setOccurrencevoid
Method setUntilvoid
setWeekStart
(int weekstart) Method setWeekStartprotected String
stringizeIntArray
(int[] a) Method stringizeIntArraytoString()
Method toString
-
Field Details
-
DAILY
public static final int DAILYField DAILY- See Also:
-
MONTHLY
public static final int MONTHLYField MONTHLY- See Also:
-
NO_RECURRENCE
public static final int NO_RECURRENCEField NO_RECURRENCE- See Also:
-
WEEKLY
public static final int WEEKLYField WEEKLY- See Also:
-
YEARLY
public static final int YEARLYField YEARLY- See Also:
-
byDay
Field byDay -
byMonth
protected int[] byMonthField byMonth -
byMonthDay
protected int[] byMonthDayField byMonthDay -
byWeekNo
protected int[] byWeekNoField byWeekNo -
byYearDay
protected int[] byYearDayField byYearDay -
dtStart
Field dtStart -
duration
Field duration -
frequency
protected int frequencyField frequency -
interval
protected int intervalField interval -
occurrence
protected int occurrenceField interval -
until
Field until
-
-
Constructor Details
-
Recurrence
public Recurrence()Constructor Recurrence -
Recurrence
Constructor Recurrence -
Recurrence
Constructor Recurrence
-
-
Method Details
-
getByDay
Method getByDay- Returns:
- DayAndPosition[]
-
getByMonth
public int[] getByMonth()Method getByMonth- Returns:
- int[]
-
getByMonthDay
public int[] getByMonthDay()Method getByMonthDay- Returns:
- int[]
-
getByWeekNo
public int[] getByWeekNo()Method getByWeekNo- Returns:
- int[]
-
getByYearDay
public int[] getByYearDay()Method getByYearDay- Returns:
- int[]
-
getCandidateStartTime
Method getCandidateStartTime- Parameters:
current
- the current time- Returns:
- Calendar
-
getDtEnd
Method getDtEnd- Returns:
- Calendar
-
getDtStart
Method getDtStart- Returns:
- Calendar
-
getDuration
Method getDuration- Returns:
- Duration
-
getFrequency
public int getFrequency()Method getFrequency- Returns:
- int
-
getInterval
public int getInterval()Method getInterval- Returns:
- int
-
getOccurrence
public int getOccurrence()Method getOccurrence- Returns:
- int
-
getUntil
Method getUntil- Returns:
- Calendar
-
getWeekStart
public int getWeekStart()Method getWeekStart- Returns:
- int
-
isInRecurrence
Method isInRecurrence- Parameters:
current
- the current time- Returns:
- boolean
-
isInRecurrence
Method isInRecurrence- Parameters:
current
- the current timedebug
- whether to print debug messages- Returns:
- boolean
-
setByDay
Method setByDay -
setByMonth
public void setByMonth(int[] b) Method setByMonth -
setByMonthDay
public void setByMonthDay(int[] b) Method setByMonthDay -
setByWeekNo
public void setByWeekNo(int[] b) Method setByWeekNo -
setByYearDay
public void setByYearDay(int[] b) Method setByYearDay -
setDtEnd
Method setDtEnd -
setDtStart
Method setDtStart -
setDuration
Method setDuration -
setFrequency
public void setFrequency(int freq) Method setFrequency -
setInterval
public void setInterval(int intr) Method setInterval -
setOccurrence
public void setOccurrence(int occur) Method setOccurrence -
setUntil
Method setUntil -
setWeekStart
public void setWeekStart(int weekstart) Method setWeekStart -
toString
Method toString -
getDayNumber
Method getDayNumber- Returns:
- long
-
getMonthNumber
Method getMonthNumber- Returns:
- long
-
getWeekNumber
Method getWeekNumber- Returns:
- long
-
reduce_constant_length_field
Method reduce_constant_length_field -
reduce_day_of_month
Method reduce_day_of_month -
reduce_day_of_year
Method reduce_day_of_year -
candidateIsInRecurrence
Method candidateIsInRecurrence- Returns:
- boolean
-
getMinimumInterval
protected int getMinimumInterval()Method getMinimumInterval- Returns:
- int
-
getRecurrenceCount
Method getRecurrenceCount- Returns:
- int
-
matchesByDay
Method matchesByDay- Returns:
- boolean
-
matchesByField
Method matchesByField- Returns:
- boolean
-
matchesByMonth
Method matchesByMonth- Returns:
- boolean
-
matchesByMonthDay
Method matchesByMonthDay- Returns:
- boolean
-
matchesByWeekNo
Method matchesByWeekNo- Returns:
- boolean
-
matchesByYearDay
Method matchesByYearDay- Returns:
- boolean
-
matchesIndividualByDay
Method matchesIndividualByDay- Returns:
- boolean
-
stringizeIntArray
Method stringizeIntArray- Returns:
- String
-