Class FindItemRequest<TItem extends Item>
- 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<TResponse>
-
- 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
Constructors Constructor Description FindItemRequest(ExchangeService service, ServiceErrorHandling errorHandlingMode)Initializes a new instance of the FindItemRequest class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FindItemResponse<TItem>createServiceResponse(ExchangeService service, int responseIndex)Creates the service response.protected intgetExpectedResponseMessageCount()Gets the expected response message count.GroupinggetGroupBy()Gets the group by.protected ExchangeVersiongetMinimumRequiredServerVersion()Gets the request version.FolderIdWrapperListgetParentFolderIds()Gets the parent folder ids.StringgetQueryString()Gets the query string for indexed search.protected StringgetResponseMessageXmlElementName()Gets the name of the response message XML element.protected StringgetResponseXmlElementName()Gets the name of the response XML element.SearchFiltergetSearchFilter()Gets the search filter.ViewBasegetView()Gets the view controlling the number of item or folder returned.StringgetXmlElementName()Gets the name of the XML element.voidsetGroupBy(Grouping value)Sets the group by.voidsetQueryString(String queryString)Sets the query string for indexed search.voidsetSearchFilter(SearchFilter searchFilter)Sets the search filter.voidsetView(ViewBase view)Sets the view controlling the number of item or folder returned.protected voidvalidate()Validate request.protected voidwriteAttributesToXml(EwsServiceXmlWriter writer)Writes XML attribute.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, writeBodyToXml, writeToXml
-
-
-
-
Constructor Detail
-
FindItemRequest
public FindItemRequest(ExchangeService service, ServiceErrorHandling errorHandlingMode) throws Exception
Initializes a new instance of the FindItemRequest class.- Parameters:
service- The ServiceerrorHandlingMode- 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:
createServiceResponsein classMultiResponseServiceRequest<FindItemResponse<TItem extends Item>>- Parameters:
service- The serviceresponseIndex- Index of the response.- Returns:
- Service response.
-
getXmlElementName
public String getXmlElementName()
Gets the name of the XML element.- Specified by:
getXmlElementNamein classServiceRequestBase<ServiceResponseCollection<FindItemResponse<TItem extends Item>>>- Returns:
- XML element name.
-
getResponseXmlElementName
protected String getResponseXmlElementName()
Gets the name of the response XML element.- Specified by:
getResponseXmlElementNamein classServiceRequestBase<ServiceResponseCollection<FindItemResponse<TItem extends Item>>>- Returns:
- XML element name.
-
getResponseMessageXmlElementName
protected String getResponseMessageXmlElementName()
Gets the name of the response message XML element.- Specified by:
getResponseMessageXmlElementNamein classMultiResponseServiceRequest<FindItemResponse<TItem extends Item>>- Returns:
- XML element name.
-
getMinimumRequiredServerVersion
protected ExchangeVersion getMinimumRequiredServerVersion()
Gets the request version.- Specified by:
getMinimumRequiredServerVersionin classServiceRequestBase<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, ExceptionValidate request.- Overrides:
validatein classServiceRequestBase<ServiceResponseCollection<TResponse extends ServiceResponse>>- Throws:
ServiceLocalException- the service local exceptionException- the exception
-
getExpectedResponseMessageCount
protected int getExpectedResponseMessageCount()
Gets the expected response message count.- Specified by:
getExpectedResponseMessageCountin classMultiResponseServiceRequest<TResponse extends ServiceResponse>- Returns:
- XML element name.
-
writeAttributesToXml
protected void writeAttributesToXml(EwsServiceXmlWriter writer) throws ServiceXmlSerializationException
Writes XML attribute.- Overrides:
writeAttributesToXmlin classServiceRequestBase<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:
writeElementsToXmlin classServiceRequestBase<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
-
-