Class WysiwygConfiguration

java.lang.Object
com.jalios.jcms.wysiwyg.WysiwygConfiguration

public class WysiwygConfiguration extends Object
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Returns the configuration id.
      Returns:
      String representing the configuration id
    • getParentId

      public 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(String parentId)
    • getOption

      public Object getOption(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(Map<String,Object> options)
      Copies all given options by replacing the old values.
      Parameters:
      options - to put
    • putOptionsIfAbsent

      public void putOptionsIfAbsent(Map<String,Object> options)
      Copies only options that are not already present
      Parameters:
      options - to put is absent
    • addOptions

      public void addOptions(Map<String,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 a PluginConfiguration related to the current WysiwygConfiguration. 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 a PluginConfiguration related to the current WysiwygConfiguration.
      Parameters:
      pluginConfiguration - PluginConfiguration to remove
    • getPluginConfigurations

      public PluginConfiguration[] getPluginConfigurations()
      Returns the PluginConfigurations related to the current WysiwygConfiguration.
      Returns:
      Array of PluginConfiguration
    • contains

      public boolean contains(String optionName, String value)
      Checks if the given option contains the given value.
      Parameters:
      optionName - name of the option
      value - value to search
      Returns:
      true the value is found, false instead