Class StaticRichTextConfiguration.StaticRichTextConfigurationAttribute
- java.lang.Object
-
- org.ametys.core.ui.widgets.richtext.StaticRichTextConfiguration.StaticRichTextConfigurationAttribute
-
- All Implemented Interfaces:
RichTextConfigurationAttribute
- Enclosing class:
- StaticRichTextConfiguration
public static class StaticRichTextConfiguration.StaticRichTextConfigurationAttribute extends Object implements RichTextConfigurationAttribute
A configured implementation of theStaticRichTextConfiguration.StaticRichTextConfigurationAttribute
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>
_authorizedValues
The possible valuesprotected String
_defaultValue
The default valueprotected String
_name
The name of the attributeprotected Set<String>
_technicalValues
The technical values
-
Constructor Summary
Constructors Modifier Constructor Description StaticRichTextConfigurationAttribute(String name, String defaultValue, Set<String> authorizedValues, Set<String> technicalValues)
Create by valuesprotected
StaticRichTextConfigurationAttribute(Configuration configuration)
Create by configuration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getAuthorizedValues()
Get the values that can be used on this attribute.String
getDefaultValue()
Get the default value for this attribute.String
getName()
Get the attribute nameSet<String>
getTechnicalValues()
Only applyable to the "class" attribute.
Between the authorized values, some are "technical" values (by opposition to "style" values).
-
-
-
Field Detail
-
_defaultValue
protected String _defaultValue
The default value
-
_authorizedValues
protected Set<String> _authorizedValues
The possible values
-
_technicalValues
protected Set<String> _technicalValues
The technical values
-
-
Constructor Detail
-
StaticRichTextConfigurationAttribute
public StaticRichTextConfigurationAttribute(String name, String defaultValue, Set<String> authorizedValues, Set<String> technicalValues)
Create by values- Parameters:
name
- The attribute name. Cannot be null.defaultValue
- The default value. Can be nullauthorizedValues
- A non-null set of authorized values. Must contains the default value.technicalValues
- A non-null set of technical values. Must contains the default value.
-
StaticRichTextConfigurationAttribute
protected StaticRichTextConfigurationAttribute(Configuration configuration) throws ConfigurationException
Create by configuration- Parameters:
configuration
- The tag configuration- Throws:
ConfigurationException
- If an error occurred
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:RichTextConfigurationAttribute
Get the attribute name- Specified by:
getName
in interfaceRichTextConfigurationAttribute
- Returns:
- a non null and non empty value
-
getDefaultValue
public String getDefaultValue()
Description copied from interface:RichTextConfigurationAttribute
Get the default value for this attribute. An attribute with a default value will always be present in the code.- Specified by:
getDefaultValue
in interfaceRichTextConfigurationAttribute
- Returns:
- Can be null if there is no default value.
-
getAuthorizedValues
public Set<String> getAuthorizedValues()
Description copied from interface:RichTextConfigurationAttribute
Get the values that can be used on this attribute.- Specified by:
getAuthorizedValues
in interfaceRichTextConfigurationAttribute
- Returns:
- A non null set of possible values.
-
getTechnicalValues
public Set<String> getTechnicalValues()
Description copied from interface:RichTextConfigurationAttribute
Only applyable to the "class" attribute.
Between the authorized values, some are "technical" values (by opposition to "style" values). Theses values should not be removed if the style of the tag change.
For example when going from a "bordered" image to a "large bordered" image... the image should stay "float to the right".- Specified by:
getTechnicalValues
in interfaceRichTextConfigurationAttribute
- Returns:
- A non null set of values.
-
-