Class Recurrence

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

public class Recurrence extends Object implements Serializable
Author:
Jonathan Lennox
See Also:
  • Field Details

    • DAILY

      public static final int DAILY
      Field DAILY
      See Also:
    • MONTHLY

      public static final int MONTHLY
      Field MONTHLY
      See Also:
    • NO_RECURRENCE

      public static final int NO_RECURRENCE
      Field NO_RECURRENCE
      See Also:
    • WEEKLY

      public static final int WEEKLY
      Field WEEKLY
      See Also:
    • YEARLY

      public static final int YEARLY
      Field YEARLY
      See Also:
    • 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 Details

    • 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 Details

    • 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