Class SkinHTMLEditorContentStyle
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.clientsideelement.styles.StaticHTMLEditorContentStyle
-
- org.ametys.web.clientsideelement.styles.SkinHTMLEditorContentStyle
-
- All Implemented Interfaces:
HTMLEditorStyle
,PluginAware
,Configurable
,LogEnabled
,Serviceable
public class SkinHTMLEditorContentStyle extends StaticHTMLEditorContentStyle
Based on a configuration like the StaticHTMLEditorStyleExtension but the file is located inside the current skin directory (skin/conf/edition-styles.xml).
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,StyleCategory>
_imageStyleCategories
The assocation skinId Style ; to know for a given skin its styleprotected Map<String,Long>
_lastUpdates
The assocation skinId lastUpdateDate ; to know for a given skin when its conf file was read for the last timeprotected Map<String,StyleCategory>
_linkStyleCategories
The assocation skinId Style ; to know for a given skin its styleprotected Map<String,StyleCategory>
_olStyleCategories
The assocation skinId Style ; to know for a given skin its styleprotected Map<String,StyleCategory>
_paraStyleCategories
The assocation skinId Style ; to know for a given skin its styleprotected SiteManager
_siteManager
The sites managerprotected SkinConfigurationHelper
_skinConfigurationHelper
The helper for inheritable skin configurationprotected SkinsManager
_skinsManager
The skins managerprotected SourceResolver
_sourceResolver
The excalibur source resolverprotected Map<String,StyleCategory>
_tableStyleCategories
The assocation skinId Style ; to know for a given skin its styleprotected Map<String,StyleCategory>
_ulStyleCategories
The assocation skinId Style ; to know for a given skin its style-
Fields inherited from class org.ametys.cms.clientsideelement.styles.StaticHTMLEditorContentStyle
_featureName, _imageStyleCategory, _linkStyleCategory, _olStyleCategory, _paraStyleCategory, _pluginName, _resolver, _tableStyleCategory, _ulStyleCategory, IMAGE_DEFAULT_ICONS, LINK_DEFAULT_ICONS, OL_DEFAULT_ICONS, TABLE_DEFAULT_ICONS, UL_DEFAULT_ICONS
-
Fields inherited from interface org.ametys.cms.clientsideelement.styles.HTMLEditorStyle
ROLE
-
-
Constructor Summary
Constructors Constructor Description SkinHTMLEditorContentStyle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_defaultValues(String skinId)
Set default values for the given skinprotected String
_getImport(Configuration configuration, Map<String,Object> contextualParameters)
Determine an url from a configuration node.protected String
_updateStyleCategories(Map<String,Object> contextualParameters)
Update if necessary the values associated with the current skinvoid
configure(Configuration configuration)
StyleCategory
getImage(String category, Map<String,Object> contextualParameters)
Get the list of styles for imagesStyleCategory
getLink(String category, Map<String,Object> contextualParameters)
Get the list of styles for linkStyleCategory
getOrderedList(String category, Map<String,Object> contextualParameters)
Get the list of styles for ordered listsStyleCategory
getPara(String category, Map<String,Object> contextualParameters)
Get the list of styles for paragraphsStyleCategory
getTable(String category, Map<String,Object> contextualParameters)
Get the list of styles for tablesStyleCategory
getUnorderedList(String category, Map<String,Object> contextualParameters)
Get the list of styles for unordered listsvoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.cms.clientsideelement.styles.StaticHTMLEditorContentStyle
_configure, _configureStyle, _configureStyleCategory, getCategories, setPluginInfo
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.cms.clientsideelement.styles.HTMLEditorStyle
getBackOfficeCSSFiles, getInlineEditorCSSFiles
-
-
-
-
Field Detail
-
_lastUpdates
protected Map<String,Long> _lastUpdates
The assocation skinId lastUpdateDate ; to know for a given skin when its conf file was read for the last time
-
_paraStyleCategories
protected Map<String,StyleCategory> _paraStyleCategories
The assocation skinId Style ; to know for a given skin its style
-
_tableStyleCategories
protected Map<String,StyleCategory> _tableStyleCategories
The assocation skinId Style ; to know for a given skin its style
-
_imageStyleCategories
protected Map<String,StyleCategory> _imageStyleCategories
The assocation skinId Style ; to know for a given skin its style
-
_linkStyleCategories
protected Map<String,StyleCategory> _linkStyleCategories
The assocation skinId Style ; to know for a given skin its style
-
_ulStyleCategories
protected Map<String,StyleCategory> _ulStyleCategories
The assocation skinId Style ; to know for a given skin its style
-
_olStyleCategories
protected Map<String,StyleCategory> _olStyleCategories
The assocation skinId Style ; to know for a given skin its style
-
_sourceResolver
protected SourceResolver _sourceResolver
The excalibur source resolver
-
_siteManager
protected SiteManager _siteManager
The sites manager
-
_skinsManager
protected SkinsManager _skinsManager
The skins manager
-
_skinConfigurationHelper
protected SkinConfigurationHelper _skinConfigurationHelper
The helper for inheritable skin configuration
-
-
Constructor Detail
-
SkinHTMLEditorContentStyle
public SkinHTMLEditorContentStyle()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticHTMLEditorContentStyle
- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classStaticHTMLEditorContentStyle
- Throws:
ConfigurationException
-
_getImport
protected String _getImport(Configuration configuration, Map<String,Object> contextualParameters)
Description copied from class:StaticHTMLEditorContentStyle
Determine an url from a configuration node.- Overrides:
_getImport
in classStaticHTMLEditorContentStyle
- Parameters:
configuration
- Read the optional plugin attribute and concatenate it to the value of the node. Can be nullcontextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- The non-null path to the plugin resource
-
getPara
public StyleCategory getPara(String category, Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyle
Get the list of styles for paragraphs- Specified by:
getPara
in interfaceHTMLEditorStyle
- Overrides:
getPara
in classStaticHTMLEditorContentStyle
- Parameters:
category
- The richtext categorycontextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getImage
public StyleCategory getImage(String category, Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyle
Get the list of styles for images- Specified by:
getImage
in interfaceHTMLEditorStyle
- Overrides:
getImage
in classStaticHTMLEditorContentStyle
- Parameters:
category
- The richtext categorycontextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getLink
public StyleCategory getLink(String category, Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyle
Get the list of styles for link- Specified by:
getLink
in interfaceHTMLEditorStyle
- Overrides:
getLink
in classStaticHTMLEditorContentStyle
- Parameters:
category
- The richtext categorycontextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getOrderedList
public StyleCategory getOrderedList(String category, Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyle
Get the list of styles for ordered lists- Specified by:
getOrderedList
in interfaceHTMLEditorStyle
- Overrides:
getOrderedList
in classStaticHTMLEditorContentStyle
- Parameters:
category
- The richtext categorycontextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getTable
public StyleCategory getTable(String category, Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyle
Get the list of styles for tables- Specified by:
getTable
in interfaceHTMLEditorStyle
- Overrides:
getTable
in classStaticHTMLEditorContentStyle
- Parameters:
category
- The richtext categorycontextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getUnorderedList
public StyleCategory getUnorderedList(String category, Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyle
Get the list of styles for unordered lists- Specified by:
getUnorderedList
in interfaceHTMLEditorStyle
- Overrides:
getUnorderedList
in classStaticHTMLEditorContentStyle
- Parameters:
category
- The richtext categorycontextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
_updateStyleCategories
protected String _updateStyleCategories(Map<String,Object> contextualParameters)
Update if necessary the values associated with the current skin- Parameters:
contextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- The current skin
-
_defaultValues
protected void _defaultValues(String skinId)
Set default values for the given skin- Parameters:
skinId
- The skin
-
-