public class CmsWorkplaceAppManager extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CmsWorkplaceAppManager.ConfigurationComparator<T extends I_CmsHasOrder>
Comparator for configuration objects implementing I_CmsHasOrder.
|
static class |
CmsWorkplaceAppManager.NavigationState
Wrapper for the navigation state.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ADMINISTRATION_CATEGORY_ID
The administration category id.
|
static java.lang.String |
LEGACY_CATEGORY_ID
The legacy category id.
|
protected static org.apache.commons.logging.Log |
LOG
The logger for this class.
|
static java.lang.String |
MAIN_CATEGORY_ID
The main category id.
|
static java.lang.String |
TOOLBAR_CSS
The toolbar.css resource name.
|
static java.lang.String |
WORKPLACE_APP_SETTINGS_KEY
The workplace app settings additional info key.
|
static java.lang.String |
WORKPLACE_CSS_PARAM
The workplace CSS module parameter name.
|
| Modifier | Constructor and Description |
|---|---|
protected |
CmsWorkplaceAppManager()
Constructor for testing only.
|
|
CmsWorkplaceAppManager(CmsObject adminCms)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<java.lang.String> |
getAdditionalStyleSheets()
Returns the additional style sheets provided by I_CmsWorkplaceStylesheetProvider services.
|
I_CmsWorkplaceAppConfiguration |
getAppConfiguration(java.lang.String appId)
Returns the app configuration with the given id.
|
java.util.List<I_CmsWorkplaceAppConfiguration> |
getAppConfigurations(java.lang.String... appIds)
Returns the app configuration instances for the given ids.
|
<T extends I_CmsAppSettings> |
getAppSettings(CmsObject cms,
java.lang.Class<T> type)
Returns the user app setting of the given type.
|
java.util.Collection<I_CmsAppCategory> |
getCategories()
Returns the configured categories.
|
I_CmsDefaultAction |
getDefaultAction(I_CmsDialogContext context)
Returns the default action for the given context if available.
|
I_CmsDefaultAction |
getDefaultAction(I_CmsDialogContext context,
I_CmsContextMenuItemProvider menuItemProvider)
Returns the default action for the given context if available.
|
java.util.List<I_CmsWorkplaceAppConfiguration> |
getDefaultQuickLaunchConfigurations()
Gets all configured quick launch apps, independent of the current user.
|
I_CmsEditor |
getEditorForResource(CmsResource resource,
boolean plainText)
Returns the editor for the given resource.
|
I_CmsEditor |
getEditorForType(I_CmsResourceType type,
boolean plainText)
Returns the editor for the given resource type.
|
I_CmsContextMenuItemProvider |
getMenuItemProvider()
Gets the menu item provider for the workplace.
|
java.util.List<I_CmsWorkplaceAppConfiguration> |
getQuickLaunchConfigurations(CmsObject cms)
Gets the configured quick launch apps which are visible for the current user.
|
CmsUserIconHelper |
getUserIconHelper()
Returns the user icon helper.
|
protected java.util.List<I_CmsWorkplaceAppConfiguration> |
getUserQuickLauchConfigurations(CmsObject cms)
Returns the quick launch apps set for the current user.
|
java.util.Collection<I_CmsWorkplaceAppConfiguration> |
getWorkplaceApps()
Returns all available workplace apps.
|
java.util.Collection<java.lang.String> |
getWorkplaceCssUris()
Returns the additional workplace CSS URIs.
|
void |
initWorkplaceCssUris(CmsModuleManager moduleManager)
Initializes the additional workplace CSS URIs.
|
void |
loadApps()
Loads the workplace apps.
|
protected void |
setUserQuickLaunchApps(CmsObject cms,
java.util.List<java.lang.String> apps)
Writes the user quick launch apps setting to the user additional info.
|
void |
storeAppSettings(CmsObject cms,
java.lang.Class<? extends I_CmsAppSettings> type,
I_CmsAppSettings appSettings)
Stores the given app setting within the users additional info.
|
public static final java.lang.String ADMINISTRATION_CATEGORY_ID
public static final java.lang.String LEGACY_CATEGORY_ID
public static final java.lang.String MAIN_CATEGORY_ID
public static final java.lang.String TOOLBAR_CSS
public static java.lang.String WORKPLACE_APP_SETTINGS_KEY
public static java.lang.String WORKPLACE_CSS_PARAM
protected static org.apache.commons.logging.Log LOG
public CmsWorkplaceAppManager(CmsObject adminCms) throws CmsException
adminCms - the admin cms contextCmsException - in case initializing the cms object failsprotected CmsWorkplaceAppManager()
public java.util.Collection<java.lang.String> getAdditionalStyleSheets()
public I_CmsWorkplaceAppConfiguration getAppConfiguration(java.lang.String appId)
appId - the app idpublic java.util.List<I_CmsWorkplaceAppConfiguration> getAppConfigurations(java.lang.String... appIds)
appIds - the app idspublic <T extends I_CmsAppSettings> T getAppSettings(CmsObject cms, java.lang.Class<T> type) throws java.lang.InstantiationException, java.lang.IllegalAccessException
cms - the cms contexttype - the app setting typejava.lang.InstantiationException - in case instantiating the settings type failsjava.lang.IllegalAccessException - in case the settings default constructor is not accessiblepublic java.util.Collection<I_CmsAppCategory> getCategories()
public I_CmsDefaultAction getDefaultAction(I_CmsDialogContext context)
context - the dialog contextpublic I_CmsDefaultAction getDefaultAction(I_CmsDialogContext context, I_CmsContextMenuItemProvider menuItemProvider)
context - the dialog contextmenuItemProvider - the menu item providerpublic java.util.List<I_CmsWorkplaceAppConfiguration> getDefaultQuickLaunchConfigurations()
public I_CmsEditor getEditorForResource(CmsResource resource, boolean plainText)
resource - the resource to editplainText - if plain text editing is requiredpublic I_CmsEditor getEditorForType(I_CmsResourceType type, boolean plainText)
type - the resource type to editplainText - if plain text editing is requiredpublic I_CmsContextMenuItemProvider getMenuItemProvider()
public java.util.List<I_CmsWorkplaceAppConfiguration> getQuickLaunchConfigurations(CmsObject cms)
cms - the current CMS contextpublic CmsUserIconHelper getUserIconHelper()
public java.util.Collection<I_CmsWorkplaceAppConfiguration> getWorkplaceApps()
public java.util.Collection<java.lang.String> getWorkplaceCssUris()
public void initWorkplaceCssUris(CmsModuleManager moduleManager)
They will be taken from the module parameter 'workplace-css' if present in any module.
moduleManager - the module manager instancepublic void loadApps()
public void storeAppSettings(CmsObject cms, java.lang.Class<? extends I_CmsAppSettings> type, I_CmsAppSettings appSettings)
cms - the cms contexttype - the app setting type, used as the settings keyappSettings - the settings to storeprotected java.util.List<I_CmsWorkplaceAppConfiguration> getUserQuickLauchConfigurations(CmsObject cms)
cms - the cms contextprotected void setUserQuickLaunchApps(CmsObject cms, java.util.List<java.lang.String> apps) throws java.lang.Exception
cms - the cms contextapps - the app idsjava.lang.Exception - in case writing the user fails