microsoft.exchange.webservices.data.core.request
Class GetAttachmentRequest

java.lang.Object
  extended by microsoft.exchange.webservices.data.core.request.ServiceRequestBase<T>
      extended by microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase<ServiceResponseCollection<TResponse>>
          extended by microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest<GetAttachmentResponse>
              extended by microsoft.exchange.webservices.data.core.request.GetAttachmentRequest

public final class GetAttachmentRequest
extends MultiResponseServiceRequest<GetAttachmentResponse>

Represents a GetAttachment request.


Constructor Summary
GetAttachmentRequest(ExchangeService service, ServiceErrorHandling errorHandlingMode)
          Initializes a new instance of the GetAttachmentRequest class.
 
Method Summary
protected  GetAttachmentResponse createServiceResponse(ExchangeService service, int responseIndex)
          Creates the service response.
 List<PropertyDefinitionBase> getAdditionalProperties()
          Gets the additional property.
 List<Attachment> getAttachments()
          Gets the attachments.
 BodyType getBodyType()
          Gets the type of the body.
protected  int getExpectedResponseMessageCount()
          Gets the expected response message count.
protected  ExchangeVersion getMinimumRequiredServerVersion()
          Gets the request version.
protected  String getResponseMessageXmlElementName()
          Gets the name of the response message XML element.
protected  String getResponseXmlElementName()
          Gets the name of the response XML element.
 String getXmlElementName()
          Gets the name of the XML element.
 void setBodyType(BodyType bodyType)
          Sets the body type.
protected  void validate()
          Validate request.
protected  void writeElementsToXml(EwsServiceXmlWriter writer)
          Writes XML elements.
 
Methods inherited from class microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest
endExecute, execute, getErrorHandlingMode, parseResponse
 
Methods inherited from class microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase
beginExecute, endInternalExecute, internalExecute
 
Methods inherited from class microsoft.exchange.webservices.data.core.request.ServiceRequestBase
buildEwsHttpPoolingWebRequest, buildEwsHttpWebRequest, getEwsHttpWebResponse, getResponseStream, getService, processWebException, readPreamble, readResponse, readResponse, readSoapFault, throwIfNotSupportedByRequestedServerVersion, traceResponse, validateAndEmitRequest, writeAttributesToXml, writeBodyToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetAttachmentRequest

public GetAttachmentRequest(ExchangeService service,
                            ServiceErrorHandling errorHandlingMode)
                     throws Exception
Initializes a new instance of the GetAttachmentRequest class.

Parameters:
service - The service.
errorHandlingMode - Indicates how errors should be handled.
Throws:
Exception
Method Detail

validate

protected void validate()
                 throws Exception
Validate request.

Overrides:
validate in class ServiceRequestBase<ServiceResponseCollection<GetAttachmentResponse>>
Throws:
Exception - the exception

createServiceResponse

protected GetAttachmentResponse createServiceResponse(ExchangeService service,
                                                      int responseIndex)
Creates the service response.

Specified by:
createServiceResponse in class MultiResponseServiceRequest<GetAttachmentResponse>
Parameters:
service - The service.
responseIndex - Index of the response.
Returns:
Service response.

getExpectedResponseMessageCount

protected int getExpectedResponseMessageCount()
Gets the expected response message count.

Specified by:
getExpectedResponseMessageCount in class MultiResponseServiceRequest<GetAttachmentResponse>
Returns:
Number of expected response messages.

getXmlElementName

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

Specified by:
getXmlElementName in class ServiceRequestBase<ServiceResponseCollection<GetAttachmentResponse>>
Returns:
XML element name

getResponseXmlElementName

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

Specified by:
getResponseXmlElementName in class ServiceRequestBase<ServiceResponseCollection<GetAttachmentResponse>>
Returns:
XML element name

getResponseMessageXmlElementName

protected String getResponseMessageXmlElementName()
Gets the name of the response message XML element.

Specified by:
getResponseMessageXmlElementName in class MultiResponseServiceRequest<GetAttachmentResponse>
Returns:
XML element name

writeElementsToXml

protected void writeElementsToXml(EwsServiceXmlWriter writer)
                           throws XMLStreamException,
                                  ServiceXmlSerializationException
Writes XML elements.

Specified by:
writeElementsToXml in class ServiceRequestBase<ServiceResponseCollection<GetAttachmentResponse>>
Parameters:
writer - the writer
Throws:
XMLStreamException - the XML stream exception
ServiceXmlSerializationException - the service xml serialization exception

getMinimumRequiredServerVersion

protected ExchangeVersion getMinimumRequiredServerVersion()
Gets the request version.

Specified by:
getMinimumRequiredServerVersion in class ServiceRequestBase<ServiceResponseCollection<GetAttachmentResponse>>
Returns:
Earliest Exchange version in which this request is supported.

getAttachments

public List<Attachment> getAttachments()
Gets the attachments.

Returns:
the attachments

getAdditionalProperties

public List<PropertyDefinitionBase> getAdditionalProperties()
Gets the additional property.

Returns:
the additional property

getBodyType

public BodyType getBodyType()
Gets the type of the body.

Returns:
the body type

setBodyType

public void setBodyType(BodyType bodyType)
Sets the body type.

Parameters:
bodyType - the new body type


Copyright © 2012–2015 Microsoft. All rights reserved.