com.softwareag.centrasite.api.csom.search
Interface CSOSearchManager


public interface CSOSearchManager

The CSOSearchManager provides the interface for searching the CSOM. It is central piece that manages CSOSearch objects


Method Summary
 CSOSearch createSearch()
          Creates a search object that can be used for keyword and advanced searches.
 CSOSearchScope createSearchScope(java.util.Collection<CentraSiteRegistryObjectType> types)
          Creates a CSOSearchScope object from a collection of CSOTypes.
 CSOSearchScope createSearchScope(java.lang.String scopeName)
          Creates a search scope based on the given name
 CSOSortSpecifier createSortSpecifier(CentraSiteObjectAttribute centraSiteObjectAttribute)
          Create an instance for CSOSortSpecifier using the given CentraSiteObjectAttribute.
 CSOSortSpecifier createSortSpecifier(CentraSiteObjectAttribute centraSiteObjectAttribute, CSOSortSpecifier.Direction direction)
          Create the instance for CSOSortSpecifier by given CentraSiteObjectAttribute and Direction.
 void deleteSavedSearch(CSOSearch search)
          Deletes a given saved search.
 void deleteSavedSearches(java.util.Collection<CSOSearch> searches)
          Deletes the given collection of saved searches.
 java.util.List<CentraSiteObjectAttribute> getCommonAttributes()
          Returns the list of common attributes that are configured in System configuration.
 java.util.Collection<Category> getPhoneTypeCategories()
          Returns the collection of phone type taxonomy categories.
 java.util.Collection<CSOSearch> getReportingSearches()
          Fetches the collection of saved searches that are marked as report search
 java.util.Collection<CSOSearch> getSavedSearches(java.lang.String name)
          Loads the collection of saved searches according to the given name.
 java.util.Collection<CSOSearch> getSavedSearches(User user)
          Loads the collection of saved searches for a given user.
 CSOSearchConditionManager getSearchConditionManager()
          Returns the search condition manager which will be used to create a search condition.
 java.util.Collection<CSOSearchScope> getSearchScopes()
          Returns the collection of configured search scopes
 boolean isSearchKeyExists(java.lang.String name)
          Checks whether a search with given name already exists.
 CSOSearch loadSearch(java.lang.String predefinedSearchName)
          Creates a CSOSearch object from the given predefined search name.loadSearch() would pick up the saved search in a hierarchical fashion - starting with user-specific folder, then org-level and then the global (default org)
 void saveSearch(CSOSearch search)
          Saves the given search with the specified name i.e CSOSearch.getName() in case of search already exists with the given name then treat this operation as Update.
 void saveSearch(CSOSearch search, boolean overwrite)
          Saves the given search with the specified name i.e CSOSearch.getName() in case of search already exists with the given name then treat this operation as Update when overwrite flag is set otherwise reject the save
 

Method Detail

createSearch

CSOSearch createSearch()
                       throws CLLException
Creates a search object that can be used for keyword and advanced searches.

Returns:
Search object for keyword and advanced searches
Throws:
CLLException - if CLL fails to create a search object

getSearchConditionManager

CSOSearchConditionManager getSearchConditionManager()
                                                    throws CLLException
Returns the search condition manager which will be used to create a search condition.

Returns:
CSOSearchConditionManager for creating a search condition
Throws:
CLLException - if CLL fails to return the CSO search condition manager

createSearchScope

CSOSearchScope createSearchScope(java.lang.String scopeName)
                                 throws CLLException
Creates a search scope based on the given name

Parameters:
scopeName - Identifier for the CSOsearchScope
Returns:
CSOSearchScope representing the searchScope identified by the scopeName parameter
Throws:
CLLException - if CLL fails to construct CSOSearchScope from the given name

createSearchScope

CSOSearchScope createSearchScope(java.util.Collection<CentraSiteRegistryObjectType> types)
                                 throws CLLException
Creates a CSOSearchScope object from a collection of CSOTypes.

Parameters:
types - Collection of types on which the CSOSearchScope is based on
Returns:
CSOSearchScope representing the collection of CSOTypes passed in
Throws:
CLLException - if CLL fails to construct a CSOSearchScope from the given CSOTypes

getSearchScopes

java.util.Collection<CSOSearchScope> getSearchScopes()
                                                     throws CLLException
Returns the collection of configured search scopes

Returns:
Collection of pre-configured search scopes
Throws:
CLLException - if CLL fails to return the collection of configured search scopes

createSortSpecifier

CSOSortSpecifier createSortSpecifier(CentraSiteObjectAttribute centraSiteObjectAttribute)
                                     throws CLLException
Create an instance for CSOSortSpecifier using the given CentraSiteObjectAttribute.
By default, direction is ascending.

Parameters:
centraSiteObjectAttribute - Attribute for sorting the search results
Returns:
CSOSortSpecifier including the CentraSiteObjectAttribute
Throws:
CLLException - if CLL fails to construct the CSOSortSpecifier using the given attribute

createSortSpecifier

CSOSortSpecifier createSortSpecifier(CentraSiteObjectAttribute centraSiteObjectAttribute,
                                     CSOSortSpecifier.Direction direction)
                                     throws CLLException
Create the instance for CSOSortSpecifier by given CentraSiteObjectAttribute and Direction.
Default direction is Ascending.

Parameters:
centraSiteObjectAttribute - Attribute for sorting the search results
direction - CSOSortSpecifier.Direction whether ascending or descending; if null, the default is ascending.
Returns:
CSOSortSpecifier including the CentraSiteObjectAttribute and Direction
Throws:
CLLException - if CLL fails to construct the CSOSortSpecifier using the given attribute and direction

getCommonAttributes

java.util.List<CentraSiteObjectAttribute> getCommonAttributes()
                                                              throws CLLException
Returns the list of common attributes that are configured in System configuration.

Returns:
List of common attributes that are configured
Throws:
CLLException - if CLL fails to return the list of common attributes

getSavedSearches

java.util.Collection<CSOSearch> getSavedSearches(User user)
                                                 throws CLLException
Loads the collection of saved searches for a given user.

Parameters:
user - Collection of saved searches applicable for the given user
Returns:
Collection of applicable saved searches for the given user
Throws:
CLLException

getSavedSearches

java.util.Collection<CSOSearch> getSavedSearches(java.lang.String name)
                                                 throws CLLException
Loads the collection of saved searches according to the given name.

Parameters:
name - Collection of saved searches with the given name
Returns:
Collection of searches saved with the given name
Throws:
CLLException

getReportingSearches

java.util.Collection<CSOSearch> getReportingSearches()
                                                     throws CLLException
Fetches the collection of saved searches that are marked as report search

Returns:
Collection of saves searches marked as report search
Throws:
CLLException - if CLL fails to fetch the collection of saved search marked as report search

deleteSavedSearch

void deleteSavedSearch(CSOSearch search)
                       throws CLLException
Deletes a given saved search.

Parameters:
search - Saved search
Throws:
CLLException - if CLL fails to delete the saved search

deleteSavedSearches

void deleteSavedSearches(java.util.Collection<CSOSearch> searches)
                         throws CLLException
Deletes the given collection of saved searches.

Parameters:
searches - Collection of saved searches
Throws:
CLLException - if CLL fails to delete the collection of saved searches

saveSearch

void saveSearch(CSOSearch search)
                throws CLLException
Saves the given search with the specified name i.e CSOSearch.getName() in case of search already exists with the given name then treat this operation as Update.

Parameters:
search - Search Object.
Throws:
CLLException

saveSearch

void saveSearch(CSOSearch search,
                boolean overwrite)
                throws CLLException
Saves the given search with the specified name i.e CSOSearch.getName() in case of search already exists with the given name then treat this operation as Update when overwrite flag is set otherwise reject the save

Parameters:
search - Search Object.
Throws:
CLLException

isSearchKeyExists

boolean isSearchKeyExists(java.lang.String name)
                          throws CLLException
Checks whether a search with given name already exists.

Parameters:
name - File name of the search without extension
Returns:
true if a search with the given name already exists; else false.
Throws:
CLLException - if CLL fails to check if a search with the given name already exists.

loadSearch

CSOSearch loadSearch(java.lang.String predefinedSearchName)
                     throws CLLException
Creates a CSOSearch object from the given predefined search name.loadSearch() would pick up the saved search in a hierarchical fashion - starting with user-specific folder, then org-level and then the global (default org)

Parameters:
predefinedSearchName -
Returns:
CSOSearch for the given name; returns null if there are no saved searches for the given name.
Throws:
CLLException - if CLL fails to return the CSOSearch for the given name

getPhoneTypeCategories

java.util.Collection<Category> getPhoneTypeCategories()
                                                      throws CLLException
Returns the collection of phone type taxonomy categories.

Returns:
Collection of Category(s)
Throws:
CLLException - if CLL fails to return the phone type categories