Package com.jalios.jcms.wysiwyg
Class WysiwygConfiguration
- java.lang.Object
-
- com.jalios.jcms.wysiwyg.WysiwygConfiguration
-
public class WysiwygConfiguration extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description WysiwygConfiguration(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> originalOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOptions(java.util.Map<java.lang.String,java.lang.Object> options)
Copies all given options by appending their values with the old values.void
addOptionsIfAbsent(WysiwygConfiguration otherConfiguration)
Copies only the options of the given configuration that are not already present in the current configuration.void
addPluginConfiguration(PluginConfiguration pluginConfiguration)
Add aPluginConfiguration
related to the currentWysiwygConfiguration
.void
addSuperOptions(WysiwygConfiguration otherConfiguration)
Replace @super token in the options current configuration with the matching options of the given configuration.boolean
contains(java.lang.String optionName, java.lang.String value)
Checks if the given option contains the given value.java.lang.String
getId()
Returns the configuration id.java.lang.Object
getOption(java.lang.String optionName)
Returns the option value from the given option name.java.lang.String
getParentId()
Returns the parent configuration id if the current configuration extends another configuration.PluginConfiguration[]
getPluginConfigurations()
Returns thePluginConfiguration
s related to the currentWysiwygConfiguration
.void
putOptions(java.util.Map<java.lang.String,java.lang.Object> options)
Copies all given options by replacing the old values.void
putOptionsIfAbsent(java.util.Map<java.lang.String,java.lang.Object> options)
Copies only options that are not already presentvoid
removePluginConfiguration(PluginConfiguration pluginConfiguration)
Remove aPluginConfiguration
related to the currentWysiwygConfiguration
.void
setParentId(java.lang.String parentId)
-
-
-
Method Detail
-
getId
public java.lang.String getId()
Returns the configuration id.- Returns:
- String representing the configuration id
-
getParentId
public java.lang.String getParentId()
Returns the parent configuration id if the current configuration extends another configuration.- Returns:
- String representing the parent configuration id
-
setParentId
public void setParentId(java.lang.String parentId)
-
getOption
public java.lang.Object getOption(java.lang.String optionName)
Returns the option value from the given option name.- Parameters:
optionName
- name of the option- Returns:
- Object representing the option value
-
putOptions
public void putOptions(java.util.Map<java.lang.String,java.lang.Object> options)
Copies all given options by replacing the old values.- Parameters:
options
- to put
-
putOptionsIfAbsent
public void putOptionsIfAbsent(java.util.Map<java.lang.String,java.lang.Object> options)
Copies only options that are not already present- Parameters:
options
- to put is absent
-
addOptions
public void addOptions(java.util.Map<java.lang.String,java.lang.Object> options)
Copies all given options by appending their values with the old values.- Parameters:
options
- to add
-
addSuperOptions
public void addSuperOptions(WysiwygConfiguration otherConfiguration)
Replace @super token in the options current configuration with the matching options of the given configuration.- Parameters:
otherConfiguration
- with options to add if there is the @super token in the value of the matching option
-
addOptionsIfAbsent
public void addOptionsIfAbsent(WysiwygConfiguration otherConfiguration)
Copies only the options of the given configuration that are not already present in the current configuration.- Parameters:
otherConfiguration
- with options to add
-
addPluginConfiguration
public void addPluginConfiguration(PluginConfiguration pluginConfiguration)
Add aPluginConfiguration
related to the currentWysiwygConfiguration
. If a configuration of the same id exists, it is replaced with the specified one.- Parameters:
pluginConfiguration
-PluginConfiguration
to add
-
removePluginConfiguration
public void removePluginConfiguration(PluginConfiguration pluginConfiguration)
Remove aPluginConfiguration
related to the currentWysiwygConfiguration
.- Parameters:
pluginConfiguration
-PluginConfiguration
to remove
-
getPluginConfigurations
public PluginConfiguration[] getPluginConfigurations()
Returns thePluginConfiguration
s related to the currentWysiwygConfiguration
.- Returns:
- Array of
PluginConfiguration
-
contains
public boolean contains(java.lang.String optionName, java.lang.String value)
Checks if the given option contains the given value.- Parameters:
optionName
- name of the optionvalue
- value to search- Returns:
true
the value is found,false
instead
-
-