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 voidaddOptions(java.util.Map<java.lang.String,java.lang.Object> options)Copies all given options by appending their values with the old values.voidaddOptionsIfAbsent(WysiwygConfiguration otherConfiguration)Copies only the options of the given configuration that are not already present in the current configuration.voidaddPluginConfiguration(PluginConfiguration pluginConfiguration)Add aPluginConfigurationrelated to the currentWysiwygConfiguration.voidaddSuperOptions(WysiwygConfiguration otherConfiguration)Replace @super token in the options current configuration with the matching options of the given configuration.booleancontains(java.lang.String optionName, java.lang.String value)Checks if the given option contains the given value.java.lang.StringgetId()Returns the configuration id.java.lang.ObjectgetOption(java.lang.String optionName)Returns the option value from the given option name.java.lang.StringgetParentId()Returns the parent configuration id if the current configuration extends another configuration.PluginConfiguration[]getPluginConfigurations()Returns thePluginConfigurations related to the currentWysiwygConfiguration.voidputOptions(java.util.Map<java.lang.String,java.lang.Object> options)Copies all given options by replacing the old values.voidputOptionsIfAbsent(java.util.Map<java.lang.String,java.lang.Object> options)Copies only options that are not already presentvoidremovePluginConfiguration(PluginConfiguration pluginConfiguration)Remove aPluginConfigurationrelated to the currentWysiwygConfiguration.voidsetParentId(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 aPluginConfigurationrelated to the currentWysiwygConfiguration. If a configuration of the same id exists, it is replaced with the specified one.- Parameters:
pluginConfiguration-PluginConfigurationto add
-
removePluginConfiguration
public void removePluginConfiguration(PluginConfiguration pluginConfiguration)
Remove aPluginConfigurationrelated to the currentWysiwygConfiguration.- Parameters:
pluginConfiguration-PluginConfigurationto remove
-
getPluginConfigurations
public PluginConfiguration[] getPluginConfigurations()
Returns thePluginConfigurations 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:
truethe value is found,falseinstead
-
-