Class GetAttachmentRequest
- java.lang.Object
-
- microsoft.exchange.webservices.data.core.request.ServiceRequestBase<T>
-
- microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase<ServiceResponseCollection<TResponse>>
-
- microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest<GetAttachmentResponse>
-
- microsoft.exchange.webservices.data.core.request.GetAttachmentRequest
-
public final class GetAttachmentRequest extends MultiResponseServiceRequest<GetAttachmentResponse>
Represents a GetAttachment request.
-
-
Constructor Summary
Constructors Constructor Description GetAttachmentRequest(ExchangeService service, ServiceErrorHandling errorHandlingMode)Initializes a new instance of the GetAttachmentRequest class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GetAttachmentResponsecreateServiceResponse(ExchangeService service, int responseIndex)Creates the service response.List<PropertyDefinitionBase>getAdditionalProperties()Gets the additional property.List<Attachment>getAttachments()Gets the attachments.BodyTypegetBodyType()Gets the type of the body.protected intgetExpectedResponseMessageCount()Gets the expected response message count.protected ExchangeVersiongetMinimumRequiredServerVersion()Gets the request version.protected StringgetResponseMessageXmlElementName()Gets the name of the response message XML element.protected StringgetResponseXmlElementName()Gets the name of the response XML element.StringgetXmlElementName()Gets the name of the XML element.voidsetBodyType(BodyType bodyType)Sets the body type.protected voidvalidate()Validate request.protected voidwriteElementsToXml(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
-
-
-
-
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:
validatein classServiceRequestBase<ServiceResponseCollection<GetAttachmentResponse>>- Throws:
Exception- the exception
-
createServiceResponse
protected GetAttachmentResponse createServiceResponse(ExchangeService service, int responseIndex)
Creates the service response.- Specified by:
createServiceResponsein classMultiResponseServiceRequest<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:
getExpectedResponseMessageCountin classMultiResponseServiceRequest<GetAttachmentResponse>- Returns:
- Number of expected response messages.
-
getXmlElementName
public String getXmlElementName()
Gets the name of the XML element.- Specified by:
getXmlElementNamein classServiceRequestBase<ServiceResponseCollection<GetAttachmentResponse>>- Returns:
- XML element name
-
getResponseXmlElementName
protected String getResponseXmlElementName()
Gets the name of the response XML element.- Specified by:
getResponseXmlElementNamein classServiceRequestBase<ServiceResponseCollection<GetAttachmentResponse>>- Returns:
- XML element name
-
getResponseMessageXmlElementName
protected String getResponseMessageXmlElementName()
Gets the name of the response message XML element.- Specified by:
getResponseMessageXmlElementNamein classMultiResponseServiceRequest<GetAttachmentResponse>- Returns:
- XML element name
-
writeElementsToXml
protected void writeElementsToXml(EwsServiceXmlWriter writer) throws XMLStreamException, ServiceXmlSerializationException
Writes XML elements.- Specified by:
writeElementsToXmlin classServiceRequestBase<ServiceResponseCollection<GetAttachmentResponse>>- Parameters:
writer- the writer- Throws:
XMLStreamException- the XML stream exceptionServiceXmlSerializationException- the service xml serialization exception
-
getMinimumRequiredServerVersion
protected ExchangeVersion getMinimumRequiredServerVersion()
Gets the request version.- Specified by:
getMinimumRequiredServerVersionin classServiceRequestBase<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
-
-