public class CmsModuleApp extends A_CmsAttributeAwareApp implements I_CmsCachableApp
| Modifier and Type | Class and Description |
|---|---|
static class |
CmsModuleApp.Attributes
Additional app attributes for the module manager.
|
static class |
CmsModuleApp.Icons
Contains the icon constants for the module manager.
|
static class |
CmsModuleApp.States
Contains the different navigation states for the module maanger.
|
A_CmsWorkplaceApp.NavEntry| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PARAM_MODULE
The 'module' parameter.
|
ATTR_INFO_COMPONENT, ATTR_MAIN_HEIGHT_FULLm_infoLayout, m_rootLayout, m_uiContext, PARAM_ASSIGN, PARAM_SEPARATOR| Constructor and Description |
|---|
CmsModuleApp()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
editModule(CmsModule module,
boolean isNew,
java.lang.String caption,
java.lang.Runnable callback)
Opens the module editor for the given module.
|
void |
editModule(java.lang.String moduleName)
Opens the edit dialog for the given module.
|
void |
editNewModule(java.lang.Runnable callback)
Opens module edit dialog for a new module.
|
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.
|
java.util.List<I_CmsSimpleContextMenuEntry<java.util.Set<java.lang.String>>> |
getMenuEntries()
Returns the available menu entries.
|
protected com.vaadin.ui.Component |
getModuleTable()
Gets the module table.
|
protected java.lang.String |
getReportLabel(java.lang.String state)
Gets the label for a given report.
|
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.
|
void |
openModuleInfo(java.util.Set<java.lang.String> name)
Opens the module info dialog.
|
void |
openReport(java.lang.String newState,
A_CmsReportThread thread,
java.lang.String label)
Changes to a new sub-view and stores a report to be displayed by that subview.
|
protected void |
reload()
Reloads the table.
|
void |
setReport(java.lang.String key,
A_CmsReportThread report)
Stores a report thread isntance under a given key.
|
protected void |
updateAppAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Handles the attributes.
|
static CmsMenuItemVisibilityMode |
visibilityCheckHasModule(java.lang.String name)
Returns VISIBILITY_ACTIVE if a module with the given name exists, and VISIBILITY_INVISIBLE otherwise.
|
getAttributesForComponent, openSubView, updateMainComponentaddParamToState, addSubNavEntry, getLastPathLevel, getOfflineCmsObject, getParamFromState, getParamsFromState, setBreadCrumbEntries, updateBreadCrumb, updateSubNavpublic static final java.lang.String PARAM_MODULE
public CmsModuleApp()
public static void editModule(CmsModule module, boolean isNew, java.lang.String caption, java.lang.Runnable callback)
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 donepublic static CmsMenuItemVisibilityMode visibilityCheckHasModule(java.lang.String name)
name - a module namepublic void editModule(java.lang.String moduleName)
moduleName - the name of the modulepublic void editNewModule(java.lang.Runnable callback)
callback - the callback to call after finishingpublic java.util.List<I_CmsSimpleContextMenuEntry<java.util.Set<java.lang.String>>> getMenuEntries()
public void initUI(I_CmsAppUIContext context)
I_CmsWorkplaceAppUse the context to add the app's components to the UI.
initUI in interface I_CmsWorkplaceAppinitUI in class A_CmsWorkplaceAppcontext - the UI contextA_CmsWorkplaceApp.initUI(org.opencms.ui.apps.I_CmsAppUIContext)public boolean isCachable()
I_CmsCachableAppisCachable in interface I_CmsCachableApptrue if the app is cachableI_CmsCachableApp.isCachable()public void onRestoreFromCache()
I_CmsCachableApponRestoreFromCache in interface I_CmsCachableAppI_CmsCachableApp.onRestoreFromCache()public void onStateChange(java.lang.String state)
I_CmsWorkplaceApponStateChange in interface I_CmsWorkplaceApponStateChange in class A_CmsWorkplaceAppstate - the app state to showA_CmsWorkplaceApp.onStateChange(java.lang.String)public void openModuleInfo(java.util.Set<java.lang.String> name)
name - the name of the modulepublic void openReport(java.lang.String newState, A_CmsReportThread thread, java.lang.String label)
newState - the new statethread - the report thread which should be displayed in the sub viewlabel - the label to display for the reportpublic void setReport(java.lang.String key, A_CmsReportThread report)
key - the keyreport - the report thread instanceprotected java.util.LinkedHashMap<java.lang.String,java.lang.String> getBreadCrumbForState(java.lang.String state)
A_CmsWorkplaceAppgetBreadCrumbForState in class A_CmsWorkplaceAppstate - the current stateA_CmsWorkplaceApp.getBreadCrumbForState(java.lang.String)protected com.vaadin.ui.Component getComponentForState(java.lang.String state)
A_CmsWorkplaceAppgetComponentForState in class A_CmsWorkplaceAppstate - the state to renderA_CmsWorkplaceApp.getComponentForState(java.lang.String)protected com.vaadin.ui.Component getModuleTable()
protected java.lang.String getReportLabel(java.lang.String state)
state - the state for which to get the labelprotected java.util.List<A_CmsWorkplaceApp.NavEntry> getSubNavEntries(java.lang.String state)
A_CmsWorkplaceAppgetSubNavEntries in class A_CmsWorkplaceAppstate - the stateA_CmsWorkplaceApp.getSubNavEntries(java.lang.String)protected void reload()
protected void updateAppAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
A_CmsAttributeAwareAppupdateAppAttributes in class A_CmsAttributeAwareAppattributes - to setA_CmsAttributeAwareApp.updateAppAttributes(java.util.Map)