Package org.opencms.ui.apps.search
Class CmsSourceSearchApp
- java.lang.Object
-
- org.opencms.ui.apps.A_CmsWorkplaceApp
-
- org.opencms.ui.apps.search.CmsSourceSearchApp
-
- All Implemented Interfaces:
java.io.Serializable
,I_CmsCachableApp
,I_CmsWorkplaceApp
public class CmsSourceSearchApp extends A_CmsWorkplaceApp implements I_CmsCachableApp
The source search app.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
A_CmsWorkplaceApp.NavEntry
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FOLDER
The folder key.static java.lang.String
IGNORE_SUBSITES
The ignore subsites key.static java.lang.String
INDEX
The index key.static java.lang.String
LOCALE
The locale key.static java.lang.String
PROJECT
The project ley.static java.lang.String
PROPERTY
The property key.static java.lang.String
QUERY
The query key.static java.lang.String
REPLACE_PATTERN
The replace pattern key.static java.lang.String
RESOURCE_TYPE
The resource type key.static java.lang.String
SEARCH_PATTERN
The search pattern key.static java.lang.String
SEARCH_TYPE
The type key.static java.lang.String
SITE_ROOT
The site root key.static java.lang.String
XPATH
The XPath key.-
Fields inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
m_infoLayout, m_rootLayout, m_uiContext, PARAM_ASSIGN, PARAM_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description CmsSourceSearchApp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
displayResult()
Displays the search result.static java.lang.String
generateState(CmsSearchReplaceSettings settings)
Generates the state string for the given search settings.protected java.util.LinkedHashMap<java.lang.String,java.lang.String>
getBreadCrumbForState(java.lang.String state)
Returns the current bread crumb entries in an ordered map.protected com.vaadin.ui.Component
getComponentForState(java.lang.String state)
Returns the app component for the given state.protected java.util.List<A_CmsWorkplaceApp.NavEntry>
getSubNavEntries(java.lang.String state)
Returns the sub navigation entries.void
initUI(I_CmsAppUIContext context)
Within this method the app UI should be initialized.boolean
isCachable()
Returns whether this app should be cached within the user session.void
onRestoreFromCache()
Called after the view is fetched from the cache.void
onStateChange(java.lang.String state)
Called on navigation events.protected void
search(CmsSearchReplaceSettings settings, boolean updateState)
Executes the search.-
Methods inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
addParamToState, addSubNavEntry, getLastPathLevel, getOfflineCmsObject, getParamFromState, getParamsFromState, openSubView, removeParamsFromState, setBreadCrumbEntries, updateBreadCrumb, updateSubNav
-
-
-
-
Field Detail
-
FOLDER
public static final java.lang.String FOLDER
The folder key.- See Also:
- Constant Field Values
-
IGNORE_SUBSITES
public static final java.lang.String IGNORE_SUBSITES
The ignore subsites key.- See Also:
- Constant Field Values
-
INDEX
public static final java.lang.String INDEX
The index key.- See Also:
- Constant Field Values
-
LOCALE
public static final java.lang.String LOCALE
The locale key.- See Also:
- Constant Field Values
-
PROJECT
public static final java.lang.String PROJECT
The project ley.- See Also:
- Constant Field Values
-
PROPERTY
public static final java.lang.String PROPERTY
The property key.- See Also:
- Constant Field Values
-
QUERY
public static final java.lang.String QUERY
The query key.- See Also:
- Constant Field Values
-
REPLACE_PATTERN
public static final java.lang.String REPLACE_PATTERN
The replace pattern key.- See Also:
- Constant Field Values
-
RESOURCE_TYPE
public static final java.lang.String RESOURCE_TYPE
The resource type key.- See Also:
- Constant Field Values
-
SEARCH_PATTERN
public static final java.lang.String SEARCH_PATTERN
The search pattern key.- See Also:
- Constant Field Values
-
SEARCH_TYPE
public static final java.lang.String SEARCH_TYPE
The type key.- See Also:
- Constant Field Values
-
SITE_ROOT
public static final java.lang.String SITE_ROOT
The site root key.- See Also:
- Constant Field Values
-
XPATH
public static final java.lang.String XPATH
The XPath key.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsSourceSearchApp
public CmsSourceSearchApp()
-
-
Method Detail
-
generateState
public static java.lang.String generateState(CmsSearchReplaceSettings settings)
Generates the state string for the given search settings.- Parameters:
settings
- the search settings- Returns:
- the state string
-
initUI
public void initUI(I_CmsAppUIContext context)
Description copied from interface:I_CmsWorkplaceApp
Within this method the app UI should be initialized.Use the context to add the app's components to the UI.
- Specified by:
initUI
in interfaceI_CmsWorkplaceApp
- Overrides:
initUI
in classA_CmsWorkplaceApp
- Parameters:
context
- the UI context- See Also:
A_CmsWorkplaceApp.initUI(org.opencms.ui.apps.I_CmsAppUIContext)
-
isCachable
public boolean isCachable()
Description copied from interface:I_CmsCachableApp
Returns whether this app should be cached within the user session.- Specified by:
isCachable
in interfaceI_CmsCachableApp
- Returns:
true
if the app is cachable- See Also:
I_CmsCachableApp.isCachable()
-
onRestoreFromCache
public void onRestoreFromCache()
Description copied from interface:I_CmsCachableApp
Called after the view is fetched from the cache.- Specified by:
onRestoreFromCache
in interfaceI_CmsCachableApp
- See Also:
I_CmsCachableApp.onRestoreFromCache()
-
onStateChange
public void onStateChange(java.lang.String state)
Description copied from interface:I_CmsWorkplaceApp
Called on navigation events.- Specified by:
onStateChange
in interfaceI_CmsWorkplaceApp
- Overrides:
onStateChange
in classA_CmsWorkplaceApp
- Parameters:
state
- the app state to show- See Also:
A_CmsWorkplaceApp.onStateChange(java.lang.String)
-
displayResult
protected void displayResult()
Displays the search result.
-
getBreadCrumbForState
protected java.util.LinkedHashMap<java.lang.String,java.lang.String> getBreadCrumbForState(java.lang.String state)
Description copied from class:A_CmsWorkplaceApp
Returns the current bread crumb entries in an ordered map.- Specified by:
getBreadCrumbForState
in classA_CmsWorkplaceApp
- Parameters:
state
- the current state- Returns:
- bread crumb entry name by state, in case the state is empty, the entry will be disabled
- See Also:
A_CmsWorkplaceApp.getBreadCrumbForState(java.lang.String)
-
getComponentForState
protected com.vaadin.ui.Component getComponentForState(java.lang.String state)
Description copied from class:A_CmsWorkplaceApp
Returns the app component for the given state.- Specified by:
getComponentForState
in classA_CmsWorkplaceApp
- Parameters:
state
- the state to render- Returns:
- the app component
- See Also:
A_CmsWorkplaceApp.getComponentForState(java.lang.String)
-
getSubNavEntries
protected java.util.List<A_CmsWorkplaceApp.NavEntry> getSubNavEntries(java.lang.String state)
Description copied from class:A_CmsWorkplaceApp
Returns the sub navigation entries.- Specified by:
getSubNavEntries
in classA_CmsWorkplaceApp
- Parameters:
state
- the state- Returns:
- the sub navigation entries
- See Also:
A_CmsWorkplaceApp.getSubNavEntries(java.lang.String)
-
search
protected void search(CmsSearchReplaceSettings settings, boolean updateState)
Executes the search.- Parameters:
settings
- the search settingsupdateState
-true
to create a new history entry
-
-