|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TaskRecurrencePattern
Represents a recurrence pattern of a task. Based on the type of recurrence, the following methods are used to configure the recurrence:
getInterval setInterval | Indicates the number of days between occurrences. The value 1 (one) means the task occurs every day. |
getInterval setInterval | Indicates the number of weeks between occurrences. The value 1 (one) means the task occurs every week. |
getDaysOfWeek setDaysOfWeek setDayOfWeek | Indicates the days of week when the task occurs. |
getInterval setInterval | Indicates the number of months between occurrences. The value 1 (one) means the task occurs every month. |
getDayOfWeek setDayOfWeek | Indicates the day of week when the task occurs. |
getInterval setInterval | Indicates the number of months between occurrences. The value 1 (one) means the task occurs every month. |
getDayOfMonth setDayOfMonth | Indicates the month's day on which the task occurs. Accepted values are in the range from 1 to 31. |
getDayOfWeek setDayOfWeek | Indicates the day of week when the task occurs. |
getMonthOfYear setMonthOfYear | Indicates the month during which the task occurs. Accepted values are in the range from 1 to 12. |
getDayOfMonth setDayOfMonth | Indicates the month's day on which the task occurs. Accepted values are in the range from 1 to 31. |
getMonthOfYear setMonthOfYear | Indicates the month during which the task occurs. Accepted values are in the range from 1 to 12. |
Example code:
Exchange exchange = new Exchange("hostname", "username", "password");
ExchangeTask task = exchange.getTasksFolder().createTask();
RecurrencePattern recurrencePattern = task.getRecurrencePattern();
// Recurs 4 times every 2 months:
recurrencePattern.setRecurrenceType(RecurrenceType.RecursMonthly);
recurrencePattern.setInterval(2);
recurrencePattern.setOccurrences(4);
task.save();
Method Summary | |
---|---|
int |
getDayOfMonth()
Returns the month's day on which the task occurs. |
DayOfWeek |
getDayOfWeek()
Returns the day of week when the task occurs. |
int |
getDayOfWeekIndex()
Returns on which week in a month the task occurs. |
java.util.List<DayOfWeek> |
getDaysOfWeek()
Returns the days of week when the task occurs. |
int |
getInterval()
Returns the interval between two occurrences in days, weeks or months depending on the type of recurrence. |
int |
getMonthOfYear()
Returns the month during which the task occurs. |
int |
getOccurrences()
Returns the occurrences count of the recurring task indicating how many times the task recurs. |
ExchangeTask |
getParent()
Returns the parent task of this recurrence pattern. |
java.util.Date |
getPatternEndDate()
Returns the end date until which the task recurs. |
java.util.Date |
getPatternStartDate()
Returns the start date on which the task starts recurring. |
RecurrenceType |
getRecurrenceType()
Returns the type of this recurrence pattern. |
boolean |
hasNoEndDate()
Returns true if the task recurs indefinitely without an end date specified, false otherwise. |
boolean |
isEmpty()
Returns true if no recurrence pattern is defined for the parent task item. |
void |
setDayOfMonth(int value)
Sets the month's day on which the task occurs. |
void |
setDayOfWeek(DayOfWeek value)
Sets the day of week when the task occurs. |
void |
setDayOfWeekIndex(int index)
Sets the week in a month the task occurs on. |
void |
setDaysOfWeek(DayOfWeek... value)
Sets the days of week when the task occurs. |
void |
setHasNoEndDate(boolean value)
When set to true, the task will recur indefinitely. |
void |
setInterval(int value)
Returns the interval between two occurrences of the recurring task. |
void |
setMonthOfYear(int value)
Sets the month during which the task occurs. |
void |
setOccurrences(int value)
Sets the occurrences count of the recurring task. |
void |
setPatternEndDate(java.util.Date value)
Sets the end date until which the task recurs. |
void |
setPatternStartDate(java.util.Date value)
Sets the start date when the task starts recurring. |
void |
setRecurrenceType(RecurrenceType value)
Sets the type of this recurrence pattern. |
Method Detail |
---|
boolean isEmpty() throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.int getDayOfMonth() throws ExchangeServiceException
Only applicable if the RecurrenceType is RecursMonthNth or RecursYearNth.
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setDayOfMonth(int value) throws ExchangeServiceException
Only applicable if the RecurrenceType is RecursMonthNth or RecursYearNth. If other RecurrenceType is set, this method will throw an exception.
ExchangeServiceException
- if any errors occur during the communication with Exchange.DayOfWeek getDayOfWeek() throws ExchangeServiceException
Only applicable if the RecurrenceType is RecursWeekly, RecursMonthly or RecursYearly.
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setDayOfWeek(DayOfWeek value) throws ExchangeServiceException
Only applicable if the RecurrenceType is RecursWeekly, RecursMonthly or RecursYearly. If other RecurrenceType is set, this method will throw an exception.
ExchangeServiceException
- if any errors occur during the communication with Exchange.java.util.List<DayOfWeek> getDaysOfWeek() throws ExchangeServiceException
Only applicable if the RecurrenceType is RecursWeekly.
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setDaysOfWeek(DayOfWeek... value) throws ExchangeServiceException
Only applicable if the RecurrenceType is RecursWeekly. If other RecurrenceType is set, this method will throw an exception.
ExchangeServiceException
- if any errors occur during the communication with Exchange.int getDayOfWeekIndex() throws ExchangeServiceException
Only applicable if the RecurrenceType is RecursMonthly or RecursYearly.
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setDayOfWeekIndex(int index) throws ExchangeServiceException
Only applicable if the RecurrenceType is RecursMonthly or RecursYearly.
ExchangeServiceException
- if any errors occur during the communication with Exchange.int getInterval() throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setInterval(int value) throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.int getMonthOfYear() throws ExchangeServiceException
Only applicable if the RecurrenceType is RecursYearly or RecursYearNth.
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setMonthOfYear(int value) throws ExchangeServiceException
Only applicable if the RecurrenceType is RecursYearly or RecursYearNth. If other RecurrenceType is set, this method will throw an exception.
ExchangeServiceException
- if any errors occur during the communication with Exchange.boolean hasNoEndDate() throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setHasNoEndDate(boolean value) throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.int getOccurrences() throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setOccurrences(int value) throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.java.util.Date getPatternEndDate() throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setPatternEndDate(java.util.Date value) throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.java.util.Date getPatternStartDate() throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setPatternStartDate(java.util.Date value) throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.RecurrenceType getRecurrenceType() throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.void setRecurrenceType(RecurrenceType value) throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.ExchangeTask getParent() throws ExchangeServiceException
ExchangeServiceException
- if any errors occur during the communication with Exchange.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |