public final class PropertySet extends Object implements ISelfValidate, Iterable<PropertyDefinitionBase>
Modifier and Type | Field and Description |
---|---|
static PropertySet |
FirstClassProperties
The Constant FirstClassProperties.
|
static PropertySet |
IdOnly
The Constant IdOnly.
|
Constructor and Description |
---|
PropertySet()
Initializes a new instance of PropertySet based upon
BasePropertySet.IdOnly.
|
PropertySet(BasePropertySet basePropertySet)
Initializes a new instance of PropertySet.
|
PropertySet(BasePropertySet basePropertySet,
Iterator<PropertyDefinitionBase> additionalProperties)
Initializes a new instance of PropertySet.
|
PropertySet(BasePropertySet basePropertySet,
PropertyDefinitionBase... additionalProperties)
Initializes a new instance of PropertySet.
|
PropertySet(Iterator<PropertyDefinitionBase> additionalProperties)
Initializes a new instance of PropertySet based upon
BasePropertySet.IdOnly.
|
PropertySet(PropertyDefinitionBase... additionalProperties)
Initializes a new instance of PropertySet based upon
BasePropertySet.IdOnly.
|
Modifier and Type | Method and Description |
---|---|
void |
add(PropertyDefinitionBase property)
Adds the specified property to the property set.
|
void |
addRange(Iterable<PropertyDefinitionBase> properties)
Adds the specified property to the property set.
|
void |
clear()
Remove all explicitly added property from the property set.
|
boolean |
contains(PropertyDefinitionBase property)
Determines whether the specified property has been explicitly added to
this property set using the Add or AddRange methods.
|
BasePropertySet |
getBasePropertySet()
Gets the base property set, the property set is based upon.
|
Boolean |
getConvertHtmlCodePageToUTF8()
Gets value indicating whether or not to convert
HTML code page to UTF8 encoding.
|
int |
getCount()
Gets the number of explicitly added property in this set.
|
static LazyMember<Map<BasePropertySet,String>> |
getDefaultPropertySetMap()
Maps BasePropertySet values to EWS's BaseShape values.
|
Boolean |
getFilterHtmlContent()
Gets value indicating whether or not to filter potentially unsafe HTML
content from message bodies.
|
static PropertySet |
getFirstClassProperties()
Returns a predefined property set that includes the first class
property of an item or folder.
|
static PropertySet |
getIdOnly()
Returns a predefined property set that only includes the Id property.
|
PropertyDefinitionBase |
getPropertyDefinitionBaseAt(int index)
Gets the PropertyDefinitionBase at the specified index.
|
static PropertySet |
getPropertySetFromBasePropertySet(BasePropertySet basePropertySet)
Implements an implicit conversion between
PropertySet and BasePropertySet.
|
BodyType |
getRequestedBodyType()
Gets type of body that should be loaded on item.
|
void |
internalValidate()
Validates this property set.
|
Iterator<PropertyDefinitionBase> |
iterator() |
boolean |
remove(PropertyDefinitionBase property)
Removes the specified property from the set.
|
void |
setBasePropertySet(BasePropertySet basePropertySet)
Sets the base property set, the property set is based upon.
|
void |
setConvertHtmlCodePageToUTF8(Boolean value)
Sets value indicating whether or not to
convert HTML code page to UTF8 encoding.
|
void |
setFilterHtmlContent(Boolean filterHtml)
Sets value indicating whether or not to filter potentially unsafe HTML
content from message bodies.
|
void |
setRequestedBodyType(BodyType requestedBodyType)
Sets type of body that should be loaded on item.
|
void |
validate()
Validate.
|
void |
validateForRequest(ServiceRequestBase request,
boolean summaryPropertiesOnly)
Validates this property set instance for request to ensure that: 1.
|
static void |
writeAdditionalPropertiesToXml(EwsServiceXmlWriter writer,
Iterator<PropertyDefinitionBase> propertyDefinitions)
Writes additional property to XML.
|
void |
writeToXml(EwsServiceXmlWriter writer,
ServiceObjectType serviceObjectType)
Writes the property set to XML.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final PropertySet IdOnly
public static final PropertySet FirstClassProperties
public PropertySet(BasePropertySet basePropertySet, PropertyDefinitionBase... additionalProperties)
basePropertySet
- The base property set to base the property set upon.additionalProperties
- Additional property to include in the property set. Property
definitions are available as static members from schema
classes (for example, EmailMessageSchema.Subject,
AppointmentSchema.Start, ContactSchema.GivenName, etc.)public PropertySet(BasePropertySet basePropertySet, Iterator<PropertyDefinitionBase> additionalProperties)
basePropertySet
- The base property set to base the property set upon.additionalProperties
- Additional property to include in the property set. Property
definitions are available as static members from schema
classes (for example, EmailMessageSchema.Subject,
AppointmentSchema.Start, ContactSchema.GivenName, etc.)public PropertySet()
public PropertySet(BasePropertySet basePropertySet)
basePropertySet
- The base property set to base the property set upon.public PropertySet(PropertyDefinitionBase... additionalProperties)
additionalProperties
- Additional property to include in the property set. Property
definitions are available as static members from schema
classes (for example, EmailMessageSchema.Subject,
AppointmentSchema.Start, ContactSchema.GivenName, etc.)public PropertySet(Iterator<PropertyDefinitionBase> additionalProperties)
additionalProperties
- Additional property to include in the property set. Property
definitions are available as static members from schema
classes (for example, EmailMessageSchema.Subject,
AppointmentSchema.Start, ContactSchema.GivenName, etc.)public static PropertySet getIdOnly()
public static PropertySet getFirstClassProperties()
public static PropertySet getPropertySetFromBasePropertySet(BasePropertySet basePropertySet)
basePropertySet
- The BasePropertySet value to convert from.public void add(PropertyDefinitionBase property) throws Exception
property
- The property to add.Exception
- the exceptionpublic void addRange(Iterable<PropertyDefinitionBase> properties) throws Exception
properties
- The property to add.Exception
- the exceptionpublic void clear()
public boolean contains(PropertyDefinitionBase property)
property
- The property.public boolean remove(PropertyDefinitionBase property)
property
- The property to remove.public BasePropertySet getBasePropertySet()
public static LazyMember<Map<BasePropertySet,String>> getDefaultPropertySetMap()
public void setBasePropertySet(BasePropertySet basePropertySet)
basePropertySet
- Base property set.public BodyType getRequestedBodyType()
public void setRequestedBodyType(BodyType requestedBodyType)
requestedBodyType
- Type of body that should be loaded on item.public int getCount()
public Boolean getFilterHtmlContent()
public void setFilterHtmlContent(Boolean filterHtml)
filterHtml
- true to filter otherwise false.public Boolean getConvertHtmlCodePageToUTF8()
public void setConvertHtmlCodePageToUTF8(Boolean value)
public PropertyDefinitionBase getPropertyDefinitionBaseAt(int index)
index
- Index.public void validate() throws ServiceValidationException
validate
in interface ISelfValidate
ServiceValidationException
- the service validation exceptionpublic static void writeAdditionalPropertiesToXml(EwsServiceXmlWriter writer, Iterator<PropertyDefinitionBase> propertyDefinitions) throws XMLStreamException, ServiceXmlSerializationException
writer
- The writer to write topropertyDefinitions
- The property definitions to writeXMLStreamException
- the XML stream exceptionServiceXmlSerializationException
- the service xml serialization exceptionpublic void internalValidate() throws ServiceValidationException
ServiceValidationException
- the service validation exceptionpublic void validateForRequest(ServiceRequestBase request, boolean summaryPropertiesOnly) throws ServiceVersionException, ServiceValidationException
request
- The request.summaryPropertiesOnly
- if set to true then only summary property are allowed.ServiceVersionException
- the service version exceptionServiceValidationException
- the service validation exceptionpublic void writeToXml(EwsServiceXmlWriter writer, ServiceObjectType serviceObjectType) throws XMLStreamException, ServiceXmlSerializationException
writer
- The writer to write toserviceObjectType
- The type of service object the property set is emitted forXMLStreamException
- the XML stream exceptionServiceXmlSerializationException
- the service xml serialization exceptionpublic Iterator<PropertyDefinitionBase> iterator()
iterator
in interface Iterable<PropertyDefinitionBase>
Copyright © 2012–2015 Microsoft. All rights reserved.