Example usage for org.apache.commons.configuration.tree ConfigurationNode addAttribute

List of usage examples for org.apache.commons.configuration.tree ConfigurationNode addAttribute

Introduction

In this page you can find the example usage for org.apache.commons.configuration.tree ConfigurationNode addAttribute.

Prototype

void addAttribute(ConfigurationNode attr);

Source Link

Document

Adds the specified attribute to this node

Usage

From source file:com.intuit.tank.proxy.config.CommonsProxyConfiguration.java

public static void updateRuleParentNode(Set<ConfigInclusionExclusionRule> rule, ConfigurationNode parentNode) {
    for (ConfigInclusionExclusionRule configInclusionExclusionRule : rule) {
        ConfigurationNode ruleNode = getConfNode("rule", configInclusionExclusionRule.getValue(), false);
        ConfigurationNode checkNode = getConfNode("check",
                configInclusionExclusionRule.getTransactionPart().toString(), true);
        ConfigurationNode matchNode = getConfNode("match", configInclusionExclusionRule.getMatch().toString(),
                true);//  w ww .j  a va2 s  .  c  o m
        ConfigurationNode headerNode = getConfNode("header", configInclusionExclusionRule.getHeader(), true);

        ruleNode.addAttribute(checkNode);
        ruleNode.addAttribute(matchNode);
        ruleNode.addAttribute(headerNode);

        parentNode.addChild(ruleNode);
    }
}