|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ofbiz.service.calendar.RecurrenceRule
public class RecurrenceRule
Recurrence Rule Object
Field Summary | |
---|---|
protected java.util.List |
byDayList
|
protected java.util.List |
byHourList
|
protected java.util.List |
byMinuteList
|
protected java.util.List |
byMonthDayList
|
protected java.util.List |
byMonthList
|
protected java.util.List |
bySecondList
|
protected java.util.List |
bySetPosList
|
protected java.util.List |
byWeekNoList
|
protected java.util.List |
byYearDayList
|
static int |
DAILY
Frequency DAILY |
static int |
HOURLY
Frequency HOURLY |
static int |
MAX_HR
|
static int |
MAX_MIN
|
static int |
MAX_MTH
|
static int |
MAX_MTH_DAY
|
static int |
MAX_SEC
|
static int |
MAX_WEEK_NO
|
static int |
MAX_YEAR_DAY
|
static int |
MIN_HR
|
static int |
MIN_MIN
|
static int |
MIN_MTH
|
static int |
MIN_MTH_DAY
|
static int |
MIN_SEC
|
static int |
MIN_WEEK_NO
|
static int |
MIN_YEAR_DAY
|
static int |
MINUTELY
Frequency MINUTELY |
static java.lang.String |
module
|
static int |
MONTHLY
Frequency MONTHLY |
protected GenericValue |
rule
|
static int |
SECONDLY
Frequency SECONDLY |
static int |
WEEKLY
Frequency WEEKLY |
static int |
YEARLY
Frequency YEARLY |
Constructor Summary | |
---|---|
RecurrenceRule(GenericValue rule)
Creates a new RecurrenceRule object from a RecurrenceInfo entity. |
Method Summary | |
---|---|
long |
getCount()
Get the number of times this recurrence will run (-1 until end time). |
long |
getEndTime()
Gets the end time of the recurrence rule or 0 if none. |
int |
getFrequency()
Returns the frequency of this recurrence. |
java.lang.String |
getFrequencyName()
Returns the frequency name of the recurrence. |
long |
getInterval()
Returns the interval of the frequency. |
int |
getIntervalInt()
Returns the interval of the frequency as an int. |
void |
init()
Initializes the rules for this RecurrenceInfo object. |
boolean |
isValid(java.util.Date startDate,
java.util.Date date)
Tests the date to see if it falls within the rules |
boolean |
isValid(long startTime,
long dateTime)
Tests the date to see if it falls within the rules |
static RecurrenceRule |
makeRule(GenericDelegator delegator,
int frequency,
int interval,
int count)
|
static RecurrenceRule |
makeRule(GenericDelegator delegator,
int frequency,
int interval,
int count,
long endTime)
|
static RecurrenceRule |
makeRule(GenericDelegator delegator,
int frequency,
int interval,
long endTime)
|
long |
next(long startTime,
long fromTime,
long currentCount)
Returns the next recurrence of this rule. |
java.lang.String |
primaryKey()
|
void |
remove()
Removes this rule from the persistant store. |
long |
validCurrent(long startTime,
long checkTime,
long currentCount)
Gets the current recurrence (current for the checkTime) of this rule and returns it if it is valid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String module
public static final int MIN_SEC
public static final int MAX_SEC
public static final int MIN_MIN
public static final int MAX_MIN
public static final int MIN_HR
public static final int MAX_HR
public static final int MIN_MTH_DAY
public static final int MAX_MTH_DAY
public static final int MIN_YEAR_DAY
public static final int MAX_YEAR_DAY
public static final int MIN_WEEK_NO
public static final int MAX_WEEK_NO
public static final int MIN_MTH
public static final int MAX_MTH
public static final int SECONDLY
public static final int MINUTELY
public static final int HOURLY
public static final int DAILY
public static final int WEEKLY
public static final int MONTHLY
public static final int YEARLY
protected GenericValue rule
protected java.util.List bySecondList
protected java.util.List byMinuteList
protected java.util.List byHourList
protected java.util.List byDayList
protected java.util.List byMonthDayList
protected java.util.List byYearDayList
protected java.util.List byWeekNoList
protected java.util.List byMonthList
protected java.util.List bySetPosList
Constructor Detail |
---|
public RecurrenceRule(GenericValue rule) throws RecurrenceRuleException
rule
- GenericValue object defining this rule.
RecurrenceRuleException
Method Detail |
---|
public void init() throws RecurrenceRuleException
RecurrenceRuleException
public long getEndTime()
public long getCount()
public java.lang.String getFrequencyName()
public int getFrequency()
public long getInterval()
public int getIntervalInt()
public long next(long startTime, long fromTime, long currentCount)
startTime
- The time this recurrence first began.fromTime
- The time to base the next recurrence on.currentCount
- The total number of times the recurrence has run.
public long validCurrent(long startTime, long checkTime, long currentCount)
startTime
- The time this recurrence first began.checkTime
- The time to base the current recurrence on.currentCount
- The total number of times the recurrence has run.
public boolean isValid(java.util.Date startDate, java.util.Date date)
startDate
- date object to test
public boolean isValid(long startTime, long dateTime)
startTime
- date object to test
public void remove() throws RecurrenceRuleException
RecurrenceRuleException
public java.lang.String primaryKey()
public static RecurrenceRule makeRule(GenericDelegator delegator, int frequency, int interval, int count) throws RecurrenceRuleException
RecurrenceRuleException
public static RecurrenceRule makeRule(GenericDelegator delegator, int frequency, int interval, long endTime) throws RecurrenceRuleException
RecurrenceRuleException
public static RecurrenceRule makeRule(GenericDelegator delegator, int frequency, int interval, int count, long endTime) throws RecurrenceRuleException
RecurrenceRuleException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |