All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.rundeck.api.parser.ProjectConfigPropertyParser Maven / Gradle / Ivy

There is a newer version: 13.2
Show newest version
package org.rundeck.api.parser;

import org.dom4j.Node;
import org.rundeck.api.domain.ConfigProperty;

/**
 * ProjectConfigPropertyParser parses a {@literal } element representing
 * a configuration property.
 *
 * @author greg
 * @since 2014-03-07
 */
public class ProjectConfigPropertyParser extends BaseXpathParser {
    private String xpath;

    public ProjectConfigPropertyParser() {
        super();
    }

    public ProjectConfigPropertyParser(final String xpath) {
        super(xpath);
    }

    @Override
    public ConfigProperty parse(final Node propnode) {
        final String key = propnode.valueOf("@key");
        final String value = propnode.valueOf("@value");
        final ConfigProperty config = new ConfigProperty();
        config.setKey(key);
        config.setValue(value);
        return config;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy