Class SkinHTMLEditorStyle
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.clientsideelement.styles.StaticHTMLEditorStyle
-
- org.ametys.web.clientsideelement.styles.SkinHTMLEditorStyle
-
- All Implemented Interfaces:
HTMLEditorStyle,PluginAware,Configurable,LogEnabled,Serviceable
public class SkinHTMLEditorStyle extends StaticHTMLEditorStyle
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>_imageStyleCategoriesThe assocation skinId Style ; to know for a given skin its styleprotected Map<String,Long>_lastUpdatesThe assocation skinId lastUpdateDate ; to know for a given skin when its conf file was read for the last timeprotected Map<String,StyleCategory>_linkStyleCategoriesThe assocation skinId Style ; to know for a given skin its styleprotected Map<String,StyleCategory>_olStyleCategoriesThe assocation skinId Style ; to know for a given skin its styleprotected Map<String,StyleCategory>_paraStyleCategoriesThe assocation skinId Style ; to know for a given skin its styleprotected SiteManager_siteManagerThe sites managerprotected SkinConfigurationHelper_skinConfigurationHelperThe helper for inheritable skin configurationprotected SkinsManager_skinsManagerThe skins managerprotected SourceResolver_sourceResolverThe excalibur source resolverprotected Map<String,StyleCategory>_tableStyleCategoriesThe assocation skinId Style ; to know for a given skin its styleprotected Map<String,StyleCategory>_ulStyleCategoriesThe assocation skinId Style ; to know for a given skin its style-
Fields inherited from class org.ametys.cms.clientsideelement.styles.StaticHTMLEditorStyle
_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 SkinHTMLEditorStyle()
-
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 skinvoidconfigure(Configuration configuration)StyleCategorygetImage(Map<String,Object> contextualParameters)Get the list of styles for imagesStyleCategorygetLink(Map<String,Object> contextualParameters)Get the list of styles for linkStyleCategorygetOrderedList(Map<String,Object> contextualParameters)Get the list of styles for ordered listsStyleCategorygetPara(Map<String,Object> contextualParameters)Get the list of styles for paragraphsStyleCategorygetTable(Map<String,Object> contextualParameters)Get the list of styles for tablesStyleCategorygetUnorderedList(Map<String,Object> contextualParameters)Get the list of styles for unordered listsvoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.cms.clientsideelement.styles.StaticHTMLEditorStyle
_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.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
-
SkinHTMLEditorStyle
public SkinHTMLEditorStyle()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classStaticHTMLEditorStyle- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classStaticHTMLEditorStyle- Throws:
ConfigurationException
-
_getImport
protected String _getImport(Configuration configuration, Map<String,Object> contextualParameters)
Description copied from class:StaticHTMLEditorStyleDetermine an url from a configuration node.- Overrides:
_getImportin classStaticHTMLEditorStyle- 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:HTMLEditorStyleGet the list of styles for paragraphs- Specified by:
getParain interfaceHTMLEditorStyle- Overrides:
getParain classStaticHTMLEditorStyle- 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:HTMLEditorStyleGet the list of styles for images- Specified by:
getImagein interfaceHTMLEditorStyle- Overrides:
getImagein classStaticHTMLEditorStyle- 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:HTMLEditorStyleGet the list of styles for link- Specified by:
getLinkin interfaceHTMLEditorStyle- Overrides:
getLinkin classStaticHTMLEditorStyle- 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:HTMLEditorStyleGet the list of styles for ordered lists- Specified by:
getOrderedListin interfaceHTMLEditorStyle- Overrides:
getOrderedListin classStaticHTMLEditorStyle- 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:HTMLEditorStyleGet the list of styles for tables- Specified by:
getTablein interfaceHTMLEditorStyle- Overrides:
getTablein classStaticHTMLEditorStyle- 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:HTMLEditorStyleGet the list of styles for unordered lists- Specified by:
getUnorderedListin interfaceHTMLEditorStyle- Overrides:
getUnorderedListin classStaticHTMLEditorStyle- 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
-
-