Class DataConfigNode

  • All Implemented Interfaces:
    org.apache.solr.common.ConfigNode

    public class DataConfigNode
    extends Object
    implements org.apache.solr.common.ConfigNode
    ConfigNode impl that applies property substitutions on access.

    This class wraps another ConfigNode and applies property substitution immediately when the txt() or attributes() methods are called. Because property substition is based on ThreadLocal values, These methods MUST be called while those variables are "active"

    See Also:
    ConfigNode.SUBSTITUTES, PropertiesUtil.substitute(java.lang.String, java.util.function.Function<java.lang.String, java.lang.String>)
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.solr.common.ConfigNode

        org.apache.solr.common.ConfigNode.Helpers
    • Field Summary

      • Fields inherited from interface org.apache.solr.common.ConfigNode

        EMPTY, SUBSTITUTES
    • Constructor Summary

      Constructors 
      Constructor Description
      DataConfigNode​(org.apache.solr.common.ConfigNode root)  
    • Constructor Detail

      • DataConfigNode

        public DataConfigNode​(org.apache.solr.common.ConfigNode root)
    • Method Detail

      • name

        public String name()
        Specified by:
        name in interface org.apache.solr.common.ConfigNode
      • txt

        public String txt()
        Each call to this method returns a (new) copy of the original txt with substitions applied.
        Specified by:
        txt in interface org.apache.solr.common.ConfigNode
      • attributes

        public Map<String,​String> attributes()
        Each call to this method returns a (new) copy of the original Map with substitions applied to the values.
        Specified by:
        attributes in interface org.apache.solr.common.ConfigNode
      • child

        public org.apache.solr.common.ConfigNode child​(String name)
        Specified by:
        child in interface org.apache.solr.common.ConfigNode
      • getAll

        public List<org.apache.solr.common.ConfigNode> getAll​(String name)
        Specified by:
        getAll in interface org.apache.solr.common.ConfigNode
      • getAll

        public List<org.apache.solr.common.ConfigNode> getAll​(Set<String> names,
                                                              Predicate<org.apache.solr.common.ConfigNode> test)
        Specified by:
        getAll in interface org.apache.solr.common.ConfigNode
      • forEachChild

        public void forEachChild​(Function<org.apache.solr.common.ConfigNode,​Boolean> fun)
        Specified by:
        forEachChild in interface org.apache.solr.common.ConfigNode