Class GenericPropertyDefinition<TPropertyValue extends Serializable>
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.definition.PropertyDefinitionBase
-
- microsoft.exchange.webservices.data.property.definition.ServiceObjectPropertyDefinition
-
- microsoft.exchange.webservices.data.property.definition.PropertyDefinition
-
- microsoft.exchange.webservices.data.property.definition.GenericPropertyDefinition<TPropertyValue>
-
- Type Parameters:
TPropertyValue- Property type.
- Direct Known Subclasses:
BoolPropertyDefinition,DoublePropertyDefinition,IntPropertyDefinition,TaskDelegationStatePropertyDefinition,TimeSpanPropertyDefinition
public class GenericPropertyDefinition<TPropertyValue extends Serializable> extends PropertyDefinition
Represents generic property definition.
-
-
Constructor Summary
Constructors Modifier Constructor Description GenericPropertyDefinition(Class<TPropertyValue> cls, String xmlElementName, String uri, EnumSet<PropertyDefinitionFlags> flags, ExchangeVersion version)Initializes a new instance of the "GenericPropertyDefinition<T>" class.protectedGenericPropertyDefinition(Class<TPropertyValue> cls, String xmlElementName, String uri, EnumSet<PropertyDefinitionFlags> flags, ExchangeVersion version, boolean isNullable)Initializes a new instance of the GenericPropertyDefinition class.GenericPropertyDefinition(Class<TPropertyValue> cls, String xmlElementName, String uri, ExchangeVersion version)Initializes a new instance of the "GenericPropertyDefinition<T>" class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<TPropertyValue>getType()Gets the property type.booleanisNullable()Gets a value indicating whether this property definition is for a nullable type.voidloadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)Loads from XML.protected TPropertyValueparse(String value)Parses the specified value.protected StringtoString(T value)Convert instance to string.voidwritePropertyValueToXml(EwsServiceXmlWriter writer, PropertyBag propertyBag, boolean isUpdateOperation)Writes the property value to XML.-
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
-
-
-
-
Constructor Detail
-
GenericPropertyDefinition
public GenericPropertyDefinition(Class<TPropertyValue> cls, String xmlElementName, String uri, ExchangeVersion version)
Initializes a new instance of the "GenericPropertyDefinition<T>" class.- Parameters:
xmlElementName- Name of the XML element.uri- The URI.version- The version.
-
GenericPropertyDefinition
public GenericPropertyDefinition(Class<TPropertyValue> cls, String xmlElementName, String uri, EnumSet<PropertyDefinitionFlags> flags, ExchangeVersion version)
Initializes a new instance of the "GenericPropertyDefinition<T>" class.- Parameters:
xmlElementName- Name of the XML element.uri- The URI.flags- The flags.version- The version.
-
GenericPropertyDefinition
protected GenericPropertyDefinition(Class<TPropertyValue> cls, String xmlElementName, String uri, EnumSet<PropertyDefinitionFlags> flags, ExchangeVersion version, boolean isNullable)
Initializes a new instance of the GenericPropertyDefinition class.- Parameters:
xmlElementName- Name of the XML element.uri- The URI.flags- The flags.version- The version.isNullable- if set to true, property value is nullable.
-
-
Method Detail
-
parse
protected TPropertyValue parse(String value) throws InstantiationException, IllegalAccessException, ParseException
Parses the specified value.- Parameters:
value- The value- Returns:
- Double value from parsed value.
- Throws:
ParseExceptionIllegalAccessExceptionInstantiationException
-
getType
public Class<TPropertyValue> getType()
Gets the property type.- Specified by:
getTypein classPropertyDefinitionBase
-
isNullable
public boolean isNullable()
Gets a value indicating whether this property definition is for a nullable type.- Overrides:
isNullablein classPropertyDefinition- Returns:
- always true
-
toString
protected String toString(T value)
Convert instance to string.- Parameters:
value- The value.- Returns:
- String representation of property value.
-
loadPropertyValueFromXml
public void loadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag) throws Exception
Loads from XML.- Specified by:
loadPropertyValueFromXmlin classPropertyDefinition- 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:
writePropertyValueToXmlin classPropertyDefinition- Parameters:
writer- The writer.propertyBag- The property bag.isUpdateOperation- Indicates whether the context is an update operation.- Throws:
XMLStreamException- the XML stream exceptionServiceLocalException- the service local exception
-
-