Class StaticHTMLEditorContentStyle
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.clientsideelement.styles.StaticHTMLEditorContentStyle
- All Implemented Interfaces:
HTMLEditorStyle,PluginAware,Configurable,LogEnabled,Serviceable
- Direct Known Subclasses:
SkinHTMLEditorContentStyle
public class StaticHTMLEditorContentStyle
extends AbstractLogEnabled
implements HTMLEditorStyle, Configurable, Serviceable, PluginAware
This implementation is based upon a static configuration.
FIXME For now, this implementation only supports styles for contents ('content' category). It cannot provided styles for other richtext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe feature that declared the instanceprotected StyleCategoryThe values of the fileprotected StyleCategoryThe values of the fileprotected StyleCategoryThe values of the fileprotected StyleCategoryThe values of the fileprotected StringThe plugin that declared the instanceprotected SourceResolverExcalibur source resolverprotected StyleCategoryThe values of the fileprotected StyleCategoryThe values of the fileprotected static final String[]Default icons style for imageprotected static final String[]Default icons style for linkprotected static final String[]Default icons style for ordered listprotected static final String[]Default icons style for tableprotected static final String[]Default icons style for unordered listFields inherited from interface org.ametys.cms.clientsideelement.styles.HTMLEditorStyle
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_configure(Configuration configuration, String defaultCatalogue, Map<String, Object> contextParameters) Configure this instance upon a configurationprotected Style_configureStyle(Configuration configuration, String defaultCatalogue, String[] defaultIcons, Map<String, Object> contextParameters) Configure a styleprotected StyleCategory_configureStyleCategory(Configuration styleConfiguration, String defaultCatalogue, String[] defaultIcons, Map<String, Object> contextParameters) Configure this instance upon the style part of a configurationprotected String_getImport(Configuration configuration, Map<String, Object> contextParameters) Determine an url from a configuration node.voidconfigure(Configuration configuration) Get the categories supported by this componentGet the list of styles for imagesGet the list of styles for linkgetOrderedList(String category, Map<String, Object> contextualParameters) Get the list of styles for ordered listsGet the list of styles for paragraphsGet the list of styles for tablesgetUnorderedList(String category, Map<String, Object> contextualParameters) Get the list of styles for unordered listsvoidservice(ServiceManager manager) voidsetPluginInfo(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.cms.clientsideelement.styles.HTMLEditorStyle
getBackOfficeCSSFiles, getInlineEditorCSSFiles
-
Field Details
-
TABLE_DEFAULT_ICONS
Default icons style for table -
LINK_DEFAULT_ICONS
Default icons style for link -
IMAGE_DEFAULT_ICONS
Default icons style for image -
UL_DEFAULT_ICONS
Default icons style for unordered list -
OL_DEFAULT_ICONS
Default icons style for ordered list -
_resolver
Excalibur source resolver -
_paraStyleCategory
The values of the file -
_tableStyleCategory
The values of the file -
_linkStyleCategory
The values of the file -
_imageStyleCategory
The values of the file -
_ulStyleCategory
The values of the file -
_olStyleCategory
The values of the file -
_pluginName
The plugin that declared the instance -
_featureName
The feature that declared the instance
-
-
Constructor Details
-
StaticHTMLEditorContentStyle
public StaticHTMLEditorContentStyle()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
setPluginInfo
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
_configure
protected void _configure(Configuration configuration, String defaultCatalogue, Map<String, Object> contextParameters) throws ConfigurationExceptionConfigure this instance upon a configuration- Parameters:
configuration- The configurationdefaultCatalogue- The default i18n catalogue to usecontextParameters- Contextuals parameters transmitted by the environment.- Throws:
ConfigurationException- If the configuration is incorrect
-
_configureStyleCategory
protected StyleCategory _configureStyleCategory(Configuration styleConfiguration, String defaultCatalogue, String[] defaultIcons, Map<String, Object> contextParameters) throws ConfigurationExceptionConfigure this instance upon the style part of a configuration- Parameters:
styleConfiguration- The style part of the configurationdefaultCatalogue- The default i18n catalogue to usedefaultIcons- the path to the button's default icons in small, medium and large sizecontextParameters- Contextuals parameters transmitted by the environment.- Returns:
- The style that represents the values read
- Throws:
ConfigurationException- If the configuration is incorrect
-
_getImport
Determine an url from a configuration node.- Parameters:
configuration- Read the optional plugin attribute and concatenate it to the value of the node. Can be nullcontextParameters- Contextuals parameters transmitted by the environment.- Returns:
- The non-null path to the plugin resource
-
_configureStyle
protected Style _configureStyle(Configuration configuration, String defaultCatalogue, String[] defaultIcons, Map<String, Object> contextParameters) throws ConfigurationExceptionConfigure a style- Parameters:
configuration- The style configurationdefaultCatalogue- The default i18n catalogue to usedefaultIcons- the path to the button's default icons in small, medium and large sizecontextParameters- Contextual parameters transmitted by the environment.- Returns:
- The style configured
- Throws:
ConfigurationException- If the configuration is incorrect
-
getCategories
Description copied from interface:HTMLEditorStyleGet the categories supported by this component- Specified by:
getCategoriesin interfaceHTMLEditorStyle- Returns:
- The categories supported. Cannot be null, but may be empty and of course contains the "" key for the default category.
-
getPara
Description copied from interface:HTMLEditorStyleGet the list of styles for paragraphs- Specified by:
getParain interfaceHTMLEditorStyle- Parameters:
category- The richtext categorycontextualParameters- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getTable
Description copied from interface:HTMLEditorStyleGet the list of styles for tables- Specified by:
getTablein interfaceHTMLEditorStyle- Parameters:
category- The richtext categorycontextualParameters- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getLink
Description copied from interface:HTMLEditorStyleGet the list of styles for link- Specified by:
getLinkin interfaceHTMLEditorStyle- Parameters:
category- The richtext categorycontextualParameters- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getImage
Description copied from interface:HTMLEditorStyleGet the list of styles for images- Specified by:
getImagein interfaceHTMLEditorStyle- Parameters:
category- The richtext categorycontextualParameters- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getUnorderedList
Description copied from interface:HTMLEditorStyleGet the list of styles for unordered lists- Specified by:
getUnorderedListin interfaceHTMLEditorStyle- Parameters:
category- The richtext categorycontextualParameters- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-
getOrderedList
Description copied from interface:HTMLEditorStyleGet the list of styles for ordered lists- Specified by:
getOrderedListin interfaceHTMLEditorStyle- Parameters:
category- The richtext categorycontextualParameters- Contextuals parameters transmitted by the environment.- Returns:
- A category. Can be null.
-