Class RichTextConfigurationExtensionPoint
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<RichTextConfiguration>
-
- org.ametys.core.ui.widgets.richtext.RichTextConfigurationExtensionPoint
-
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<RichTextConfiguration>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
public class RichTextConfigurationExtensionPoint extends AbstractThreadSafeComponentExtensionPoint<RichTextConfiguration>
Extension point for configuring the widget 'richtext'
-
-
Field Summary
Fields Modifier and Type Field Description static String
ROLE
The component role-
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description RichTextConfigurationExtensionPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_addClientSideElementToJSON(List<Object> list, Set<ClientSideElement> clientSideElements)
private void
_addExtensionToJSON(Map<String,Object> contextualParameters, Map<String,Object> json, RichTextConfiguration extension)
private void
_addFilesToJSON(Set<Map<String,Object>> object, List<ClientSideElement.ScriptFile> cssFiles)
private void
_addStylesToJSON(Map<String,Map<String,List<Map<String,Object>>>> object, Map<String,Map<RichTextConfigurationStyleGroup,List<RichTextConfigurationStyle>>> availableStyles)
private void
_addTagsToJSON(Map<String,Object> object, Collection<RichTextConfigurationTag> handledTags)
private Map<String,Object>
_scriptFileToJson(ClientSideElement.ScriptFile scriptFile)
Map<String,Object>
toJSON(Map<String,Object> contextualParameters)
Converts all values to a single JSON object { "category1" : { "tags" : { "p" : { empty: "CLOSE|OPEN|REMOVE_EMPTY_CONTENT|PADDING|REMOVE_EMPTY_ATTRIBUTES", synonyms: ["div"], attributes: { "id": {}, "alt": { "default-value": "" }, "class": { "default-value": "value1", "values": ["value1", "value2"], "technical-values": [ "value1" ] // special for 'class' attribute } } } }, "styles" : { "paragraph" : { "groups": [ { "label": "Customized styles", "priority": 1, "values" : [ { "tagname": "h1", "cssclass": "big", "label": "Header 1 (big)", "description": "A big header", "buttonCSSClass": "h1-big", "buttonSmallIcon": "img/h1_16.png", "buttonMediumIcon": "img/h1_32.png", "buttonLargeIcon": "img/h1_48.png" } ] } ] } }, "css" : [ { language: false, url: "file1", debug: "all|true|false", rtl: "all|true|false" }, { language: true, default: "en", url : {"fr": "file1"} ], "validators": [ "class": { "name": "classname", "parameters": { ...-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
addComponent, addExtension, contextualize, dispose, getExtension, getExtensionsIds, hasExtension, initialize, initializeExtensions, service
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
RichTextConfigurationExtensionPoint
public RichTextConfigurationExtensionPoint()
-
-
Method Detail
-
toJSON
public Map<String,Object> toJSON(Map<String,Object> contextualParameters)
Converts all values to a single JSON object { "category1" : { "tags" : { "p" : { empty: "CLOSE|OPEN|REMOVE_EMPTY_CONTENT|PADDING|REMOVE_EMPTY_ATTRIBUTES", synonyms: ["div"], attributes: { "id": {}, "alt": { "default-value": "" }, "class": { "default-value": "value1", "values": ["value1", "value2"], "technical-values": [ "value1" ] // special for 'class' attribute } } } }, "styles" : { "paragraph" : { "groups": [ { "label": "Customized styles", "priority": 1, "values" : [ { "tagname": "h1", "cssclass": "big", "label": "Header 1 (big)", "description": "A big header", "buttonCSSClass": "h1-big", "buttonSmallIcon": "img/h1_16.png", "buttonMediumIcon": "img/h1_32.png", "buttonLargeIcon": "img/h1_48.png" } ] } ] } }, "css" : [ { language: false, url: "file1", debug: "all|true|false", rtl: "all|true|false" }, { language: true, default: "en", url : {"fr": "file1"} ], "validators": [ "class": { "name": "classname", "parameters": { ... } } ] "convertors": [ "class": { "name": "classname", "parameters": { ... } } ] } }- Parameters:
contextualParameters
- Contextuals parameters transmitted by the environment.- Returns:
- The non-null configuration
-
_addExtensionToJSON
private void _addExtensionToJSON(Map<String,Object> contextualParameters, Map<String,Object> json, RichTextConfiguration extension)
-
_addTagsToJSON
private void _addTagsToJSON(Map<String,Object> object, Collection<RichTextConfigurationTag> handledTags)
-
_addStylesToJSON
private void _addStylesToJSON(Map<String,Map<String,List<Map<String,Object>>>> object, Map<String,Map<RichTextConfigurationStyleGroup,List<RichTextConfigurationStyle>>> availableStyles)
-
_addFilesToJSON
private void _addFilesToJSON(Set<Map<String,Object>> object, List<ClientSideElement.ScriptFile> cssFiles)
-
_addClientSideElementToJSON
private void _addClientSideElementToJSON(List<Object> list, Set<ClientSideElement> clientSideElements)
-
_scriptFileToJson
private Map<String,Object> _scriptFileToJson(ClientSideElement.ScriptFile scriptFile)
-
-