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

E22562-03

oracle.apps.fnd.applcore.globalSearch.ui
Class SearchUtils

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

public final class SearchUtils
extends java.lang.Object

Generic utilities for Global Search.

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

Field Summary
static java.lang.String _BI_ACTIONLINKGROUPNAMEVALUES_ATTR
          BI BIACTIONLINKGROUPNAMEVALUES Attribute.
static java.lang.String _BI_ACTIONLINKNAMEVALUES_ATTR
          BI BIACTIONLINKNAMEVALUES Attribute.
static java.lang.String _BI_ACTIONLINKVALUES_ATTR
          BI ACTIONLINKVALUES Attribute.
static java.lang.String _BI_DESCRIPTION_ATTR
          BI DESCRIPTION Attribute.
static java.lang.String _BI_EQREDIRECTURL_ATTR
          BI EQREDIRECTURL Attribute.
static java.lang.String _BI_EQUSERQUERY_ATTR
          BI EQUSERQUERY Attribute.
static java.lang.String _BI_ICONPATH_ATTR
          BI BIICONPATH Attribute.
static java.lang.String _BI_NODEAUTHOR_ATTR
          BI BINODEAUTHOR Attribute.
static java.lang.String _BI_NODEMODIFICATIONDATE_ATTR
          BI BINODEMODIFICATIONDATE Attribute.
static java.lang.String _BI_TITLE_ATTR
          BI TITLE Attribute.
static java.lang.String _WC_SERVICEID_ATTR
          Web Center Service Id.
static java.lang.String _WC_URL_ATTR
          Web Center URL attribute, sometimes used to return the result destinaion URL when the default action URL cannot be over-riddedn in the SES document pipeline.
static java.lang.String ECSF_SCOPE_SYSPROP
          TODO This property temporary until all teams running with proper security.
static java.lang.String GS_CATEGORY_NOT_ALLOWED
          A Search is being run using categories that are not in the list of all allowed categories for this user.
static java.lang.String GS_EMPTY_KEYWORD
          A user is trying to search without typing in a keyword.
static java.lang.String GS_MISSING_CATEGORIES
          Not all categories are available, search result may be missing results.
static java.lang.String GS_NO_CATEGORIES
          An unknown error has occurred, such as an exception when saving search.
static java.lang.String GS_NOT_CONFIGURED
          Global Search is not configured.
static java.lang.String GS_SEARCH_WARNING
          A warning has been returned on executing a search, results may be incomplete.
static java.lang.String GS_UNKNOWN_ERROR
          An unknown arror has occurred, such as an exception when saving search.
static java.lang.String RESULTS_MAIN_PANEL_ID
          Search Results Main Panel ID.
 
Method Summary
static void clearDtSessionBean()
          Reset the design Time session Bean.
static java.util.Map<java.lang.String,java.lang.String> createFacetNameMap(java.lang.String facetName)
          Create a collection contining the facet name that may be added to a facet treeItem.
static void discloseFirstTreeLevel(org.apache.myfaces.trinidad.model.TreeModel tm, org.apache.myfaces.trinidad.model.RowKeySet disclosedRows)
          Disclose the first node of the tree if possible.
static void discloseSR(SearchResult sr, org.apache.myfaces.trinidad.model.RowKeySet disclosedRows)
          For the given Search result, add to the disclosed rows any filters, or the default disclosure (first category opened).
static java.util.List<SearchCategory> fillCategories(java.util.List<SearchCategory> allCategories, java.util.List<SearchCategory> searchCategories)
          Examine searchCategories in the light of allCategories and fill it up with categories.
static void focusResultPopup(javax.faces.component.UIComponent c)
          Show the popup where the results will be rendered.
static java.lang.String formatDateString(java.lang.String mlsString, java.util.Date d)
          Format theString mlsString, assumed to have one replacement token of the form "Some String {0}" with d formatted to the logged in user's preferences.
static java.lang.String formatMultiDateString(java.lang.String mlsString, java.util.Date... d)
          Format theString mlsString, assumed to have one replacement token of the form "Some String {0}" with d formatted to the logged in user's preferences.
static java.lang.String formatRecentDate(java.util.Date d)
          Obtain a String representing the date d relative to "now".
static java.lang.String formatString(java.lang.String mlsString, java.lang.Object o)
          Format the mlsString with 1 replacement paramter.
static SplitSearchResult getCurrentSearchResult()
          Get the current search result.
static GlobalSearchSessionBean getExistingSearchSessionBean()
          Get existing search Session bean.
static java.lang.String getFacetName(TreeItem facet)
          Get the facet item name for the given tree node, assumed to be of type FACET_ITEM.
static java.util.Locale getLocale()
          Get the current Locale for the running page.
static java.lang.String getLoggedInUser()
          Get the logged in user name vai standard ADF/JSF APIs.
static java.lang.Object getPageFlowScopeVar(java.lang.String name)
          Get a pageFlowScope variable with the given name, null if not found.
static java.lang.String getParameterValue(java.util.Map map, java.lang.String key)
          Get the named parameter from the Map as a String.
static java.lang.String getParameterValue(java.util.Map map, java.lang.String key, java.lang.String defaultValue)
          Get the named parameter from the Map as a String.
static GlobalSearchSessionBean getSearchSessionBean()
          Get the search Session bean.
static java.lang.String getSeededMessageText(java.lang.String messageName)
          Get a specific message from the message dictionary.
static java.lang.Object getSessionObject(java.lang.String name)
          Get the object o in the user session under name.
static java.lang.String getUserLanguage()
          Get the user language from the applsession.
static java.util.TimeZone getUserTimezone()
          Get the user timezone from the applsession.
static boolean hasBIAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
          Has the attributes Map got BI attributes?
static boolean hasWCAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
          Has the attributes Map got Web Center attributes?
static void hidePopup(javax.faces.component.UIComponent c)
          Hide the popup where the results will are rendered.
static void hideSummaryResultsPopups(javax.faces.component.UIComponent c)
          An agressive hide of the summary popups so the search has full visibility.
static boolean isRTL()
          Are we in a right to Left reading envirnoment.
static boolean isSearchEnabled()
          Is search enabled.
static boolean isSearchEnabledViaProfile()
          Is search enabled via the profile FUSION_APPS_SEARCH_ENABLED.
static boolean isSearchEnabledViaSysprop()
          Is search enabled via the java runtime switch FUSION_APPS_SEARCH_ENGINE_AVAILABLE.
static java.lang.String makeHtmlBold(java.lang.String val)
          Make replacements in val to turn [[ ]] delimiters into html bold delimiters <b> </b>.
static void refreshLocalResult(javax.faces.component.UIComponent c)
          An agressive refresh of the active results area, the header as well as the results table.
static void refreshResults(javax.faces.component.UIComponent c)
          PPR refresh the results.
static void refreshSummarySaveCombos(javax.faces.component.UIComponent c)
          An agressive refresh of the saved search combos in the search results popup.
static java.lang.Object removePageFlowScopeVar(java.lang.String name)
          Remove a pageFlowScope variable with the given name.
static java.lang.String replace(java.lang.String oldValue, java.lang.String compareValue, java.lang.String newValue)
          Replace all instances of compareValue in oldValue with newValue.
static void resetActiveResultsTable(javax.faces.component.UIComponent c)
          An agressive reset of the top/display row of the active results table.
static void resetDisclosedTreeState(SearchResult sr)
          Clear and reset the tree's disclosed state so that it does not remember any unwanted information about previous searches, then redisclose the first level.
static void resetDisclosedTreeState(SplitSearchResult ssr)
          Clear and reset the tree's disclosed state so that it does not remember any unwanted information about previous searches, then redisclose the first level.
static void saveLastResultToPageflowScope(SplitSearchResult currentSearchResult)
          Save our search result to the current pageflowScope where they may be retrieved later.
static void saveLastResultToSession(SplitSearchResult ssr)
          Save our search result to the session, either pageflowScope if in a taskflow, or the session scope if called from UIShell fields, or API
static void saveLastResultToSessionScope(SplitSearchResult currentSearchResult)
          Save our search result to the current session Scope where they may be retrieved later.
static java.lang.Object setPageFlowScopeVar(java.lang.String name, java.lang.Object value)
          Get a pageFlowScope variable with the given name, null if not found.
static void setSessionObject(java.lang.String name, java.lang.Object o)
          Set the object o in the user session under name.
static void showConfirmOverwritePersonalizeSearchPopup(oracle.adf.view.rich.component.rich.RichDialog personalizeDialog)
          Show the overwrite saved search popup given some component in the component tree.
static void showConfirmOverwriteSavedSearchPopup(oracle.adf.view.rich.component.rich.RichDialog saveDialog)
          Show the overwrite saved search popup given some component in the component tree.
static void showKeywordSearchErrorPopup(javax.faces.component.UIComponent c)
          Show the keyword search error message popup next to the component provided.
static void showPersonalizePopup(javax.faces.component.UIComponent c)
          Show the personalize popup given some component in the component tree.
static void showPopup(oracle.adf.view.rich.component.rich.RichPopup popup)
          Show the popup.
static void showPopup(oracle.adf.view.rich.component.rich.RichPopup popup, oracle.adf.view.rich.component.rich.RichPopup.PopupHints hints)
          Show the popup.
static void showResultPopup(javax.faces.component.UIComponent c)
          Show the popup where the results will be rendered.
static void showSearchResultPersonalizePopup(javax.faces.component.UIComponent c)
          Show the personalize popup from the "personalize ..." selection of the saved searches drop box in a tab in the current search results.
static void showSeededError(java.lang.String messageName)
          Show a specific error to the user.
static java.util.List<java.lang.Object> toParentRowKey(java.lang.Object rowKey)
          Get the row key of the parent of rowKey.
static java.lang.Object toRowKey(java.util.List<TreeItem> rootItems, TreeItem ti)
          Convert ti, a TreeItem at some place in the tree to a row key, the form of which will be an array of Integers corresponding to the index position of ti at each level.
static java.util.List<SearchCategory> toSearchCategories(java.lang.Object searchCategories, java.util.List<SearchCategory> allCats)
          Turn searchCategories into a unique list of SearchCategories.
static java.lang.String toXMLAttr(java.lang.String attr)
          Convert attr, which may be null or empty, or contain illegal xml characters into a legal xml value.
static java.lang.String unHtml(java.lang.String val)
          Remove basic html markings, <b>, <i>.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GS_EMPTY_KEYWORD

public static final java.lang.String GS_EMPTY_KEYWORD
A user is trying to search without typing in a keyword.

See Also:
Constant Field Values

GS_UNKNOWN_ERROR

public static final java.lang.String GS_UNKNOWN_ERROR
An unknown arror has occurred, such as an exception when saving search.

See Also:
Constant Field Values

GS_NO_CATEGORIES

public static final java.lang.String GS_NO_CATEGORIES
An unknown error has occurred, such as an exception when saving search.

See Also:
Constant Field Values

GS_CATEGORY_NOT_ALLOWED

public static final java.lang.String GS_CATEGORY_NOT_ALLOWED
A Search is being run using categories that are not in the list of all allowed categories for this user.

See Also:
Constant Field Values

GS_MISSING_CATEGORIES

public static final java.lang.String GS_MISSING_CATEGORIES
Not all categories are available, search result may be missing results.

See Also:
Constant Field Values

GS_SEARCH_WARNING

public static final java.lang.String GS_SEARCH_WARNING
A warning has been returned on executing a search, results may be incomplete.

See Also:
Constant Field Values

GS_NOT_CONFIGURED

public static final java.lang.String GS_NOT_CONFIGURED
Global Search is not configured.

See Also:
Constant Field Values

_BI_EQREDIRECTURL_ATTR

public static final java.lang.String _BI_EQREDIRECTURL_ATTR
BI EQREDIRECTURL Attribute.

See Also:
Constant Field Values

_BI_EQUSERQUERY_ATTR

public static final java.lang.String _BI_EQUSERQUERY_ATTR
BI EQUSERQUERY Attribute.

See Also:
Constant Field Values

_BI_ICONPATH_ATTR

public static final java.lang.String _BI_ICONPATH_ATTR
BI BIICONPATH Attribute.

See Also:
Constant Field Values

_BI_TITLE_ATTR

public static final java.lang.String _BI_TITLE_ATTR
BI TITLE Attribute.

See Also:
Constant Field Values

_BI_NODEMODIFICATIONDATE_ATTR

public static final java.lang.String _BI_NODEMODIFICATIONDATE_ATTR
BI BINODEMODIFICATIONDATE Attribute.

See Also:
Constant Field Values

_BI_NODEAUTHOR_ATTR

public static final java.lang.String _BI_NODEAUTHOR_ATTR
BI BINODEAUTHOR Attribute.

See Also:
Constant Field Values

_BI_DESCRIPTION_ATTR

public static final java.lang.String _BI_DESCRIPTION_ATTR
BI DESCRIPTION Attribute.

See Also:
Constant Field Values

_BI_ACTIONLINKGROUPNAMEVALUES_ATTR

public static final java.lang.String _BI_ACTIONLINKGROUPNAMEVALUES_ATTR
BI BIACTIONLINKGROUPNAMEVALUES Attribute.

See Also:
Constant Field Values

_BI_ACTIONLINKNAMEVALUES_ATTR

public static final java.lang.String _BI_ACTIONLINKNAMEVALUES_ATTR
BI BIACTIONLINKNAMEVALUES Attribute.

See Also:
Constant Field Values

_BI_ACTIONLINKVALUES_ATTR

public static final java.lang.String _BI_ACTIONLINKVALUES_ATTR
BI ACTIONLINKVALUES Attribute.

See Also:
Constant Field Values

_WC_SERVICEID_ATTR

public static final java.lang.String _WC_SERVICEID_ATTR
Web Center Service Id. Basic funtional area determinator within Web Center.

See Also:
Constant Field Values

_WC_URL_ATTR

public static final java.lang.String _WC_URL_ATTR
Web Center URL attribute, sometimes used to return the result destinaion URL when the default action URL cannot be over-riddedn in the SES document pipeline.

See Also:
Constant Field Values

RESULTS_MAIN_PANEL_ID

public static final java.lang.String RESULTS_MAIN_PANEL_ID
Search Results Main Panel ID.

See Also:
Constant Field Values

ECSF_SCOPE_SYSPROP

public static final java.lang.String ECSF_SCOPE_SYSPROP
TODO This property temporary until all teams running with proper security.

See Also:
Constant Field Values
Method Detail

getLoggedInUser

public static java.lang.String getLoggedInUser()
Get the logged in user name vai standard ADF/JSF APIs.

Returns:
user name of loggerd in user as understood by ADF. Possibly "anonymous" is security has not been setup or no user is logged in.

clearDtSessionBean

public static void clearDtSessionBean()
Reset the design Time session Bean. Used for the unit tests only and is considered private.


getSearchSessionBean

public static GlobalSearchSessionBean getSearchSessionBean()
Get the search Session bean. This bean contains the valid categories for the user and their saved searches.

Returns:
Search Session bean.

getExistingSearchSessionBean

public static GlobalSearchSessionBean getExistingSearchSessionBean()
Get existing search Session bean. This bean contains the valid categories for the user and their saved searches. This method will not create the bean if it does not exist.

Returns:
existing Search Session bean, else null.

getCurrentSearchResult

public static SplitSearchResult getCurrentSearchResult()
Get the current search result. The result will be the value found in the current pageflowScope, if not found there then will look in session scope.

Returns:
current search result.

saveLastResultToSession

public static void saveLastResultToSession(SplitSearchResult ssr)
Save our search result to the session, either pageflowScope if in a taskflow, or the session scope if called from UIShell fields, or API

Parameters:
ssr - the result to save. Cannot be null.

saveLastResultToPageflowScope

public static void saveLastResultToPageflowScope(SplitSearchResult currentSearchResult)
Save our search result to the current pageflowScope where they may be retrieved later.

Parameters:
currentSearchResult - the result to save. If null, the current result (if any) will be removed from the current pageflowScope.

saveLastResultToSessionScope

public static void saveLastResultToSessionScope(SplitSearchResult currentSearchResult)
Save our search result to the current session Scope where they may be retrieved later.

Parameters:
currentSearchResult - the result to save. If null, the current result (if any) will be removed from the current session Scope.

fillCategories

public static java.util.List<SearchCategory> fillCategories(java.util.List<SearchCategory> allCategories,
                                                            java.util.List<SearchCategory> searchCategories)
Examine searchCategories in the light of allCategories and fill it up with categories. This expands the "All" entry which we recieve from JSF.

Parameters:
allCategories - all categories that are shown.
searchCategories - the selected categories, with the corner case that "All" as a single List entry (or it is empty), then we return a full List.
Returns:
appropriatly filled list.

setSessionObject

public static void setSessionObject(java.lang.String name,
                                    java.lang.Object o)
Set the object o in the user session under name. If o is null any existing object will be removed.

Parameters:
name - name to save against.
o - possibly null object to save - should be serializable.

getSessionObject

public static java.lang.Object getSessionObject(java.lang.String name)
Get the object o in the user session under name.

Parameters:
name - name to look object up with.
Returns:
value from the session, possibly null if none stored.

getParameterValue

public static java.lang.String getParameterValue(java.util.Map map,
                                                 java.lang.String key,
                                                 java.lang.String defaultValue)
Get the named parameter from the Map as a String. Interpret empty string as null. Use the defaultValue if the returned value would otherwise be null.

Parameters:
map - non-null map possibly containing value for key.
key - non-null key to look for.
defaultValue - value to return if no value
Returns:
keyed value or defaultValue if not present.

getParameterValue

public static java.lang.String getParameterValue(java.util.Map map,
                                                 java.lang.String key)
Get the named parameter from the Map as a String. Interpret empty string as null.

Parameters:
map - possibly null map possibly containing value for key.
key - non-null key to look for.
Returns:
keyed value or null if not present or passed null map.

hasBIAttributes

public static boolean hasBIAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Has the attributes Map got BI attributes?

Parameters:
attributes - a non-null, but possibly empty map.
Returns:
true is there are bi attributes.

hasWCAttributes

public static boolean hasWCAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Has the attributes Map got Web Center attributes?

Parameters:
attributes - a non-null, but possibly empty map.
Returns:
true is there are Web Center attributes.

replace

public static java.lang.String replace(java.lang.String oldValue,
                                       java.lang.String compareValue,
                                       java.lang.String newValue)
Replace all instances of compareValue in oldValue with newValue.

Parameters:
oldValue - old value that may or may not contain compareValue.
compareValue - value to replace.
newValue - replacement.
Returns:
replaced String.

makeHtmlBold

public static java.lang.String makeHtmlBold(java.lang.String val)
Make replacements in val to turn [[ ]] delimiters into html bold delimiters <b> </b>.

Parameters:
val - value that may or may not have delimiters in it.
Returns:
a more html friendly val.

unHtml

public static java.lang.String unHtml(java.lang.String val)
Remove basic html markings, <b>, <i>.

Parameters:
val - value that may or may not have delimiters in it.
Returns:
a more friendly val.

showSeededError

public static void showSeededError(java.lang.String messageName)
Show a specific error to the user.

Parameters:
messageName - name of FND seeded message in the FND_MESSAGES_B table.

getSeededMessageText

public static java.lang.String getSeededMessageText(java.lang.String messageName)
Get a specific message from the message dictionary.

Parameters:
messageName - name of FND seeded message in the FND_MESSAGES_B table.
Returns:
message text, in the form FND-1234 message.

getUserTimezone

public static java.util.TimeZone getUserTimezone()
Get the user timezone from the applsession. If not available, use the container value.

Returns:
non-null Timezone.

getUserLanguage

public static java.lang.String getUserLanguage()
Get the user language from the applsession. If not available, use the default value.

Returns:
nullable language.

formatDateString

public static java.lang.String formatDateString(java.lang.String mlsString,
                                                java.util.Date d)
Format theString mlsString, assumed to have one replacement token of the form "Some String {0}" with d formatted to the logged in user's preferences.

Parameters:
mlsString - String with a single replacement token.
d - date to be inserted into mlsString.
Returns:
formatted String.

formatString

public static java.lang.String formatString(java.lang.String mlsString,
                                            java.lang.Object o)
Format the mlsString with 1 replacement paramter.

Parameters:
mlsString - string contiaining 1 {0} token.
o - object to add into string.
Returns:
resultant String.

formatRecentDate

public static java.lang.String formatRecentDate(java.util.Date d)
Obtain a String representing the date d relative to "now".

Parameters:
d - date to compare. Must be in the past.
Returns:
String representation of d.

hideSummaryResultsPopups

public static void hideSummaryResultsPopups(javax.faces.component.UIComponent c)
An agressive hide of the summary popups so the search has full visibility.

Parameters:
c - a UI component within the same form as the search summary component

resetActiveResultsTable

public static void resetActiveResultsTable(javax.faces.component.UIComponent c)
An agressive reset of the top/display row of the active results table.

Parameters:
c - some component in the component tree - this component MUST be in the JSF subtree of the tab being manipulated, as this method will not try to navigate out of this subtree.

toRowKey

public static java.lang.Object toRowKey(java.util.List<TreeItem> rootItems,
                                        TreeItem ti)
Convert ti, a TreeItem at some place in the tree to a row key, the form of which will be an array of Integers corresponding to the index position of ti at each level. For example if ti is located:
 root 0
   +- child 0
    +- grandchild 0
    +- ti
   +- child 1
 root 1
 
then returned array would be [0,0,1]

Parameters:
rootItems - root of tree. ti must be under one of these TreeItems.
ti - item to get row key for.
Returns:
row key.

toParentRowKey

public static java.util.List<java.lang.Object> toParentRowKey(java.lang.Object rowKey)
Get the row key of the parent of rowKey. For example, if rowKey is [0,0,1] then returned Object would be [0,0].

Parameters:
rowKey - key to row, assumed to be a List<Object>.
Returns:
parent row key if available, empty List<Object> otherwise.

resetDisclosedTreeState

public static void resetDisclosedTreeState(SplitSearchResult ssr)
Clear and reset the tree's disclosed state so that it does not remember any unwanted information about previous searches, then redisclose the first level.

Parameters:
ssr - search result.

resetDisclosedTreeState

public static void resetDisclosedTreeState(SearchResult sr)
Clear and reset the tree's disclosed state so that it does not remember any unwanted information about previous searches, then redisclose the first level.

Parameters:
sr - search result.

discloseSR

public static void discloseSR(SearchResult sr,
                              org.apache.myfaces.trinidad.model.RowKeySet disclosedRows)
For the given Search result, add to the disclosed rows any filters, or the default disclosure (first category opened). This will allow the UI to show the attributes tree with all search filters open, or default.

Parameters:
sr - Search result, including filters.
disclosedRows - continer to add disclosed row keys.

discloseFirstTreeLevel

public static void discloseFirstTreeLevel(org.apache.myfaces.trinidad.model.TreeModel tm,
                                          org.apache.myfaces.trinidad.model.RowKeySet disclosedRows)
Disclose the first node of the tree if possible.

Parameters:
tm - tree model.
disclosedRows - disclosed row key set to add to.

refreshSummarySaveCombos

public static void refreshSummarySaveCombos(javax.faces.component.UIComponent c)
An agressive refresh of the saved search combos in the search results popup.

Parameters:
c - some component in the component tree.

showPersonalizePopup

public static void showPersonalizePopup(javax.faces.component.UIComponent c)
Show the personalize popup given some component in the component tree.

Parameters:
c - some component in the component tree.

showSearchResultPersonalizePopup

public static void showSearchResultPersonalizePopup(javax.faces.component.UIComponent c)
Show the personalize popup from the "personalize ..." selection of the saved searches drop box in a tab in the current search results. This popup is assumed to be a peer component in the JSF component tree.

Parameters:
c - peer component in the component tree.

showConfirmOverwriteSavedSearchPopup

public static void showConfirmOverwriteSavedSearchPopup(oracle.adf.view.rich.component.rich.RichDialog saveDialog)
Show the overwrite saved search popup given some component in the component tree. This method relies upon the fact that the overwrite saved search popup exists immediately. next to the save dialog

Parameters:
saveDialog - the overwrite save dialog to show

showConfirmOverwritePersonalizeSearchPopup

public static void showConfirmOverwritePersonalizeSearchPopup(oracle.adf.view.rich.component.rich.RichDialog personalizeDialog)
Show the overwrite saved search popup given some component in the component tree. This method relies upon the fact that the overwrite saved search popup exists immediately. next to the save dialog

Parameters:
personalizeDialog - the overwrite save dialog to show

showKeywordSearchErrorPopup

public static void showKeywordSearchErrorPopup(javax.faces.component.UIComponent c)
Show the keyword search error message popup next to the component provided.

Parameters:
c - some component in the component tree.

showResultPopup

public static void showResultPopup(javax.faces.component.UIComponent c)
Show the popup where the results will be rendered.

Parameters:
c - some component in the component tree.

focusResultPopup

public static void focusResultPopup(javax.faces.component.UIComponent c)
Show the popup where the results will be rendered. Note that even if there is no results popup (as no search has been run), this method will do nothing and not fail catastrophically.

Parameters:
c - some component in the component tree.

refreshResults

public static void refreshResults(javax.faces.component.UIComponent c)
PPR refresh the results.

Parameters:
c - some component in the component tree of the result.

hidePopup

public static void hidePopup(javax.faces.component.UIComponent c)
Hide the popup where the results will are rendered.

Parameters:
c - some component in the component tree that is a child of the popup.

showPopup

public static void showPopup(oracle.adf.view.rich.component.rich.RichPopup popup,
                             oracle.adf.view.rich.component.rich.RichPopup.PopupHints hints)
Show the popup.

Parameters:
popup - UI Component to popup
hints - the hints for showing the popup.

showPopup

public static void showPopup(oracle.adf.view.rich.component.rich.RichPopup popup)
Show the popup.

Parameters:
popup - UI Component to popup

isSearchEnabled

public static boolean isSearchEnabled()
Is search enabled. Enablement is decieded firstly by system property FUSION_APPS_SEARCH_ENGINE_AVAILABLE. This allows global switch off for all users, it is designed primarily for ATGLITE environments where SES is not deployed. If this test passes, the profile FUSION_APPS_SEARCH_ENABLED is checked. This allows fusion search to be turned off at any of the levels profiles define. The primary case here is to turn off search until it is configured, perhaps having it on only for the admins doing config.

Returns:
true is search enabled, false otherwise.

isSearchEnabledViaSysprop

public static boolean isSearchEnabledViaSysprop()
Is search enabled via the java runtime switch FUSION_APPS_SEARCH_ENGINE_AVAILABLE. This is expected to be set to Y/N, an absent or incorrect value implies a true result.

Returns:
true is search enabled via switch, false otherwise.

isSearchEnabledViaProfile

public static boolean isSearchEnabledViaProfile()
Is search enabled via the profile FUSION_APPS_SEARCH_ENABLED. This is expected to be set to Y/N, an absent or incorrect value implies a false result (which should never happen).

Returns:
true is search enabled via profile, false otherwise.

getFacetName

public static final java.lang.String getFacetName(TreeItem facet)
Get the facet item name for the given tree node, assumed to be of type FACET_ITEM.

Parameters:
facet - tree item.
Returns:
facet name, null if not a facet item.

createFacetNameMap

public static final java.util.Map<java.lang.String,java.lang.String> createFacetNameMap(java.lang.String facetName)
Create a collection contining the facet name that may be added to a facet treeItem.

Parameters:
facetName - name of facet.
Returns:
collection.

isRTL

public static boolean isRTL()
Are we in a right to Left reading envirnoment.

Returns:
true if rtl, false otherwise;

getPageFlowScopeVar

public static java.lang.Object getPageFlowScopeVar(java.lang.String name)
Get a pageFlowScope variable with the given name, null if not found.

Parameters:
name - name of value.
Returns:
pageFlowScope variable with the given name.

removePageFlowScopeVar

public static java.lang.Object removePageFlowScopeVar(java.lang.String name)
Remove a pageFlowScope variable with the given name.

Parameters:
name - name of value.
Returns:
old pageFlowScope variable with the given name.

setPageFlowScopeVar

public static java.lang.Object setPageFlowScopeVar(java.lang.String name,
                                                   java.lang.Object value)
Get a pageFlowScope variable with the given name, null if not found.

Parameters:
name - name of value.
Returns:
pageFlowScope previous variable with the given name, if any.

getLocale

public static final java.util.Locale getLocale()
Get the current Locale for the running page.

Returns:
Current Locale, ENGLISH if in DT.

toSearchCategories

public static java.util.List<SearchCategory> toSearchCategories(java.lang.Object searchCategories,
                                                                java.util.List<SearchCategory> allCats)
Turn searchCategories into a unique list of SearchCategories.

Parameters:
searchCategories - may be null, empty String, a csv list of category names, a list of SearchCategory classes
allCats - a List of all allowed SearchCategories.
Returns:
a new List of SearchCategories, each category will be a reference to those in allCats.

refreshLocalResult

public static void refreshLocalResult(javax.faces.component.UIComponent c)
An agressive refresh of the active results area, the header as well as the results table.

Parameters:
c - some component in the component tree under the header.

formatMultiDateString

public static java.lang.String formatMultiDateString(java.lang.String mlsString,
                                                     java.util.Date... d)
Format theString mlsString, assumed to have one replacement token of the form "Some String {0}" with d formatted to the logged in user's preferences.

Parameters:
mlsString - String with a single replacement token.
d - dates to be inserted into mlsString.
Returns:
formatted String.

toXMLAttr

public static final java.lang.String toXMLAttr(java.lang.String attr)
Convert attr, which may be null or empty, or contain illegal xml characters into a legal xml value.

Parameters:
attr - attr, may be null, empty or contain chars that need escaping.
Returns:
escaped version of attr, "" at worst.

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

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.