Class SkinHTMLEditorStyleExtension
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.clientsideelement.styles.StaticHTMLEditorStyleExtension
-
- org.ametys.web.clientsideelement.styles.SkinHTMLEditorStyleExtension
-
- All Implemented Interfaces:
HTMLEditorStyleExtensionPoint
,PluginAware
,Configurable
,LogEnabled
,Serviceable
public class SkinHTMLEditorStyleExtension extends StaticHTMLEditorStyleExtension
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.StaticHTMLEditorStyleExtension
_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.HTMLEditorStyleExtensionPoint
ROLE
-
-
Constructor Summary
Constructors Constructor Description SkinHTMLEditorStyleExtension()
-
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(Map<String,Object> contextualParameters)
Get the list of styles for imagesStyleCategory
getLink(Map<String,Object> contextualParameters)
Get the list of styles for linkStyleCategory
getOrderedList(Map<String,Object> contextualParameters)
Get the list of styles for ordered listsStyleCategory
getPara(Map<String,Object> contextualParameters)
Get the list of styles for paragraphsStyleCategory
getTable(Map<String,Object> contextualParameters)
Get the list of styles for tablesStyleCategory
getUnorderedList(Map<String,Object> contextualParameters)
Get the list of styles for unordered listsvoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.cms.clientsideelement.styles.StaticHTMLEditorStyleExtension
_configure, _configureStyle, _configureStyleCategory, 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.HTMLEditorStyleExtensionPoint
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
-
SkinHTMLEditorStyleExtension
public SkinHTMLEditorStyleExtension()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticHTMLEditorStyleExtension
- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classStaticHTMLEditorStyleExtension
- Throws:
ConfigurationException
-
_getImport
protected String _getImport(Configuration configuration, Map<String,Object> contextualParameters)
Description copied from class:StaticHTMLEditorStyleExtension
Determine an url from a configuration node.- Overrides:
_getImport
in classStaticHTMLEditorStyleExtension
- 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(Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyleExtensionPoint
Get the list of styles for paragraphs- Specified by:
getPara
in interfaceHTMLEditorStyleExtensionPoint
- Overrides:
getPara
in classStaticHTMLEditorStyleExtension
- Parameters:
contextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getImage
public StyleCategory getImage(Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyleExtensionPoint
Get the list of styles for images- Specified by:
getImage
in interfaceHTMLEditorStyleExtensionPoint
- Overrides:
getImage
in classStaticHTMLEditorStyleExtension
- Parameters:
contextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getLink
public StyleCategory getLink(Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyleExtensionPoint
Get the list of styles for link- Specified by:
getLink
in interfaceHTMLEditorStyleExtensionPoint
- Overrides:
getLink
in classStaticHTMLEditorStyleExtension
- Parameters:
contextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getOrderedList
public StyleCategory getOrderedList(Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyleExtensionPoint
Get the list of styles for ordered lists- Specified by:
getOrderedList
in interfaceHTMLEditorStyleExtensionPoint
- Overrides:
getOrderedList
in classStaticHTMLEditorStyleExtension
- Parameters:
contextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getTable
public StyleCategory getTable(Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyleExtensionPoint
Get the list of styles for tables- Specified by:
getTable
in interfaceHTMLEditorStyleExtensionPoint
- Overrides:
getTable
in classStaticHTMLEditorStyleExtension
- Parameters:
contextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getUnorderedList
public StyleCategory getUnorderedList(Map<String,Object> contextualParameters)
Description copied from interface:HTMLEditorStyleExtensionPoint
Get the list of styles for unordered lists- Specified by:
getUnorderedList
in interfaceHTMLEditorStyleExtensionPoint
- Overrides:
getUnorderedList
in classStaticHTMLEditorStyleExtension
- Parameters:
contextualParameters
- 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
-
-