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

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
Direct Known Subclasses:
ByteArrayPropertyDefinition, ComplexPropertyDefinitionBase, DateTimePropertyDefinition, EffectiveRightsPropertyDefinition, GenericPropertyDefinition, MeetingTimeZonePropertyDefinition, RecurrencePropertyDefinition, ResponseObjectsPropertyDefinition, StringPropertyDefinition, TimeZonePropertyDefinition

public abstract class PropertyDefinition
extends ServiceObjectPropertyDefinition

Represents the definition of a folder or item property.


Constructor Summary
protected PropertyDefinition(String xmlElementName, EnumSet<PropertyDefinitionFlags> flags, ExchangeVersion version)
          Initializes a new instance.
protected PropertyDefinition(String xmlElementName, String uri, EnumSet<PropertyDefinitionFlags> flags, ExchangeVersion version)
          Initializes a new instance.
protected PropertyDefinition(String xmlElementName, String uri, ExchangeVersion version)
          Initializes a new instance.
 
Method Summary
 List<PropertyDefinition> getAssociatedInternalProperties()
          Gets a list of associated internal property.
 String getName()
          Gets the name of the property.
 String getPrintableName()
          Gets the property definition's printable name.
 ExchangeVersion getVersion()
          Gets the minimum Exchange version that supports this property.
 String getXmlElement()
          Gets the name of the XML element.
 boolean hasFlag(PropertyDefinitionFlags flag)
          Determines whether the specified flag is set.
 boolean hasFlag(PropertyDefinitionFlags flag, ExchangeVersion version)
          Determines whether the specified flag is set.
 boolean isNullable()
          Gets a value indicating whether this property definition is for a nullable type.
abstract  void loadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)
          Loads from XML.
protected  void registerAssociatedInternalProperties(List<PropertyDefinition> properties)
          Registers associated internal property.
 void setName(String name)
          Sets the name of the property.
abstract  void writePropertyValueToXml(EwsServiceXmlWriter writer, PropertyBag propertyBag, boolean isUpdateOperation)
          Writes the property value to XML.
 
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
getType, toString, tryLoadFromXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyDefinition

protected PropertyDefinition(String xmlElementName,
                             String uri,
                             ExchangeVersion version)
Initializes a new instance.

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

PropertyDefinition

protected PropertyDefinition(String xmlElementName,
                             EnumSet<PropertyDefinitionFlags> flags,
                             ExchangeVersion version)
Initializes a new instance.

Parameters:
xmlElementName - Name of the XML element.
flags - The flags.
version - The version.

PropertyDefinition

protected PropertyDefinition(String xmlElementName,
                             String uri,
                             EnumSet<PropertyDefinitionFlags> flags,
                             ExchangeVersion version)
Initializes a new instance.

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

hasFlag

public boolean hasFlag(PropertyDefinitionFlags flag)
Determines whether the specified flag is set.

Parameters:
flag - The flag.
Returns:
true if the specified flag is set; otherwise, false.

hasFlag

public boolean hasFlag(PropertyDefinitionFlags flag,
                       ExchangeVersion version)
Determines whether the specified flag is set.

Parameters:
flag - The flag.
Returns:
true if the specified flag is set; otherwise, false.

registerAssociatedInternalProperties

protected void registerAssociatedInternalProperties(List<PropertyDefinition> properties)
Registers associated internal property.

Parameters:
properties - The list in which to add the associated property.

getAssociatedInternalProperties

public List<PropertyDefinition> getAssociatedInternalProperties()
Gets a list of associated internal property.

Returns:
A list of PropertyDefinition objects. This is a hack. It is here (currently) solely to help the API register the MeetingTimeZone property definition that is internal.

getVersion

public ExchangeVersion getVersion()
Gets the minimum Exchange version that supports this property.

Overrides:
getVersion in class ServiceObjectPropertyDefinition
Returns:
The version.

isNullable

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

Returns:
always true

loadPropertyValueFromXml

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

Parameters:
reader - The reader.
propertyBag - The property bag.
Throws:
Exception - the exception

writePropertyValueToXml

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

Parameters:
writer - the writer
propertyBag - the property bag
isUpdateOperation - indicates whether the context is an update operation
Throws:
Exception - the exception

getXmlElement

public String getXmlElement()
Gets the name of the XML element.

Returns:
The name of the XML element.

getName

public String getName()
Gets the name of the property.

Returns:
Name of the property.

setName

public void setName(String name)
Sets the name of the property.

Parameters:
name - name of the property

getPrintableName

public String getPrintableName()
Gets the property definition's printable name.

Specified by:
getPrintableName in class PropertyDefinitionBase
Returns:
The property definition's printable name.


Copyright © 2012–2015 Microsoft. All rights reserved.