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 intField DAILYprotected CalendarField dtStartprotected DurationField durationprotected intField frequencyprotected intField intervalstatic final intField MONTHLYstatic final intField NO_RECURRENCEprotected intField intervalprotected CalendarField untilstatic final intField WEEKLYstatic final intField YEARLY -
Constructor Summary
ConstructorsConstructorDescriptionConstructor RecurrenceRecurrence(Calendar start, Duration dur) Constructor RecurrenceRecurrence(Calendar start, Duration dur, int freq) Constructor Recurrence -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancandidateIsInRecurrence(Calendar candidate, boolean debug) Method candidateIsInRecurrencegetByDay()Method getByDayint[]Method getByMonthint[]Method getByMonthDayint[]Method getByWeekNoint[]Method getByYearDaygetCandidateStartTime(Calendar current) Method getCandidateStartTimeprotected static longgetDayNumber(Calendar cal) Method getDayNumbergetDtEnd()Method getDtEndMethod getDtStartMethod getDurationintMethod getFrequencyintMethod getIntervalprotected intMethod getMinimumIntervalprotected static longgetMonthNumber(Calendar cal) Method getMonthNumberintMethod getOccurrenceprotected intgetRecurrenceCount(Calendar candidate) Method getRecurrenceCountgetUntil()Method getUntilprotected static longgetWeekNumber(Calendar cal) Method getWeekNumberintMethod getWeekStartbooleanisInRecurrence(Calendar current) Method isInRecurrencebooleanisInRecurrence(Calendar current, boolean debug) Method isInRecurrenceprotected booleanmatchesByDay(Calendar candidate) Method matchesByDayprotected booleanmatchesByField(int[] array, int field, Calendar candidate, boolean allowNegative) Method matchesByFieldprotected booleanmatchesByMonth(Calendar candidate) Method matchesByMonthprotected booleanmatchesByMonthDay(Calendar candidate) Method matchesByMonthDayprotected booleanmatchesByWeekNo(Calendar candidate) Method matchesByWeekNoprotected booleanmatchesByYearDay(Calendar candidate) Method matchesByYearDayprotected booleanmatchesIndividualByDay(Calendar candidate, DayAndPosition pos) Method matchesIndividualByDayprotected static voidreduce_constant_length_field(int field, Calendar start, Calendar candidate) Method reduce_constant_length_fieldprotected static voidreduce_day_of_month(Calendar start, Calendar candidate) Method reduce_day_of_monthprotected static voidreduce_day_of_year(Calendar start, Calendar candidate) Method reduce_day_of_yearvoidsetByDay(DayAndPosition[] b) Method setByDayvoidsetByMonth(int[] b) Method setByMonthvoidsetByMonthDay(int[] b) Method setByMonthDayvoidsetByWeekNo(int[] b) Method setByWeekNovoidsetByYearDay(int[] b) Method setByYearDayvoidMethod setDtEndvoidsetDtStart(Calendar start) Method setDtStartvoidMethod setDurationvoidsetFrequency(int freq) Method setFrequencyvoidsetInterval(int intr) Method setIntervalvoidsetOccurrence(int occur) Method setOccurrencevoidMethod setUntilvoidsetWeekStart(int weekstart) Method setWeekStartprotected StringstringizeIntArray(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
-