Class Recurrence
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.property.complex.recurrence.pattern.Recurrence
-
- All Implemented Interfaces:
ISelfValidate,ComplexFunctionDelegate<EwsServiceXmlReader>
- Direct Known Subclasses:
Recurrence.IntervalPattern,Recurrence.RelativeYearlyPattern,Recurrence.YearlyPattern
public abstract class Recurrence extends ComplexProperty
Represents a recurrence pattern, as used by Appointment and Task item.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRecurrence.DailyPatternRepresents a recurrence pattern where each occurrence happens a specific number of days after the previous one.static classRecurrence.DailyRegenerationPatternRepresents a regeneration pattern, as used with recurring tasks, where each occurrence happens a specified number of days after the previous one is completed.static classRecurrence.IntervalPatternRepresents a recurrence pattern where each occurrence happens at a specific interval after the previous one.static classRecurrence.MonthlyPatternRepresents a recurrence pattern where each occurrence happens on a specific day a specific number of months after the previous one.static classRecurrence.MonthlyRegenerationPatternRepresents a regeneration pattern, as used with recurring tasks, where each occurrence happens a specified number of months after the previous one is completed.static classRecurrence.RelativeMonthlyPatternRepresents a recurrence pattern where each occurrence happens on a relative day a specific number of months after the previous one.static classRecurrence.RelativeYearlyPatternThe Class RelativeYearlyPattern.static classRecurrence.WeeklyPatternRepresents a recurrence pattern where each occurrence happens on specific days a specific number of weeks after the previous one.static classRecurrence.WeeklyRegenerationPatternRepresents a regeneration pattern, as used with recurring tasks, where each occurrence happens a specified number of weeks after the previous one is completed.static classRecurrence.YearlyPatternRepresents a recurrence pattern where each occurrence happens on a specific day every year.static classRecurrence.YearlyRegenerationPatternRepresents a regeneration pattern, as used with recurring tasks, where each occurrence happens a specified number of years after the previous one is completed.
-
Constructor Summary
Constructors Constructor Description Recurrence()Initializes a new instance.Recurrence(Date startDate)Initializes a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description DategetEndDate()Gets the date after which the recurrence ends.<T> TgetFieldValueOrThrowIfNull(Class<T> cls, Object value, String name)Gets a property value or throw if null.IntegergetNumberOfOccurrences()Gets the number of occurrences after which the recurrence ends.DategetStartDate()Gets the date and time when the recurrence start.abstract StringgetXmlElementName()Gets the name of the XML element.booleanhasEnd()Gets a value indicating whether the pattern has a fixed number of occurrences or an end date.voidinternalValidate()Validates this instance.voidinternalWritePropertiesToXml(EwsServiceXmlWriter writer)Write property to XML.booleanisRegenerationPattern()Gets a value indicating whether this instance is regeneration pattern.voidneverEnds()Sets up this recurrence so that it never ends.voidsetEndDate(Date value)sets the date after which the recurrence ends.voidsetNumberOfOccurrences(Integer value)Gets the number of occurrences after which the recurrence ends.voidsetStartDate(Date value)sets the date and time when the recurrence start.voidwriteElementsToXml(EwsServiceXmlWriter writer)Writes elements to XML.-
Methods inherited from class microsoft.exchange.webservices.data.property.complex.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXml, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml, writeToXml
-
-
-
-
Constructor Detail
-
Recurrence
public Recurrence()
Initializes a new instance.
-
Recurrence
public Recurrence(Date startDate)
Initializes a new instance.- Parameters:
startDate- the start date
-
-
Method Detail
-
getXmlElementName
public abstract String getXmlElementName()
Gets the name of the XML element.- Returns:
- the xml element name
-
isRegenerationPattern
public boolean isRegenerationPattern()
Gets a value indicating whether this instance is regeneration pattern.- Returns:
- true, if is regeneration pattern
-
internalWritePropertiesToXml
public void internalWritePropertiesToXml(EwsServiceXmlWriter writer) throws Exception
Write property to XML.- Parameters:
writer- the writer- Throws:
Exception- the exception
-
writeElementsToXml
public final void writeElementsToXml(EwsServiceXmlWriter writer) throws Exception
Writes elements to XML.- Overrides:
writeElementsToXmlin classComplexProperty- Parameters:
writer- the writer- Throws:
Exception- the exception
-
getFieldValueOrThrowIfNull
public <T> T getFieldValueOrThrowIfNull(Class<T> cls, Object value, String name) throws ServiceValidationException
Gets a property value or throw if null. *- Type Parameters:
T- the generic type- Parameters:
cls- the clsvalue- the valuename- the name- Returns:
- Property value
- Throws:
ServiceValidationException- the service validation exception
-
getStartDate
public Date getStartDate() throws ServiceValidationException
Gets the date and time when the recurrence start.- Returns:
- Date
- Throws:
ServiceValidationException- the service validation exception
-
setStartDate
public void setStartDate(Date value)
sets the date and time when the recurrence start.- Parameters:
value- the new start date
-
hasEnd
public boolean hasEnd()
Gets a value indicating whether the pattern has a fixed number of occurrences or an end date.- Returns:
- boolean
-
neverEnds
public void neverEnds()
Sets up this recurrence so that it never ends. Calling NeverEnds is equivalent to setting both NumberOfOccurrences and EndDate to null.
-
internalValidate
public void internalValidate() throws Exception
Validates this instance.- Overrides:
internalValidatein classComplexProperty- Throws:
Exception
-
getNumberOfOccurrences
public Integer getNumberOfOccurrences()
Gets the number of occurrences after which the recurrence ends. Setting NumberOfOccurrences resets EndDate.- Returns:
- the number of occurrences
-
setNumberOfOccurrences
public void setNumberOfOccurrences(Integer value) throws ArgumentException
Gets the number of occurrences after which the recurrence ends. Setting NumberOfOccurrences resets EndDate.- Parameters:
value- the new number of occurrences- Throws:
ArgumentException- the argument exception
-
getEndDate
public Date getEndDate()
Gets the date after which the recurrence ends. Setting EndDate resets NumberOfOccurrences.- Returns:
- the end date
-
setEndDate
public void setEndDate(Date value)
sets the date after which the recurrence ends. Setting EndDate resets NumberOfOccurrences.- Parameters:
value- the new end date
-
-