Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.globalSearch.ui.ecsf
Class ECSFSearchUtils

java.lang.Object
  extended by oracle.apps.fnd.applcore.globalSearch.ui.ecsf.ECSFSearchUtils

public final class ECSFSearchUtils
extends java.lang.Object

ECSF specific utilities for Global Search.

Author:
David Groves <david.groves@oracle.com>

Field Summary
static java.lang.String ECSF_GLOBAL_SCOPE
          ECSF Global Scope.
static java.lang.String ECSF_LOCAL_SCOPE
          ECSF Local Scope.
 
Method Summary
static void addCommonFilters(SearchFilterItems searchTiles, oracle.ecsf.QueryMetaData queryMetaData)
          Add filters from the common filters tree to this query from existing tile.
static void addQueryWarnings(SearchResult sr, oracle.ecsf.HitsMetaData hmd)
          Check to see if there were problems with the search and if so report them.
static void deriveCategoryCount(TreeItem catTI)
          Derive a count for the category Tree Item, calculated as sum of counts for SOs, as long as all SOs have known counts.
static void deriveSOCount(TreeItem catTI)
          Derive a count for the Child Searchable Object Tree Ite from the category, in the case where the category count is known and there is only one SO.
static void determineCommonFilters(java.util.List<BaseTreeItem> commonTreeItems, SearchFilterItems sfi, oracle.ecsf.QueryMetaData qmd, java.util.List<PersistentSearchFilter> psf)
           
static void fillFacetTreePaths(oracle.ecsf.SearchContext searchContext, SearchResult sr)
          For the given Search Result, run phantom queries up all FACET_ITEM selection paths to flesh out the tree with siblings (including counts).
static oracle.ecsf.SearchContext getLocalSearchContext()
          Factory method for looking up the ECSF Search Context and binding the current user.
static oracle.ecsf.SearchContext getSearchContext()
          Factory method for looking up the ECSF Search Context and binding the current user.
static oracle.ecsf.client.SearchCtrl getSearchControl()
          Factory method for looking up the ECSF Search Control.
static java.lang.String getUserDefinedScopeValue()
          Get the value that the user defined for the ecsf scope.
static boolean hasMetadataWarnings(oracle.ecsf.SearchContext searchContext, java.lang.String APICall)
          Check to see if there are metadata warnings when running APICall.
static boolean isECSFConfigured()
          Factory method for determining if ECSF is configured or not.
static void populateSavedSearchFacetTree(oracle.ecsf.SearchContext searchContext, SearchResult sr)
          In cases where a saved search has been run and searchable object and facet selections have been made, this method fills the facet tree along the facet path using phantom queries.
static void releaseSearchContext(oracle.ecsf.SearchContext searchContext)
          Release the ECSF Search Context object.
static void runPhantomQuery(oracle.ecsf.SearchContext searchContext, SearchResult sr, TreeItem ti)
          Run a phantom query within the context of the given search result and Attribute tree item.
static void runPhantomQuery(SearchResult sr, TreeItem ti)
          Run a phantom query within the context of the given search result and Attribute tree item.
static java.lang.String validateScope(java.lang.String userDefinedScope)
          Validate the userDefinedScope and turn it into a valid value if possible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ECSF_LOCAL_SCOPE

public static final java.lang.String ECSF_LOCAL_SCOPE
ECSF Local Scope.

See Also:
Constant Field Values

ECSF_GLOBAL_SCOPE

public static final java.lang.String ECSF_GLOBAL_SCOPE
ECSF Global Scope.

See Also:
Constant Field Values
Method Detail

isECSFConfigured

public static boolean isECSFConfigured()
Factory method for determining if ECSF is configured or not.

Returns:
true if ecsf search connection is configured, false otherwise.
See Also:
getSearchControl()

getSearchControl

public static oracle.ecsf.client.SearchCtrl getSearchControl()
Factory method for looking up the ECSF Search Control.

Returns:
SearchCtrl to use.

getLocalSearchContext

public static oracle.ecsf.SearchContext getLocalSearchContext()
Factory method for looking up the ECSF Search Context and binding the current user. This method will return a LOCAL mode context, irrespective of whether the mode for searching is GLOBAL.

Returns:
SearchContext.

getSearchContext

public static oracle.ecsf.SearchContext getSearchContext()
Factory method for looking up the ECSF Search Context and binding the current user.

Returns:
SearchContext.

releaseSearchContext

public static void releaseSearchContext(oracle.ecsf.SearchContext searchContext)
Release the ECSF Search Context object. Must be done for all search contexts used within the code.

Parameters:
searchContext - The Search Context to release

getUserDefinedScopeValue

public static java.lang.String getUserDefinedScopeValue()
Get the value that the user defined for the ecsf scope.

Returns:
The uppercase string that was defined in the applcore.globalsearch.ecsfsearchscope system property.

validateScope

public static java.lang.String validateScope(java.lang.String userDefinedScope)
Validate the userDefinedScope and turn it into a valid value if possible.

Parameters:
userDefinedScope - user defined value from a system property. May have case errors etc.
Returns:
either "LOCAL", "GLOBAL" or null (if not interpretable as "LOCAL" or "GLOBAL").

runPhantomQuery

public static void runPhantomQuery(SearchResult sr,
                                   TreeItem ti)
Run a phantom query within the context of the given search result and Attribute tree item. This phantom query is designed to:
  1. Fill down the attribute tree as the user discloses nodes
  2. Determine facet counts as it goes.
A search is done on the minimum number of records (that is 1), just to get the facet information, with the same search terms as sr. Even if sr has multiple filters, this method will only select facets and facet counts under the given tree item as if other filters are not applied. This allows accurate counds down SO and facet subtrees, but will be completely inaccurate wrt sr if sr has mor than 1 filter applied (which will AND the conditions and return less results).

Parameters:
sr - existing result to be interrogated.
ti - tree item to get counts down. This may be of type Searchable Object or FacetItem.

runPhantomQuery

public static void runPhantomQuery(oracle.ecsf.SearchContext searchContext,
                                   SearchResult sr,
                                   TreeItem ti)
Run a phantom query within the context of the given search result and Attribute tree item. This phantom query is designed to:
  1. Fill down the attribute tree as the user discloses nodes
  2. Determine facet counts as it goes.
A search is done on the minimum number of records (that is 1), just to get the facet information, with the same search terms as sr. Even if sr has multiple filters, this method will only select facets and facet counts under the given tree item as if other filters are not applied. This allows accurate counds down SO and facet subtrees, but will be completely inaccurate wrt sr if sr has mor than 1 filter applied (which will AND the conditions and return less results).

Parameters:
searchContext - search context.
sr - existing result to be interrogated.
ti - tree item to get counts down. This may be of type Searchable Object or FacetItem.

deriveCategoryCount

public static void deriveCategoryCount(TreeItem catTI)
Derive a count for the category Tree Item, calculated as sum of counts for SOs, as long as all SOs have known counts. If not, no count is made.

Parameters:
catTI - category TreeItem to calculate for. If it already has a count, no re-calculation is done.

deriveSOCount

public static void deriveSOCount(TreeItem catTI)
Derive a count for the Child Searchable Object Tree Ite from the category, in the case where the category count is known and there is only one SO.

Parameters:
catTI - category TreeItem.

addQueryWarnings

public static final void addQueryWarnings(SearchResult sr,
                                          oracle.ecsf.HitsMetaData hmd)
Check to see if there were problems with the search and if so report them. This does not necessarily mean there are no results, just that the results may be limited.

Parameters:
hmd - hits meta data from search.

hasMetadataWarnings

public static final boolean hasMetadataWarnings(oracle.ecsf.SearchContext searchContext,
                                                java.lang.String APICall)
Check to see if there are metadata warnings when running APICall.

Parameters:
searchContext - ECSF search context.
APICall - description of api call for logging purposes.
Returns:
true if er

populateSavedSearchFacetTree

public static void populateSavedSearchFacetTree(oracle.ecsf.SearchContext searchContext,
                                                SearchResult sr)
In cases where a saved search has been run and searchable object and facet selections have been made, this method fills the facet tree along the facet path using phantom queries.

Parameters:
searchContext - search Context.
sr - search result.

fillFacetTreePaths

public static void fillFacetTreePaths(oracle.ecsf.SearchContext searchContext,
                                      SearchResult sr)
For the given Search Result, run phantom queries up all FACET_ITEM selection paths to flesh out the tree with siblings (including counts). It is assumed that the root level facets are already filled, and will not be re-filled.

Parameters:
searchContext - search Context.
sr - search result.

addCommonFilters

public static void addCommonFilters(SearchFilterItems searchTiles,
                                    oracle.ecsf.QueryMetaData queryMetaData)
Add filters from the common filters tree to this query from existing tile.

Parameters:
searchTiles - tiles containing definition f filters to add (if any).
queryMetaData - qmd to add to.

determineCommonFilters

public static void determineCommonFilters(java.util.List<BaseTreeItem> commonTreeItems,
                                          SearchFilterItems sfi,
                                          oracle.ecsf.QueryMetaData qmd,
                                          java.util.List<PersistentSearchFilter> psf)

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.