Class CmsWorkplaceAppManager

    • Method Detail

      • getAdditionalStyleSheets

        public java.util.Collection<java.lang.String> getAdditionalStyleSheets()
        Returns the additional style sheets provided by I_CmsWorkplaceStylesheetProvider services.

        Returns:
        the additional style sheets
      • getAppConfigurations

        public java.util.List<I_CmsWorkplaceAppConfigurationgetAppConfigurations​(java.lang.String... appIds)
        Returns the app configuration instances for the given ids.

        Parameters:
        appIds - the app ids
        Returns:
        the app configurations
      • getAppSettings

        public <T extends I_CmsAppSettings> T getAppSettings​(CmsObject cms,
                                                             java.lang.Class<T> type)
                                                      throws java.lang.InstantiationException,
                                                             java.lang.IllegalAccessException
        Returns the user app setting of the given type.

        Parameters:
        cms - the cms context
        type - the app setting type
        Returns:
        the app setting
        Throws:
        java.lang.InstantiationException - in case instantiating the settings type fails
        java.lang.IllegalAccessException - in case the settings default constructor is not accessible
      • getEditorForResource

        public I_CmsEditor getEditorForResource​(CmsObject cms,
                                                CmsResource resource,
                                                boolean plainText)
        Returns the editor for the given resource.

        Parameters:
        cms - the CMS context
        resource - the resource to edit
        plainText - if plain text editing is required
        Returns:
        the editor
      • getEditorForType

        public I_CmsEditor getEditorForType​(I_CmsResourceType type,
                                            boolean plainText)
        Returns the editor for the given resource type.

        Parameters:
        type - the resource type to edit
        plainText - if plain text editing is required
        Returns:
        the editor
      • getWorkplaceCssUris

        public java.util.Collection<java.lang.String> getWorkplaceCssUris()
        Returns the additional workplace CSS URIs.

        Returns:
        the additional workplace CSS URIs
      • initWorkplaceCssUris

        public void initWorkplaceCssUris​(CmsModuleManager moduleManager)
        Initializes the additional workplace CSS URIs.

        They will be taken from the module parameter 'workplace-css' if present in any module.

        Parameters:
        moduleManager - the module manager instance
      • loadApps

        public void loadApps()
        Loads the workplace apps.

      • storeAppSettings

        public void storeAppSettings​(CmsObject cms,
                                     java.lang.Class<? extends I_CmsAppSettings> type,
                                     I_CmsAppSettings appSettings)
        Stores the given app setting within the users additional info.

        Parameters:
        cms - the cms context
        type - the app setting type, used as the settings key
        appSettings - the settings to store
      • setUserQuickLaunchApps

        protected void setUserQuickLaunchApps​(CmsObject cms,
                                              java.util.List<java.lang.String> apps)
                                       throws java.lang.Exception
        Writes the user quick launch apps setting to the user additional info.

        Parameters:
        cms - the cms context
        apps - the app ids
        Throws:
        java.lang.Exception - in case writing the user fails