Package org.opencms.ui.apps.modules
Class CmsModuleApp
java.lang.Object
org.opencms.ui.apps.A_CmsWorkplaceApp
org.opencms.ui.apps.A_CmsAttributeAwareApp
org.opencms.ui.apps.modules.CmsModuleApp
- All Implemented Interfaces:
Serializable
,I_CmsCachableApp
,I_CmsWorkplaceApp
Main module manager app class.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Additional app attributes for the module manager.static class
Contains the icon constants for the module manager.static class
Contains the different navigation states for the module maanger.Nested classes/interfaces inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
A_CmsWorkplaceApp.NavEntry
-
Field Summary
Fields inherited from class org.opencms.ui.apps.A_CmsAttributeAwareApp
ATTR_INFO_COMPONENT, ATTR_MAIN_HEIGHT_FULL
Fields inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
m_infoLayout, m_rootLayout, m_uiContext, PARAM_ASSIGN, PARAM_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
editModule
(String moduleName) Opens the edit dialog for the given module.static void
editModule
(CmsModule module, boolean isNew, String caption, Runnable callback) Opens the module editor for the given module.void
editNewModule
(Runnable callback) Opens module edit dialog for a new module.protected LinkedHashMap<String,
String> getBreadCrumbForState
(String state) Returns the current bread crumb entries in an ordered map.protected com.vaadin.ui.Component
getComponentForState
(String state) Returns the app component for the given state.Returns the available menu entries.protected com.vaadin.ui.Component
Gets the module table.protected String
getReportLabel
(String state) Gets the label for a given report.protected 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.boolean
Returns whether this app should be cached within the user session.void
Called after the view is fetched from the cache.void
onStateChange
(String state) Called on navigation events.void
openModuleInfo
(Set<String> name) Opens the module info dialog.void
openReport
(String newState, A_CmsReportThread thread, String label) Changes to a new sub-view and stores a report to be displayed by that subview.<p<protected void
reload()
Reloads the table.void
setReport
(String key, A_CmsReportThread report) Stores a report thread isntance under a given key.protected void
updateAppAttributes
(Map<String, Object> attributes) Handles the attributes.static CmsMenuItemVisibilityMode
Returns VISIBILITY_ACTIVE if a module with the given name exists, and VISIBILITY_INVISIBLE otherwise.Methods inherited from class org.opencms.ui.apps.A_CmsAttributeAwareApp
getAttributesForComponent, openSubView, updateMainComponent
Methods inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
addParamToState, addSubNavEntry, getLastPathLevel, getOfflineCmsObject, getParamFromState, getParamsFromState, removeParamsFromState, setBreadCrumbEntries, updateBreadCrumb, updateSubNav
-
Field Details
-
PARAM_MODULE
The 'module' parameter.- See Also:
-
-
Constructor Details
-
CmsModuleApp
public CmsModuleApp()Creates a new instance.
-
-
Method Details
-
editModule
Opens the module editor for the given module.- Parameters:
module
- the edited moduleisNew
- true if this is a new modulecaption
- the caption for the module editor dialogcallback
- the callback to call after the edit dialog is done
-
visibilityCheckHasModule
Returns VISIBILITY_ACTIVE if a module with the given name exists, and VISIBILITY_INVISIBLE otherwise.- Parameters:
name
- a module name- Returns:
- the visibility
-
editModule
Opens the edit dialog for the given module.- Parameters:
moduleName
- the name of the module
-
editNewModule
Opens module edit dialog for a new module.- Parameters:
callback
- the callback to call after finishing
-
getMenuEntries
Returns the available menu entries.- Returns:
- the menu entries
-
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
- Overrides:
initUI
in classA_CmsWorkplaceApp
- Parameters:
context
- the UI context- See Also:
-
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:
-
onRestoreFromCache
Description copied from interface:I_CmsCachableApp
Called after the view is fetched from the cache.- Specified by:
onRestoreFromCache
in interfaceI_CmsCachableApp
- See Also:
-
onStateChange
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:
-
openModuleInfo
Opens the module info dialog.- Parameters:
name
- the name of the module
-
openReport
Changes to a new sub-view and stores a report to be displayed by that subview.<p<- Parameters:
newState
- the new statethread
- the report thread which should be displayed in the sub viewlabel
- the label to display for the report
-
setReport
Stores a report thread isntance under a given key.- Parameters:
key
- the keyreport
- the report thread instance
-
getBreadCrumbForState
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:
-
getComponentForState
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:
-
getModuleTable
Gets the module table.- Returns:
- the module table
-
getReportLabel
Gets the label for a given report.- Parameters:
state
- the state for which to get the label- Returns:
- the label
-
reload
Reloads the table. -
updateAppAttributes
Description copied from class:A_CmsAttributeAwareApp
Handles the attributes.- Overrides:
updateAppAttributes
in classA_CmsAttributeAwareApp
- Parameters:
attributes
- to set- See Also:
-