com.sap.ip.collaboration.room.api.trexsearch

Interface IRoomsSearch


public interface IRoomsSearch

Public Interface of the Rooms Search API

The Rooms Search API provides methods to search and find rooms matching application defined filter criteria. Note: The methods provided by this API only work correctly if useTRex is enabled in the Rooms Search Configuration and if all rooms are indexed in the configured index.

This interface is part of the Rooms API. It is public to all customers.

The entry point for performing a search for rooms is the IRoomsSearchFactory. Using this factory applications can define their own search criteria and perform a search. As a result they get back an instance of IRoomsSearch which provides access to the results of the performed search.


Method Summary
 IRoomsSearch and(IRoomsSearch searchInstance)
          Using this method the current search criteria can be AND-related with another instance of IRoomsSearch before calling searchRooms()
 IRoom[] getSearchResultAsRooms(int startRow, int numberOfRows)
          If searchRooms() has not been called before this method performs the search and returns the requested search results as instances of IRoom
 ISearchSession getSearchResultAsSession()
          If searchRooms() has not been called before this method performs the search and returns an instance of ISearchSession.
 ITypedResourceList getSearchResultAsTRL(int startRow, int numberOfRows)
          If searchRooms() has not been called before this method performs the search and returns the requested search results as an instance of ITypedResourceList
 int getTotalNumberOfRooms()
          This method should be called after performing the actual search.
 IRoomsSearch not()
          Using this method the current search criteria can be inverted before calling searchRooms()
 IRoomsSearch or(IRoomsSearch searchInstance)
          Using this method the current search criteria can be OR-related with another instance of IRoomsSearch before calling searchRooms()
 IRoomsSearch searchRooms()
          Performs the search with the search criteria currently defined in this instance.
 

Method Detail

not

IRoomsSearch not()
                 throws com.sapportals.wcm.WcmException
Using this method the current search criteria can be inverted before calling searchRooms()

Returns:
an instance of IRoomsSearch reflecting the new search criteria
Throws:
com.sapportals.wcm.WcmException

and

IRoomsSearch and(IRoomsSearch searchInstance)
                 throws com.sapportals.wcm.WcmException
Using this method the current search criteria can be AND-related with another instance of IRoomsSearch before calling searchRooms()

Returns:
an instance of IRoomsSearch reflecting the new search criteria
Throws:
com.sapportals.wcm.WcmException

or

IRoomsSearch or(IRoomsSearch searchInstance)
                throws com.sapportals.wcm.WcmException
Using this method the current search criteria can be OR-related with another instance of IRoomsSearch before calling searchRooms()

Returns:
an instance of IRoomsSearch reflecting the new search criteria
Throws:
com.sapportals.wcm.WcmException

searchRooms

IRoomsSearch searchRooms()
                         throws com.sapportals.wcm.WcmException
Performs the search with the search criteria currently defined in this instance.

Returns:
this
Throws:
com.sapportals.wcm.WcmException

getSearchResultAsSession

ISearchSession getSearchResultAsSession()
                                        throws com.sapportals.wcm.WcmException
If searchRooms() has not been called before this method performs the search and returns an instance of ISearchSession. The results of the search can then be accessed through this object.

Returns:
an instance of ISearchSession
Throws:
com.sapportals.wcm.WcmException

getSearchResultAsRooms

IRoom[] getSearchResultAsRooms(int startRow,
                               int numberOfRows)
                               throws com.sapportals.wcm.WcmException
If searchRooms() has not been called before this method performs the search and returns the requested search results as instances of IRoom

Parameters:
startRow - the position of the first result within the complete (sorted) result list
numberOfRows - the number of results to be returned
Returns:
an array of instances of IRoom
Throws:
com.sapportals.wcm.WcmException

getSearchResultAsTRL

ITypedResourceList getSearchResultAsTRL(int startRow,
                                        int numberOfRows)
                                        throws com.sapportals.wcm.WcmException
If searchRooms() has not been called before this method performs the search and returns the requested search results as an instance of ITypedResourceList

Parameters:
startRow - the position of the first result within the complete (sorted) result list
numberOfRows - the number of results to be returned
Returns:
an instance of ITypedResourceList
Throws:
com.sapportals.wcm.WcmException

getTotalNumberOfRooms

int getTotalNumberOfRooms()
This method should be called after performing the actual search. It returns the number of available results matching the search criteria.

Returns:
the number of available results matching the search criteria
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-COLL [sap.com] tc/kmc/coll/room api EP-KM-CRS


Copyright 2011 SAP AG Complete Copyright Notice