microsoft.exchange.webservices.data.property.definition
Class TimeSpanPropertyDefinition

java.lang.Object
  extended by microsoft.exchange.webservices.data.property.definition.PropertyDefinitionBase
      extended by microsoft.exchange.webservices.data.property.definition.ServiceObjectPropertyDefinition
          extended by microsoft.exchange.webservices.data.property.definition.PropertyDefinition
              extended by microsoft.exchange.webservices.data.property.definition.GenericPropertyDefinition<TimeSpan>
                  extended by microsoft.exchange.webservices.data.property.definition.TimeSpanPropertyDefinition

public class TimeSpanPropertyDefinition
extends GenericPropertyDefinition<TimeSpan>

Represents TimeSpan property definition.


Constructor Summary
TimeSpanPropertyDefinition(String xmlElementName, String uri, EnumSet<PropertyDefinitionFlags> flags, ExchangeVersion version)
          Initializes a new instance of the "TimeSpanPropertyDefinition" class.
 
Method Summary
 boolean isNullable()
          Gets a value indicating whether this property definition is for a nullable type.
 void loadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)
          Loads from XML.
protected  TimeSpan parse(String value)
          Parses the specified value.
protected  String toString(TimeSpan value)
          Convert instance to string.
 void writePropertyValueToXml(EwsServiceXmlWriter writer, PropertyBag propertyBag, boolean isUpdateOperation)
          Writes the property value to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.property.definition.GenericPropertyDefinition
getType
 
Methods inherited from class microsoft.exchange.webservices.data.property.definition.PropertyDefinition
getAssociatedInternalProperties, getName, getPrintableName, getVersion, getXmlElement, hasFlag, hasFlag, registerAssociatedInternalProperties, setName
 
Methods inherited from class microsoft.exchange.webservices.data.property.definition.ServiceObjectPropertyDefinition
getUri, getXmlElementName, writeAttributesToXml
 
Methods inherited from class microsoft.exchange.webservices.data.property.definition.PropertyDefinitionBase
toString, tryLoadFromXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeSpanPropertyDefinition

public TimeSpanPropertyDefinition(String xmlElementName,
                                  String uri,
                                  EnumSet<PropertyDefinitionFlags> flags,
                                  ExchangeVersion version)
Initializes a new instance of the "TimeSpanPropertyDefinition" class.

Parameters:
xmlElementName - Name of the XML element.
uri - The URI.
flags - The flags.
version - The version.
Method Detail

parse

protected TimeSpan parse(String value)
Parses the specified value.

Overrides:
parse in class GenericPropertyDefinition<TimeSpan>
Parameters:
value - The value.
Returns:
Typed value.

toString

protected String toString(TimeSpan value)
Convert instance to string.

Parameters:
value - The value.
Returns:
String representation of property value.

isNullable

public boolean isNullable()
Gets a value indicating whether this property definition is for a nullable type.

Overrides:
isNullable in class PropertyDefinition
Returns:
always true

loadPropertyValueFromXml

public void loadPropertyValueFromXml(EwsServiceXmlReader reader,
                                     PropertyBag propertyBag)
                              throws Exception
Loads from XML.

Specified by:
loadPropertyValueFromXml in class PropertyDefinition
Parameters:
reader - The reader.
propertyBag - The property bag.
Throws:
Exception - the exception

writePropertyValueToXml

public void writePropertyValueToXml(EwsServiceXmlWriter writer,
                                    PropertyBag propertyBag,
                                    boolean isUpdateOperation)
                             throws XMLStreamException,
                                    ServiceLocalException
Writes the property value to XML.

Specified by:
writePropertyValueToXml in class PropertyDefinition
Parameters:
writer - The writer.
propertyBag - The property bag.
isUpdateOperation - Indicates whether the context is an update operation.
Throws:
XMLStreamException - the XML stream exception
ServiceLocalException - the service local exception


Copyright © 2012–2015 Microsoft. All rights reserved.