microsoft.exchange.webservices.data.core.request
Class FindItemRequest<TItem extends Item>

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<TResponse>
              extended by microsoft.exchange.webservices.data.core.request.FindItemRequest<TItem>
Type Parameters:
TItem - The type of the item.

public final class FindItemRequest<TItem extends Item>
extends MultiResponseServiceRequest<TResponse>

Represents a FindItem request.


Constructor Summary
FindItemRequest(ExchangeService service, ServiceErrorHandling errorHandlingMode)
          Initializes a new instance of the FindItemRequest class.
 
Method Summary
protected  FindItemResponse<TItem> createServiceResponse(ExchangeService service, int responseIndex)
          Creates the service response.
protected  int getExpectedResponseMessageCount()
          Gets the expected response message count.
 Grouping getGroupBy()
          Gets the group by.
protected  ExchangeVersion getMinimumRequiredServerVersion()
          Gets the request version.
 FolderIdWrapperList getParentFolderIds()
          Gets the parent folder ids.
 String getQueryString()
          Gets the query string for indexed search.
protected  String getResponseMessageXmlElementName()
          Gets the name of the response message XML element.
protected  String getResponseXmlElementName()
          Gets the name of the response XML element.
 SearchFilter getSearchFilter()
          Gets the search filter.
 ViewBase getView()
          Gets the view controlling the number of item or folder returned.
 String getXmlElementName()
          Gets the name of the XML element.
 void setGroupBy(Grouping value)
          Sets the group by.
 void setQueryString(String queryString)
          Sets the query string for indexed search.
 void setSearchFilter(SearchFilter searchFilter)
          Sets the search filter.
 void setView(ViewBase view)
          Sets the view controlling the number of item or folder returned.
protected  void validate()
          Validate request.
protected  void writeAttributesToXml(EwsServiceXmlWriter writer)
          Writes XML attribute.
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, writeBodyToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindItemRequest

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

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

createServiceResponse

protected FindItemResponse<TItem> createServiceResponse(ExchangeService service,
                                                        int responseIndex)
Creates the service response.

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

getXmlElementName

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

Specified by:
getXmlElementName in class ServiceRequestBase<ServiceResponseCollection<FindItemResponse<TItem extends Item>>>
Returns:
XML element name.

getResponseXmlElementName

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

Specified by:
getResponseXmlElementName in class ServiceRequestBase<ServiceResponseCollection<FindItemResponse<TItem extends Item>>>
Returns:
XML element name.

getResponseMessageXmlElementName

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

Specified by:
getResponseMessageXmlElementName in class MultiResponseServiceRequest<FindItemResponse<TItem extends Item>>
Returns:
XML element name.

getMinimumRequiredServerVersion

protected ExchangeVersion getMinimumRequiredServerVersion()
Gets the request version.

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

getGroupBy

public Grouping getGroupBy()
Gets the group by.

Returns:
the group by

setGroupBy

public void setGroupBy(Grouping value)
Sets the group by.

Parameters:
value - the new group by

validate

protected void validate()
                 throws ServiceLocalException,
                        Exception
Validate request.

Overrides:
validate in class ServiceRequestBase<ServiceResponseCollection<TResponse extends ServiceResponse>>
Throws:
ServiceLocalException - the service local exception
Exception - the exception

getExpectedResponseMessageCount

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

Specified by:
getExpectedResponseMessageCount in class MultiResponseServiceRequest<TResponse extends ServiceResponse>
Returns:
XML element name.

writeAttributesToXml

protected void writeAttributesToXml(EwsServiceXmlWriter writer)
                             throws ServiceXmlSerializationException
Writes XML attribute.

Overrides:
writeAttributesToXml in class ServiceRequestBase<ServiceResponseCollection<TResponse extends ServiceResponse>>
Parameters:
writer - The Writer
Throws:
ServiceXmlSerializationException - the service xml serialization exception

writeElementsToXml

protected void writeElementsToXml(EwsServiceXmlWriter writer)
                           throws Exception
Writes XML elements.

Specified by:
writeElementsToXml in class ServiceRequestBase<ServiceResponseCollection<TResponse extends ServiceResponse>>
Parameters:
writer - The Writer
Throws:
Exception - the exception

getParentFolderIds

public FolderIdWrapperList getParentFolderIds()
Gets the parent folder ids.

Returns:
the parent folder ids

getSearchFilter

public SearchFilter getSearchFilter()
Gets the search filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection. If SearchFilter is null, no search filter are applied.

Returns:
the search filter

setSearchFilter

public void setSearchFilter(SearchFilter searchFilter)
Sets the search filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection. If SearchFilter is null, no search filter are applied.

Parameters:
searchFilter - the new search filter

getQueryString

public String getQueryString()
Gets the query string for indexed search.

Returns:
the query string

setQueryString

public void setQueryString(String queryString)
Sets the query string for indexed search.

Parameters:
queryString - the new query string

getView

public ViewBase getView()
Gets the view controlling the number of item or folder returned.

Returns:
the view

setView

public void setView(ViewBase view)
Sets the view controlling the number of item or folder returned.

Parameters:
view - the new view


Copyright © 2012–2015 Microsoft. All rights reserved.