microsoft.exchange.webservices.data.property.complex.time
Class TimeZoneDefinition

java.lang.Object
  extended by microsoft.exchange.webservices.data.property.complex.ComplexProperty
      extended by microsoft.exchange.webservices.data.property.complex.time.TimeZoneDefinition
All Implemented Interfaces:
Comparator<TimeZoneTransition>, ISelfValidate, ComplexFunctionDelegate<EwsServiceXmlReader>
Direct Known Subclasses:
OlsonTimeZoneDefinition

public class TimeZoneDefinition
extends ComplexProperty
implements Comparator<TimeZoneTransition>

Represents a time zone as defined by the EWS schema.


Field Summary
protected  String DaylightPeriodId
          The Daylight period id.
protected  String DaylightPeriodName
          The Daylight period name.
 String id
          The id.
 String name
          The name.
protected  String StandardPeriodId
          The Standard period id.
protected  String StandardPeriodName
          The Standard period name.
 
Constructor Summary
TimeZoneDefinition()
          Initializes a new instance of the TimeZoneDefinition class.
 
Method Summary
 int compare(TimeZoneTransition x, TimeZoneTransition y)
          Compares the transitions.
 String getId()
          Gets the Id of this time zone definition.
 String getName()
          Gets the name of this time zone definition.
 Map<String,TimeZonePeriod> getPeriods()
          Adds a transition group with a single transition to the specified period.
 Map<String,TimeZoneTransitionGroup> getTransitionGroups()
          Gets the transition groups associated with this time zone definition, indexed by Id.
 void loadFromXml(EwsServiceXmlReader reader)
          Loads from XML.
 void readAttributesFromXml(EwsServiceXmlReader reader)
          Reads the attribute from XML.
 void setId(String id)
          Sets the id.
protected  void setName(String name)
          Sets the name.
 boolean tryReadElementFromXml(EwsServiceXmlReader reader)
          Tries to read element from XML.
 void validate()
          Validates this time zone definition.
 void writeAttributesToXml(EwsServiceXmlWriter writer)
          Writes the attribute to XML.
 void writeElementsToXml(EwsServiceXmlWriter writer)
          Writes elements to XML.
protected  void writeToXml(EwsServiceXmlWriter writer)
          Writes to XML.
 void writeToXml(EwsServiceXmlWriter writer, String xmlElementName)
          Writes to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.property.complex.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

StandardPeriodId

protected final String StandardPeriodId
The Standard period id.

See Also:
Constant Field Values

StandardPeriodName

protected final String StandardPeriodName
The Standard period name.

See Also:
Constant Field Values

DaylightPeriodId

protected final String DaylightPeriodId
The Daylight period id.

See Also:
Constant Field Values

DaylightPeriodName

protected final String DaylightPeriodName
The Daylight period name.

See Also:
Constant Field Values

name

public String name
The name.


id

public String id
The id.

Constructor Detail

TimeZoneDefinition

public TimeZoneDefinition()
Initializes a new instance of the TimeZoneDefinition class.

Method Detail

compare

public int compare(TimeZoneTransition x,
                   TimeZoneTransition y)
Compares the transitions.

Specified by:
compare in interface Comparator<TimeZoneTransition>
Parameters:
x - The first transition.
y - The second transition.
Returns:
A negative number if x is less than y, 0 if x and y are equal, a positive number if x is greater than y.

readAttributesFromXml

public void readAttributesFromXml(EwsServiceXmlReader reader)
                           throws Exception
Reads the attribute from XML.

Overrides:
readAttributesFromXml in class ComplexProperty
Parameters:
reader - the reader
Throws:
Exception - the exception

writeAttributesToXml

public void writeAttributesToXml(EwsServiceXmlWriter writer)
                          throws ServiceXmlSerializationException
Writes the attribute to XML.

Overrides:
writeAttributesToXml in class ComplexProperty
Parameters:
writer - the writer
Throws:
ServiceXmlSerializationException - the service xml serialization exception

tryReadElementFromXml

public boolean tryReadElementFromXml(EwsServiceXmlReader reader)
                              throws Exception
Tries to read element from XML.

Overrides:
tryReadElementFromXml in class ComplexProperty
Parameters:
reader - the reader
Returns:
True if element was read.
Throws:
Exception - the exception

loadFromXml

public void loadFromXml(EwsServiceXmlReader reader)
                 throws Exception
Loads from XML.

Parameters:
reader - the reader
Throws:
Exception - the exception

writeElementsToXml

public void writeElementsToXml(EwsServiceXmlWriter writer)
                        throws Exception
Writes elements to XML.

Overrides:
writeElementsToXml in class ComplexProperty
Parameters:
writer - the writer
Throws:
Exception - the exception

writeToXml

protected void writeToXml(EwsServiceXmlWriter writer)
                   throws Exception
Writes to XML.

Parameters:
writer - The writer.
Throws:
Exception - the exception

validate

public void validate()
              throws ServiceLocalException
Validates this time zone definition.

Specified by:
validate in interface ISelfValidate
Overrides:
validate in class ComplexProperty
Throws:
InvalidOrUnsupportedTimeZoneDefinitionException - thrown when time zone definition is not valid.
ServiceValidationException - the service validation exception
ServiceLocalException

getName

public String getName()
Gets the name of this time zone definition.

Returns:
the name

setName

protected void setName(String name)
Sets the name.

Parameters:
name - the new name

getId

public String getId()
Gets the Id of this time zone definition.

Returns:
the id

setId

public void setId(String id)
Sets the id.

Parameters:
id - the new id

getPeriods

public Map<String,TimeZonePeriod> getPeriods()
Adds a transition group with a single transition to the specified period.

Returns:
A TimeZoneTransitionGroup.

getTransitionGroups

public Map<String,TimeZoneTransitionGroup> getTransitionGroups()
Gets the transition groups associated with this time zone definition, indexed by Id.

Returns:
the transition groups

writeToXml

public void writeToXml(EwsServiceXmlWriter writer,
                       String xmlElementName)
                throws Exception
Writes to XML.

Overrides:
writeToXml in class ComplexProperty
Parameters:
writer - accepts EwsServiceXmlWriter
xmlElementName - accepts String
Throws:
Exception - throws Exception


Copyright © 2012–2015 Microsoft. All rights reserved.