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

Interface IRoomsSearchFactory


public interface IRoomsSearchFactory

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 whole Rooms API (including this Interface) is covered by a KM Service. You can get acess to an instance of this class by using the following code:

 
 import com.sapportals.wcm.service.ServiceFactory;  
 IRooms roomsAPI = (IRooms) ServiceFactory.getInstance().getService(IRooms.KM_SERVICE_ID);
 IRoomsSearchFactory roomsSearchFactory = roomsAPI.getRoomsSearchFactory();
 
The Rooms API (including this Interface) is also covered by a Portal Service. To get access to an instance of this class through the Portal Service you may use the following code:
 import com.sapportals.portal.prt.runtime.PortalRuntime;
 IRooms roomsAPI = (IRooms) PortalRuntime.getRuntimeResources().getService(IRooms.PORTAL_SERVICE_ID);
 IRoomsSearchFactory roomsSearchFactory = roomsAPI.getRoomsSearchFactory();
 


Method Summary
 IRoomsSearchProperties getAdvancedSearchProperties(String name, String description, String ownerId, String ownerName, String creatorId, String lastModifierId, com.sap.security.api.IUser roomUser, String roomUserRoleName, Date fromCreationDate, Date toCreationDate, Date fromLastModifiedDate, Date toLastModifiedDate, Date fromLastVisitDate, Date toLastVisitDate, boolean findHiddenRooms, boolean findUnHiddenRooms, boolean findLockedRooms, boolean findUnLockedRooms, boolean findAllTemplates, boolean positiveTemplates, String[] templates, boolean findAllPrivacyTypes, boolean positivePrivacyTypes, RoomPrivacyType[] privacyTypes, boolean findAllCategories, boolean positiveCategories, boolean combinePositiveCategories, String[] categories, boolean findAllCustomProperties, boolean positiveCustomProperties, boolean combinePositiveCustomProperties, ICustomProperty[] customProperties, String sortPropertyName, int sortOrder)
          This is a convenience method.
 IRoomsSearchProperties getComboSearchProperties(String searchText, boolean findInName, boolean findInDescription, boolean findInOwnerId, boolean findInOwnerName, boolean findInCreatorId, boolean findInLastModifierId, boolean findInTemplates, boolean findInPrivacyTypes, boolean findInCategories, boolean findInCustomProperties, ICustomProperty[] customProperties, String sortPropertyName, int sortOrder)
          This is a convenience method.
 IRoomsSearchProperties getGenericSearchProperties()
          Creates a new instance of IRoomsSearchProperties with generic search criteria.
 IRoomsSearch getSearchInstance(IRoomsSearchProperties roomsSearchProperties, com.sap.security.api.IUser contextUser, Locale locale)
          Creates a new instance of IRoomsSearch without performing the search immediately
 IRoomsSearch searchRooms(IRoomsSearchProperties roomsSearchProperties, com.sap.security.api.IUser contextUser, Locale locale)
          Performs the search and returns an instance of IRoomsSearch
 

Method Detail

getSearchInstance

IRoomsSearch getSearchInstance(IRoomsSearchProperties roomsSearchProperties,
                               com.sap.security.api.IUser contextUser,
                               Locale locale)
                               throws com.sapportals.wcm.WcmException
Creates a new instance of IRoomsSearch without performing the search immediately

Parameters:
roomsSearchProperties - an instance of IRoomsSearchProperties defining the search criteria
contextUser - the context user for the result list - usually the logged in user
locale - the locale for the result list - usually the locale of the logged in user
Returns:
an instance of IRoomsSearch
Throws:
com.sapportals.wcm.WcmException

searchRooms

IRoomsSearch searchRooms(IRoomsSearchProperties roomsSearchProperties,
                         com.sap.security.api.IUser contextUser,
                         Locale locale)
                         throws com.sapportals.wcm.WcmException
Performs the search and returns an instance of IRoomsSearch

Parameters:
roomsSearchProperties - an instance of IRoomsSearchProperties defining the search criteria
contextUser - the context user for the result list - usually the logged in user
locale - the locale for the result list - usually the locale of the logged in user
Returns:
an instance of IRoomsSearch
Throws:
com.sapportals.wcm.WcmException

getGenericSearchProperties

IRoomsSearchProperties getGenericSearchProperties()
Creates a new instance of IRoomsSearchProperties with generic search criteria. This means performing a search using this object without calling any filter...() or set...() methods on it before, results in finding ALL rooms. This is the standard method if you don't want to perform a Combo Search. You can call several filter...() or set...() methods on the returned instance of IRoomsSearchProperties to define all required search criteria before searching with method searchRooms(IRoomsSearchProperties, IUser, Locale)

Returns:
an instance of IRoomsSearchProperties

getComboSearchProperties

IRoomsSearchProperties getComboSearchProperties(String searchText,
                                                boolean findInName,
                                                boolean findInDescription,
                                                boolean findInOwnerId,
                                                boolean findInOwnerName,
                                                boolean findInCreatorId,
                                                boolean findInLastModifierId,
                                                boolean findInTemplates,
                                                boolean findInPrivacyTypes,
                                                boolean findInCategories,
                                                boolean findInCustomProperties,
                                                ICustomProperty[] customProperties,
                                                String sortPropertyName,
                                                int sortOrder)
This is a convenience method. It creates a new instance of IRoomsSearchProperties and helps you define all appropriate search criteria for a so called Combo Search. With a Combo Search it is possible to search in multiple room properties for one single search term (OR-related).

Returns:
an instance of IRoomsSearchProperties

getAdvancedSearchProperties

IRoomsSearchProperties getAdvancedSearchProperties(String name,
                                                   String description,
                                                   String ownerId,
                                                   String ownerName,
                                                   String creatorId,
                                                   String lastModifierId,
                                                   com.sap.security.api.IUser roomUser,
                                                   String roomUserRoleName,
                                                   Date fromCreationDate,
                                                   Date toCreationDate,
                                                   Date fromLastModifiedDate,
                                                   Date toLastModifiedDate,
                                                   Date fromLastVisitDate,
                                                   Date toLastVisitDate,
                                                   boolean findHiddenRooms,
                                                   boolean findUnHiddenRooms,
                                                   boolean findLockedRooms,
                                                   boolean findUnLockedRooms,
                                                   boolean findAllTemplates,
                                                   boolean positiveTemplates,
                                                   String[] templates,
                                                   boolean findAllPrivacyTypes,
                                                   boolean positivePrivacyTypes,
                                                   RoomPrivacyType[] privacyTypes,
                                                   boolean findAllCategories,
                                                   boolean positiveCategories,
                                                   boolean combinePositiveCategories,
                                                   String[] categories,
                                                   boolean findAllCustomProperties,
                                                   boolean positiveCustomProperties,
                                                   boolean combinePositiveCustomProperties,
                                                   ICustomProperty[] customProperties,
                                                   String sortPropertyName,
                                                   int sortOrder)
This is a convenience method. It creates a new instance of IRoomsSearchProperties and helps you define all appropriate search criteria for a None-Combo-Search. The result is the same as with calling first getGenericSearchProperties() and then calling multiple set...() methods on the returned instance of IRoomsSearchProperties

Returns:
an instance of IRoomsSearchProperties
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 2012 SAP AG Complete Copyright Notice