Class WysiwygConfiguration


  • public class WysiwygConfiguration
    extends java.lang.Object
    • Constructor Detail

      • WysiwygConfiguration

        public WysiwygConfiguration​(java.lang.String id,
                                    java.util.Map<java.lang.String,​java.lang.Object> originalOptions)
    • 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
      • 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 option
        value - value to search
        Returns:
        true the value is found, false instead