Class OperationalDefaultsPreprocessor

    • Method Detail

      • addDefaultsDefinition

        public void addDefaultsDefinition​(String sPath,
                                          XmlElement defaultsElement)
        Defines that elements matching the specified path must contain the child elements defined by the default element. If not the missing children must be cloned from the default element into the element matching the path during pre-processing.

        Paths used by this method are based those defined by the XmlHelper.findElement(XmlElement, String) method, with the exception that ".." is not supported.

        For example 1: The following specifies that the elements matching the absolute path "/caching-schemes/distributed-scheme" must contain the children defined by the xmlDistributedSchemeDefaults element. If not, they must be cloned into place.

        addDefaultsDefinition("/caching-schemes/distributed-scheme", xmlDistributedSchemeDefaults);

        For example 2: The following specifies that the elements matching the relative path "distributed-scheme" must contain the children defined by the xmlDistributedSchemeDefaults element. If not, they must be cloned into place.

        addDefaultsDefinition("distributed-scheme", xmlDistributedSchemeDefaults);

        Parameters:
        sPath - The path of elements requiring the defaults
        defaultsElement - The xml element containing the required defaults for the specified path