public abstract class A_CmsWorkplaceApp extends java.lang.Object implements I_CmsWorkplaceApp
| Modifier and Type | Class and Description |
|---|---|
static class |
A_CmsWorkplaceApp.NavEntry
An app navigation entry.
|
| Modifier and Type | Field and Description |
|---|---|
protected com.vaadin.ui.HorizontalLayout |
m_infoLayout
The app info layout containing the bread crumb navigation as first component.
|
protected CmsToolLayout |
m_rootLayout
The root layout.
|
protected I_CmsAppUIContext |
m_uiContext
The app UI context.
|
static java.lang.String |
PARAM_ASSIGN
State parameter value separator.
|
static java.lang.String |
PARAM_SEPARATOR
State parameter separator.
|
| Modifier | Constructor and Description |
|---|---|
protected |
A_CmsWorkplaceApp()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
addParamToState(java.lang.String state,
java.lang.String paramName,
java.lang.String value)
Adds a parameter value to the given state.
|
protected void |
addSubNavEntry(A_CmsWorkplaceApp.NavEntry navEntry)
Adds a navigation entry.
|
protected abstract 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 abstract com.vaadin.ui.Component |
getComponentForState(java.lang.String state)
Returns the app component for the given state.
|
protected java.lang.String |
getLastPathLevel(java.lang.String path)
Returns the last path level.
|
CmsObject |
getOfflineCmsObject(CmsObject cms)
Gets an offline version of the cms object.
|
static java.lang.String |
getParamFromState(java.lang.String state,
java.lang.String paramName)
Parses the requested parameter from the given state.
|
static java.util.Map<java.lang.String,java.lang.String> |
getParamsFromState(java.lang.String state)
Returns the parameters contained in the state string.
|
protected abstract 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.
|
void |
onStateChange(java.lang.String state)
Called on navigation events.
|
void |
openSubView(java.lang.String state,
boolean updateState)
Opens the requested sub view.
|
protected void |
setBreadCrumbEntries(java.util.LinkedHashMap<java.lang.String,java.lang.String> entries)
Method to set bread crumb entries.
|
protected void |
updateBreadCrumb(java.util.Map<java.lang.String,java.lang.String> breadCrumbEntries)
Updates the bread crumb navigation.
|
protected void |
updateSubNav(java.util.List<A_CmsWorkplaceApp.NavEntry> subEntries)
Updates the sub navigation with the given entries.
|
public static final java.lang.String PARAM_ASSIGN
public static final java.lang.String PARAM_SEPARATOR
protected com.vaadin.ui.HorizontalLayout m_infoLayout
protected CmsToolLayout m_rootLayout
protected I_CmsAppUIContext m_uiContext
protected A_CmsWorkplaceApp()
public static java.lang.String addParamToState(java.lang.String state, java.lang.String paramName, java.lang.String value)
state - the stateparamName - the parameter namevalue - the parameter valuepublic static java.lang.String getParamFromState(java.lang.String state, java.lang.String paramName)
state - the stateparamName - the parameter namepublic static java.util.Map<java.lang.String,java.lang.String> getParamsFromState(java.lang.String state)
state - the statepublic CmsObject getOfflineCmsObject(CmsObject cms)
cms - initial CmsObjectpublic void initUI(I_CmsAppUIContext context)
I_CmsWorkplaceAppUse the context to add the app's components to the UI.
initUI in interface I_CmsWorkplaceAppcontext - the UI contextI_CmsWorkplaceApp.initUI(org.opencms.ui.apps.I_CmsAppUIContext)public void onStateChange(java.lang.String state)
I_CmsWorkplaceApponStateChange in interface I_CmsWorkplaceAppstate - the app state to showI_CmsWorkplaceApp.onStateChange(java.lang.String)public void openSubView(java.lang.String state, boolean updateState)
state - the stateupdateState - true to update the state URL tokenprotected void addSubNavEntry(A_CmsWorkplaceApp.NavEntry navEntry)
navEntry - the navigation entryprotected abstract java.util.LinkedHashMap<java.lang.String,java.lang.String> getBreadCrumbForState(java.lang.String state)
state - the current stateprotected abstract com.vaadin.ui.Component getComponentForState(java.lang.String state)
state - the state to renderprotected java.lang.String getLastPathLevel(java.lang.String path)
path - the pathprotected abstract java.util.List<A_CmsWorkplaceApp.NavEntry> getSubNavEntries(java.lang.String state)
state - the stateprotected void setBreadCrumbEntries(java.util.LinkedHashMap<java.lang.String,java.lang.String> entries)
entries - to be setprotected void updateBreadCrumb(java.util.Map<java.lang.String,java.lang.String> breadCrumbEntries)
breadCrumbEntries - the bread crumb entriesprotected void updateSubNav(java.util.List<A_CmsWorkplaceApp.NavEntry> subEntries)
subEntries - the sub navigation entries