microsoft.exchange.webservices.data.core
Class EwsServiceXmlReader

java.lang.Object
  extended by microsoft.exchange.webservices.data.core.EwsXmlReader
      extended by microsoft.exchange.webservices.data.core.EwsServiceXmlReader
Direct Known Subclasses:
EwsServiceMultiResponseXmlReader

public class EwsServiceXmlReader
extends EwsXmlReader

XML reader.


Constructor Summary
EwsServiceXmlReader(InputStream stream, ExchangeService service)
          Initializes a new instance of the EwsXmlReader class.
 
Method Summary
 ExchangeService getService()
          Gets the service.
 Date readElementValueAsDateTime()
          Reads the element value as date time.
 Date readElementValueAsDateTime(XmlNamespace xmlNamespace, String localName)
          Reads the element value as date time.
 Date readElementValueAsUnbiasedDateTimeScopedToServiceTimeZone()
          Reads the element value as date time, assuming it is unbiased (e.g.
 Date readElementValueAsUnspecifiedDate()
          Reads the element value as unspecified date.
<TServiceObject extends ServiceObject>
List<TServiceObject>
readServiceObjectsCollectionFromXml(String collectionXmlElementName, IGetObjectInstanceDelegate<ServiceObject> getObjectInstanceDelegate, boolean clearPropertyBag, PropertySet requestedPropertySet, boolean summaryPropertiesOnly)
          Reads the service objects collection from XML.
 void setService(ExchangeService service)
          Sets the service.
 
Methods inherited from class microsoft.exchange.webservices.data.core.EwsXmlReader
checkEndElement, ensureCurrentNodeIsEndElement, ensureCurrentNodeIsStartElement, ensureCurrentNodeIsStartElement, getLocalName, getName, getNamespacePrefix, getNamespaceUri, getNodeType, getXmlReaderForNode, hasAttributes, initializeXmlReader, isEmptyElement, isEndElement, isEndElement, isStartElement, isStartElement, isStartElement, read, read, readAttributeValue, readAttributeValue, readAttributeValue, readBase64ElementValue, readBase64ElementValue, readElementValue, readElementValue, readElementValue, readElementValue, readElementValue, readEndElement, readEndElement, readEndElementIfNecessary, readInnerXml, readNullableAttributeValue, readOuterXml, readStartElement, readStartElement, readSubtree, readToDescendant, readToDescendant, readValue, readValue, readValue, skipCurrentElement, skipElement, skipElement, tryReadValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EwsServiceXmlReader

public EwsServiceXmlReader(InputStream stream,
                           ExchangeService service)
                    throws Exception
Initializes a new instance of the EwsXmlReader class.

Parameters:
stream - the stream
service - the service
Throws:
Exception - on error
Method Detail

readElementValueAsDateTime

public Date readElementValueAsDateTime()
                                throws Exception
Reads the element value as date time.

Returns:
Element value
Throws:
Exception - the exception

readElementValueAsUnspecifiedDate

public Date readElementValueAsUnspecifiedDate()
                                       throws Exception
Reads the element value as unspecified date.

Returns:
element value
Throws:
Exception - on error

readElementValueAsUnbiasedDateTimeScopedToServiceTimeZone

public Date readElementValueAsUnbiasedDateTimeScopedToServiceTimeZone()
                                                               throws Exception
Reads the element value as date time, assuming it is unbiased (e.g. 2009/01/01T08:00) and scoped to service's time zone.

Returns:
Date
Throws:
Exception - the exception

readElementValueAsDateTime

public Date readElementValueAsDateTime(XmlNamespace xmlNamespace,
                                       String localName)
                                throws Exception
Reads the element value as date time.

Parameters:
xmlNamespace - the xml namespace
localName - the local name
Returns:
the date
Throws:
Exception - the exception

readServiceObjectsCollectionFromXml

public <TServiceObject extends ServiceObject> List<TServiceObject> readServiceObjectsCollectionFromXml(String collectionXmlElementName,
                                                                                                       IGetObjectInstanceDelegate<ServiceObject> getObjectInstanceDelegate,
                                                                                                       boolean clearPropertyBag,
                                                                                                       PropertySet requestedPropertySet,
                                                                                                       boolean summaryPropertiesOnly)
                                                                               throws Exception
Reads the service objects collection from XML.

Type Parameters:
TServiceObject - the generic type
Parameters:
collectionXmlElementName - the collection xml element name
getObjectInstanceDelegate - the get object instance delegate
clearPropertyBag - the clear property bag
requestedPropertySet - the requested property set
summaryPropertiesOnly - the summary property only
Returns:
the list
Throws:
Exception - the exception

getService

public ExchangeService getService()
Gets the service.

Returns:
the service

setService

public void setService(ExchangeService service)
Sets the service.

Parameters:
service - the new service


Copyright © 2012–2015 Microsoft. All rights reserved.