Package org.opencms.ui.apps
Class A_CmsWorkplaceApp
java.lang.Object
org.opencms.ui.apps.A_CmsWorkplaceApp
- All Implemented Interfaces:
I_CmsWorkplaceApp
- Direct Known Subclasses:
A_CmsAttributeAwareApp
,CmsAccountsApp
,CmsCacheAdminApp
,CmsCacheViewApp
,CmsDateSearchApp
,CmsDbExportApp
,CmsDbPropertiesApp
,CmsFileHistoryApp
,CmsJobManagerApp
,CmsLinkInFolderValidationApp
,CmsLinkValidationApp
,CmsLinkValidationExternalApp
,CmsListManager
,CmsLogFileApp
,CmsProjectManager
,CmsPublishQueue
,CmsQuickLaunchEditorConfiguration.QuickLaunchEditorApp
,CmsResourceTypeApp
,CmsSearchindexApp
,CmsSessionsApp
,CmsShellApp
,CmsSiteManager
,CmsSourceSearchApp
,CmsSqlConsoleApp
,CmsUnusedContentFinderApp
,CmsUserDataApp
Super class for workplace apps to help implementing the app navigation and layout.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
An app navigation entry. -
Field Summary
Modifier and TypeFieldDescriptionprotected com.vaadin.ui.HorizontalLayout
The app info layout containing the bread crumb navigation as first component.protected CmsToolLayout
The root layout.protected I_CmsAppUIContext
The app UI context.static final String
State parameter value separator.static final String
State parameter separator. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
addParamToState
(String state, String paramName, String value) Adds a parameter value to the given state.protected void
addSubNavEntry
(A_CmsWorkplaceApp.NavEntry navEntry) Adds a navigation entry.protected abstract LinkedHashMap<String,
String> getBreadCrumbForState
(String state) Returns the current bread crumb entries in an ordered map.protected abstract com.vaadin.ui.Component
getComponentForState
(String state) Returns the app component for the given state.protected String
getLastPathLevel
(String path) Returns the last path level.Gets an offline version of the cms object.static String
getParamFromState
(String state, String paramName) Parses the requested parameter from the given state.getParamsFromState
(String state) Returns the parameters contained in the state string.protected abstract List<A_CmsWorkplaceApp.NavEntry>
getSubNavEntries
(String state) Returns the sub navigation entries.void
initUI
(I_CmsAppUIContext context) Within this method the app UI should be initialized.void
onStateChange
(String state) Called on navigation events.void
openSubView
(String state, boolean updateState) Opens the requested sub view.static String
removeParamsFromState
(String state) Removes all parameter from given state.protected void
setBreadCrumbEntries
(LinkedHashMap<String, String> entries) Method to set bread crumb entries.protected void
updateBreadCrumb
(Map<String, String> breadCrumbEntries) Updates the bread crumb navigation.protected void
updateSubNav
(List<A_CmsWorkplaceApp.NavEntry> subEntries) Updates the sub navigation with the given entries.
-
Field Details
-
PARAM_ASSIGN
State parameter value separator.- See Also:
-
PARAM_SEPARATOR
State parameter separator.- See Also:
-
m_infoLayout
The app info layout containing the bread crumb navigation as first component. -
m_rootLayout
The root layout. -
m_uiContext
The app UI context.
-
-
Constructor Details
-
A_CmsWorkplaceApp
protected A_CmsWorkplaceApp()Constructor.
-
-
Method Details
-
addParamToState
Adds a parameter value to the given state.- Parameters:
state
- the stateparamName
- the parameter namevalue
- the parameter value- Returns:
- the state
-
getParamFromState
Parses the requested parameter from the given state.- Parameters:
state
- the stateparamName
- the parameter name- Returns:
- the parameter value
-
getParamsFromState
Returns the parameters contained in the state string.- Parameters:
state
- the state- Returns:
- the parameters
-
removeParamsFromState
Removes all parameter from given state.- Parameters:
state
- state to be cleaned from parameter- Returns:
- given state without parameter
-
getOfflineCmsObject
Gets an offline version of the cms object.- Parameters:
cms
- initial CmsObject- Returns:
- CmsObject adjusted to offline project (cloned)
-
initUI
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
- Parameters:
context
- the UI context- See Also:
-
onStateChange
Description copied from interface:I_CmsWorkplaceApp
Called on navigation events.- Specified by:
onStateChange
in interfaceI_CmsWorkplaceApp
- Parameters:
state
- the app state to show- See Also:
-
openSubView
Opens the requested sub view.- Parameters:
state
- the stateupdateState
-true
to update the state URL token
-
getBreadCrumbForState
Returns the current bread crumb entries in an ordered map.- Parameters:
state
- the current state- Returns:
- bread crumb entry name by state, in case the state is empty, the entry will be disabled
-
getComponentForState
Returns the app component for the given state.- Parameters:
state
- the state to render- Returns:
- the app component
-
getLastPathLevel
Returns the last path level.- Parameters:
path
- the path- Returns:
- the last path level
-
setBreadCrumbEntries
Method to set bread crumb entries.- Parameters:
entries
- to be set
-
updateBreadCrumb
Updates the bread crumb navigation.- Parameters:
breadCrumbEntries
- the bread crumb entries
-