microsoft.exchange.webservices.data
Class UpdateDelegateRequest

java.lang.Object
  extended by microsoft.exchange.webservices.data.UpdateDelegateRequest

public class UpdateDelegateRequest
extends java.lang.Object

Represents an UpdateDelegate request.


Constructor Summary
protected UpdateDelegateRequest(ExchangeService service)
          Initializes a new instance of the class.
 
Method Summary
protected  AsyncRequestResult beginExecute(microsoft.exchange.webservices.data.AsyncCallback callback, java.lang.Object state)
          Begins executing this async request.
protected  OutParam<microsoft.exchange.webservices.data.HttpWebRequest> buildEwsHttpWebRequest()
           Builds the HttpWebRequest object for current service request with exception handling.
protected  microsoft.exchange.webservices.data.DelegateManagementResponse createResponse()
          Creates the response.
protected  microsoft.exchange.webservices.data.HttpWebRequest emit(OutParam<microsoft.exchange.webservices.data.HttpWebRequest> request)
          * Send request and get response.
protected  microsoft.exchange.webservices.data.HttpWebRequest endGetEwsHttpWebResponse(OutParam<microsoft.exchange.webservices.data.HttpWebRequest> request, AsyncRequestResult asyncResult)
          Ends getting the specified async HttpWebRequest object from the specified IEwsHttpWebRequest object with exception handling.
protected  java.lang.Object endInternalExecute(IAsyncResult asyncResult)
          Ends executing this async request.
protected  TResponse execute()
          Executes this request.
 java.util.List<DelegateUser> getDelegateUsers()
          Gets the delegate users.
protected  microsoft.exchange.webservices.data.HttpWebRequest getEwsHttpWebResponse(OutParam<microsoft.exchange.webservices.data.HttpWebRequest> outparam)
          Gets the IEwsHttpWebRequest object from the specifiedHttpWebRequest object with exception handling
 Mailbox getMailbox()
          Gets the mailbox.
 MeetingRequestsDeliveryScope getMeetingRequestsDeliveryScope()
          Gets the meeting requests delivery scope.
protected  ExchangeVersion getMinimumRequiredServerVersion()
          Gets the request version.
protected static java.io.InputStream getResponseStream(microsoft.exchange.webservices.data.HttpWebRequest request)
          * Gets the response stream (may be wrapped with GZip/Deflate stream to decompress content).
protected  java.lang.String getResponseXmlElementName()
          Gets the name of the response XML element.
protected  ExchangeService getService()
          Gets the service.
protected  java.lang.String getXmlElementName()
          Gets the name of the XML element.
protected  java.lang.Object internalExecute()
          Executes this request.
protected  java.lang.Object parseResponse(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Parses the response.
protected  void processWebException(java.lang.Exception webException, microsoft.exchange.webservices.data.HttpWebRequest req)
          * Processes the web exception.
protected  void readPreamble(microsoft.exchange.webservices.data.EwsServiceXmlReader ewsXmlReader)
          * Reads any preamble data not part of the core response.
protected  java.lang.Object readResponse(microsoft.exchange.webservices.data.EwsServiceXmlReader ewsXmlReader)
          * Reads the response.
protected  microsoft.exchange.webservices.data.SoapFaultDetails readSoapFault(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Reads the SOAP fault.
 void setMailbox(Mailbox mailbox)
          Sets the mailbox.
 void setMeetingRequestsDeliveryScope(MeetingRequestsDeliveryScope value)
          Sets the meeting requests delivery scope.
protected  void throwIfNotSupportedByRequestedServerVersion()
          * Throw exception if request is not supported in requested server version.
protected  void traceResponse(microsoft.exchange.webservices.data.HttpWebRequest request, java.io.ByteArrayOutputStream memoryStream)
          * Traces the response.
protected  void validate()
          Validate request..
protected  microsoft.exchange.webservices.data.HttpWebRequest validateAndEmitRequest(OutParam<microsoft.exchange.webservices.data.HttpWebRequest> request)
          * Validates request parameters, and emits the request to the server.
protected  void writeAttributesToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          * Writes XML attributes.
protected  void writeBodyToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          * Writes XML body.
protected  void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          Writes XML elements.
protected  void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          * Writes XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateDelegateRequest

protected UpdateDelegateRequest(ExchangeService service)
                         throws java.lang.Exception
Initializes a new instance of the class.

Parameters:
service - the service
Throws:
java.lang.Exception
Method Detail

validate

protected void validate()
                 throws java.lang.Exception
Validate request..

Throws:
java.lang.Exception - the exception

writeElementsToXml

protected void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                           throws java.lang.Exception
Writes XML elements.

Parameters:
writer - the writer
Throws:
java.lang.Exception - the exception

getResponseXmlElementName

protected java.lang.String getResponseXmlElementName()
Gets the name of the response XML element.

Returns:
XML element name.

createResponse

protected microsoft.exchange.webservices.data.DelegateManagementResponse createResponse()
Creates the response.

Returns:
Response object.

getXmlElementName

protected java.lang.String getXmlElementName()
Gets the name of the XML element.

Returns:
Xml element name.

getMinimumRequiredServerVersion

protected ExchangeVersion getMinimumRequiredServerVersion()
Gets the request version.

Returns:
Earliest Exchange version in which this request is supported.

getMeetingRequestsDeliveryScope

public MeetingRequestsDeliveryScope getMeetingRequestsDeliveryScope()
Gets the meeting requests delivery scope. The meeting requests delivery scope.

Returns:
the meeting requests delivery scope

setMeetingRequestsDeliveryScope

public void setMeetingRequestsDeliveryScope(MeetingRequestsDeliveryScope value)
Sets the meeting requests delivery scope.

Parameters:
value - the new meeting requests delivery scope

getDelegateUsers

public java.util.List<DelegateUser> getDelegateUsers()
Gets the delegate users. The delegate users.

Returns:
the delegate users

parseResponse

protected java.lang.Object parseResponse(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                                  throws java.lang.Exception
Parses the response.

Parameters:
reader - the reader
Returns:
Response object.
Throws:
java.lang.Exception - the exception

execute

protected TResponse execute()
                                                                                            throws java.lang.Exception
Executes this request.

Returns:
Response object.
Throws:
java.lang.Exception - the exception

getMailbox

public Mailbox getMailbox()
Gets the mailbox. The mailbox.

Returns:
the mailbox

setMailbox

public void setMailbox(Mailbox mailbox)
Sets the mailbox.

Parameters:
mailbox - the new mailbox

internalExecute

protected java.lang.Object internalExecute()
                                    throws ServiceLocalException,
                                           java.lang.Exception
Executes this request.

Throws:
java.lang.Exception
ServiceLocalException

endInternalExecute

protected java.lang.Object endInternalExecute(IAsyncResult asyncResult)
                                       throws java.lang.Exception
Ends executing this async request.

Parameters:
asyncResult - The async result
Throws:
java.lang.Exception

beginExecute

protected AsyncRequestResult beginExecute(microsoft.exchange.webservices.data.AsyncCallback callback,
                                          java.lang.Object state)
                                   throws java.lang.Exception
Begins executing this async request.

Parameters:
callback - The AsyncCallback delegate.
state - An object that contains state information for this request.
Throws:
java.lang.Exception

writeBodyToXml

protected void writeBodyToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                       throws java.lang.Exception
* Writes XML body.

Parameters:
writer - The writer.
Throws:
java.lang.Exception - the exception

writeAttributesToXml

protected void writeAttributesToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                             throws ServiceXmlSerializationException
* Writes XML attributes. Subclass will override if it has XML attributes.

Parameters:
writer - The writer.
Throws:
ServiceXmlSerializationException - the service xml serialization exception

getService

protected ExchangeService getService()
Gets the service.

Returns:
The service.

throwIfNotSupportedByRequestedServerVersion

protected void throwIfNotSupportedByRequestedServerVersion()
                                                    throws ServiceVersionException
* Throw exception if request is not supported in requested server version.

Throws:
ServiceVersionException - the service version exception

writeToXml

protected void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                   throws java.lang.Exception
* Writes XML.

Parameters:
writer - The writer.
Throws:
java.lang.Exception - the exception

emit

protected microsoft.exchange.webservices.data.HttpWebRequest emit(OutParam<microsoft.exchange.webservices.data.HttpWebRequest> request)
                                                           throws java.lang.Exception
* Send request and get response.

Returns:
HttpWebRequest object from which response stream can be read.
Throws:
java.lang.Exception - the exception

getResponseStream

protected static java.io.InputStream getResponseStream(microsoft.exchange.webservices.data.HttpWebRequest request)
                                                throws java.io.IOException,
                                                       EWSHttpException
* Gets the response stream (may be wrapped with GZip/Deflate stream to decompress content).

Parameters:
request - HttpWebRequest object from which response stream can be read.
Returns:
ResponseStream
Throws:
java.io.IOException - Signals that an I/O exception has occurred.
EWSHttpException - the eWS http exception

traceResponse

protected void traceResponse(microsoft.exchange.webservices.data.HttpWebRequest request,
                             java.io.ByteArrayOutputStream memoryStream)
                      throws javax.xml.stream.XMLStreamException,
                             java.io.IOException,
                             EWSHttpException
* Traces the response.

Parameters:
request - The response.
memoryStream - The response content in a MemoryStream.
Throws:
javax.xml.stream.XMLStreamException - the xML stream exception
java.io.IOException - Signals that an I/O exception has occurred.
EWSHttpException - the eWS http exception

readResponse

protected java.lang.Object readResponse(microsoft.exchange.webservices.data.EwsServiceXmlReader ewsXmlReader)
                                 throws java.lang.Exception
* Reads the response.

Parameters:
ewsXmlReader - The XML reader.
Returns:
Service response.
Throws:
java.lang.Exception - the exception

readPreamble

protected void readPreamble(microsoft.exchange.webservices.data.EwsServiceXmlReader ewsXmlReader)
                     throws java.lang.Exception
* Reads any preamble data not part of the core response.

Parameters:
ewsXmlReader - The EwsServiceXmlReader.
Throws:
java.lang.Exception

endGetEwsHttpWebResponse

protected microsoft.exchange.webservices.data.HttpWebRequest endGetEwsHttpWebResponse(OutParam<microsoft.exchange.webservices.data.HttpWebRequest> request,
                                                                                      AsyncRequestResult asyncResult)
                                                                               throws java.lang.Exception
Ends getting the specified async HttpWebRequest object from the specified IEwsHttpWebRequest object with exception handling.

Parameters:
request - The specified HttpWebRequest
asyncResult - An IAsyncResult that references the asynchronous request.
Throws:
java.lang.Exception

processWebException

protected void processWebException(java.lang.Exception webException,
                                   microsoft.exchange.webservices.data.HttpWebRequest req)
                            throws java.lang.Exception
* Processes the web exception.

Parameters:
webException - The web exception.
req - http Request object used to send the http request.
Throws:
java.lang.Exception
java.lang.Exception

readSoapFault

protected microsoft.exchange.webservices.data.SoapFaultDetails readSoapFault(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
Reads the SOAP fault.

Parameters:
reader - The reader.
Returns:
SOAP fault details.

validateAndEmitRequest

protected microsoft.exchange.webservices.data.HttpWebRequest validateAndEmitRequest(OutParam<microsoft.exchange.webservices.data.HttpWebRequest> request)
                                                                             throws ServiceLocalException,
                                                                                    java.lang.Exception
* Validates request parameters, and emits the request to the server.

Parameters:
request - The request.
Returns:
The response returned by the server.
Throws:
ServiceLocalException
java.lang.Exception

buildEwsHttpWebRequest

protected OutParam<microsoft.exchange.webservices.data.HttpWebRequest> buildEwsHttpWebRequest()
                                                                                       throws java.lang.Exception
Builds the HttpWebRequest object for current service request with exception handling.

Throws:
java.lang.Exception

getEwsHttpWebResponse

protected microsoft.exchange.webservices.data.HttpWebRequest getEwsHttpWebResponse(OutParam<microsoft.exchange.webservices.data.HttpWebRequest> outparam)
                                                                            throws java.lang.Exception
Gets the IEwsHttpWebRequest object from the specifiedHttpWebRequest object with exception handling

Parameters:
request - The specified HttpWebRequest
Throws:
java.lang.Exception