Liferay 6.2-ce-ga5

com.liferay.portal.kernel.cal
Class Recurrence

java.lang.Object
  extended by com.liferay.portal.kernel.cal.Recurrence
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TZSRecurrence

public class Recurrence
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
protected  DayAndPosition[] byDay
          Field byDay
protected  int[] byMonth
          Field byMonth
protected  int[] byMonthDay
          Field byMonthDay
protected  int[] byWeekNo
          Field byWeekNo
protected  int[] byYearDay
          Field byYearDay
static int DAILY
          Field DAILY
protected  Calendar dtStart
          Field dtStart
protected  Duration duration
          Field duration
protected  int frequency
          Field frequency
protected  int interval
          Field interval
static int MONTHLY
          Field MONTHLY
static int NO_RECURRENCE
          Field NO_RECURRENCE
protected  int occurrence
          Field interval
protected  Calendar until
          Field until
static int WEEKLY
          Field WEEKLY
static int YEARLY
          Field YEARLY
 
Constructor Summary
Recurrence()
          Constructor Recurrence
Recurrence(Calendar start, Duration dur)
          Constructor Recurrence
Recurrence(Calendar start, Duration dur, int freq)
          Constructor Recurrence
 
Method Summary
protected  boolean candidateIsInRecurrence(Calendar candidate, boolean debug)
          Method candidateIsInRecurrence
 DayAndPosition[] getByDay()
          Method getByDay
 int[] getByMonth()
          Method getByMonth
 int[] getByMonthDay()
          Method getByMonthDay
 int[] getByWeekNo()
          Method getByWeekNo
 int[] getByYearDay()
          Method getByYearDay
 Calendar getCandidateStartTime(Calendar current)
          Method getCandidateStartTime
protected static long getDayNumber(Calendar cal)
          Method getDayNumber
 Calendar getDtEnd()
          Method getDtEnd
 Calendar getDtStart()
          Method getDtStart
 Duration getDuration()
          Method getDuration
 int getFrequency()
          Method getFrequency
 int getInterval()
          Method getInterval
protected  int getMinimumInterval()
          Method getMinimumInterval
protected static long getMonthNumber(Calendar cal)
          Method getMonthNumber
 int getOccurrence()
          Method getOccurrence
protected  int getRecurrenceCount(Calendar candidate)
          Method getRecurrenceCount
 Calendar getUntil()
          Method getUntil
protected static long getWeekNumber(Calendar cal)
          Method getWeekNumber
 int getWeekStart()
          Method getWeekStart
 boolean isInRecurrence(Calendar current)
          Method isInRecurrence
 boolean isInRecurrence(Calendar current, boolean debug)
          Method isInRecurrence
protected  boolean matchesByDay(Calendar candidate)
          Method matchesByDay
protected  boolean matchesByField(int[] array, int field, Calendar candidate, boolean allowNegative)
          Method matchesByField
protected  boolean matchesByMonth(Calendar candidate)
          Method matchesByMonth
protected  boolean matchesByMonthDay(Calendar candidate)
          Method matchesByMonthDay
protected  boolean matchesByWeekNo(Calendar candidate)
          Method matchesByWeekNo
protected  boolean matchesByYearDay(Calendar candidate)
          Method matchesByYearDay
protected  boolean matchesIndividualByDay(Calendar candidate, DayAndPosition pos)
          Method matchesIndividualByDay
protected static void reduce_constant_length_field(int field, Calendar start, Calendar candidate)
          Method reduce_constant_length_field
protected static void reduce_day_of_month(Calendar start, Calendar candidate)
          Method reduce_day_of_month
protected static void reduce_day_of_year(Calendar start, Calendar candidate)
          Method reduce_day_of_year
 void setByDay(DayAndPosition[] b)
          Method setByDay
 void setByMonth(int[] b)
          Method setByMonth
 void setByMonthDay(int[] b)
          Method setByMonthDay
 void setByWeekNo(int[] b)
          Method setByWeekNo
 void setByYearDay(int[] b)
          Method setByYearDay
 void setDtEnd(Calendar end)
          Method setDtEnd
 void setDtStart(Calendar start)
          Method setDtStart
 void setDuration(Duration d)
          Method setDuration
 void setFrequency(int freq)
          Method setFrequency
 void setInterval(int intr)
          Method setInterval
 void setOccurrence(int occur)
          Method setOccurrence
 void setUntil(Calendar u)
          Method setUntil
 void setWeekStart(int weekstart)
          Method setWeekStart
protected  String stringizeIntArray(int[] a)
          Method stringizeIntArray
 String toString()
          Method toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DAILY

public static final int DAILY
Field DAILY

See Also:
Constant Field Values

MONTHLY

public static final int MONTHLY
Field MONTHLY

See Also:
Constant Field Values

NO_RECURRENCE

public static final int NO_RECURRENCE
Field NO_RECURRENCE

See Also:
Constant Field Values

WEEKLY

public static final int WEEKLY
Field WEEKLY

See Also:
Constant Field Values

YEARLY

public static final int YEARLY
Field YEARLY

See Also:
Constant Field Values

byDay

protected DayAndPosition[] byDay
Field byDay


byMonth

protected int[] byMonth
Field byMonth


byMonthDay

protected int[] byMonthDay
Field byMonthDay


byWeekNo

protected int[] byWeekNo
Field byWeekNo


byYearDay

protected int[] byYearDay
Field byYearDay


dtStart

protected Calendar dtStart
Field dtStart


duration

protected Duration duration
Field duration


frequency

protected int frequency
Field frequency


interval

protected int interval
Field interval


occurrence

protected int occurrence
Field interval


until

protected Calendar until
Field until

Constructor Detail

Recurrence

public Recurrence()
Constructor Recurrence


Recurrence

public Recurrence(Calendar start,
                  Duration dur)
Constructor Recurrence


Recurrence

public Recurrence(Calendar start,
                  Duration dur,
                  int freq)
Constructor Recurrence

Method Detail

getByDay

public DayAndPosition[] 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

public Calendar getCandidateStartTime(Calendar current)
Method getCandidateStartTime

Parameters:
current - the current time
Returns:
Calendar

getDtEnd

public Calendar getDtEnd()
Method getDtEnd

Returns:
Calendar

getDtStart

public Calendar getDtStart()
Method getDtStart

Returns:
Calendar

getDuration

public Duration 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

public Calendar getUntil()
Method getUntil

Returns:
Calendar

getWeekStart

public int getWeekStart()
Method getWeekStart

Returns:
int

isInRecurrence

public boolean isInRecurrence(Calendar current)
Method isInRecurrence

Parameters:
current - the current time
Returns:
boolean

isInRecurrence

public boolean isInRecurrence(Calendar current,
                              boolean debug)
Method isInRecurrence

Parameters:
current - the current time
debug - whether to print debug messages
Returns:
boolean

setByDay

public void setByDay(DayAndPosition[] b)
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

public void setDtEnd(Calendar end)
Method setDtEnd


setDtStart

public void setDtStart(Calendar start)
Method setDtStart


setDuration

public void setDuration(Duration d)
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

public void setUntil(Calendar u)
Method setUntil


setWeekStart

public void setWeekStart(int weekstart)
Method setWeekStart


toString

public String toString()
Method toString

Overrides:
toString in class Object
Returns:
String

getDayNumber

protected static long getDayNumber(Calendar cal)
Method getDayNumber

Returns:
long

getMonthNumber

protected static long getMonthNumber(Calendar cal)
Method getMonthNumber

Returns:
long

getWeekNumber

protected static long getWeekNumber(Calendar cal)
Method getWeekNumber

Returns:
long

reduce_constant_length_field

protected static void reduce_constant_length_field(int field,
                                                   Calendar start,
                                                   Calendar candidate)
Method reduce_constant_length_field


reduce_day_of_month

protected static void reduce_day_of_month(Calendar start,
                                          Calendar candidate)
Method reduce_day_of_month


reduce_day_of_year

protected static void reduce_day_of_year(Calendar start,
                                         Calendar candidate)
Method reduce_day_of_year


candidateIsInRecurrence

protected boolean candidateIsInRecurrence(Calendar candidate,
                                          boolean debug)
Method candidateIsInRecurrence

Returns:
boolean

getMinimumInterval

protected int getMinimumInterval()
Method getMinimumInterval

Returns:
int

getRecurrenceCount

protected int getRecurrenceCount(Calendar candidate)
Method getRecurrenceCount

Returns:
int

matchesByDay

protected boolean matchesByDay(Calendar candidate)
Method matchesByDay

Returns:
boolean

matchesByField

protected boolean matchesByField(int[] array,
                                 int field,
                                 Calendar candidate,
                                 boolean allowNegative)
Method matchesByField

Returns:
boolean

matchesByMonth

protected boolean matchesByMonth(Calendar candidate)
Method matchesByMonth

Returns:
boolean

matchesByMonthDay

protected boolean matchesByMonthDay(Calendar candidate)
Method matchesByMonthDay

Returns:
boolean

matchesByWeekNo

protected boolean matchesByWeekNo(Calendar candidate)
Method matchesByWeekNo

Returns:
boolean

matchesByYearDay

protected boolean matchesByYearDay(Calendar candidate)
Method matchesByYearDay

Returns:
boolean

matchesIndividualByDay

protected boolean matchesIndividualByDay(Calendar candidate,
                                         DayAndPosition pos)
Method matchesIndividualByDay

Returns:
boolean

stringizeIntArray

protected String stringizeIntArray(int[] a)
Method stringizeIntArray

Returns:
String

Liferay 6.2-ce-ga5