org.rundeck.api.parser.ProjectParserV11 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rundeck-api-java-client Show documentation
Show all versions of rundeck-api-java-client Show documentation
Java client for the Rundeck REST API
The newest version!
package org.rundeck.api.parser;
import org.dom4j.Node;
import org.rundeck.api.domain.RundeckProject;
/**
* ProjectParserV11 supports embedded "config" element.
*
* @author greg
* @since 2014-02-27
*/
public class ProjectParserV11 extends ProjectParser {
public ProjectParserV11() {
}
public ProjectParserV11(final String xpath) {
super(xpath);
}
@Override
public RundeckProject parse(final Node projectNode) {
final RundeckProject rundeckProject = super.parse(projectNode);
final Node config1 = projectNode.selectSingleNode("config");
if (config1 == null) {
return rundeckProject;
}
rundeckProject.setProjectConfig(new ProjectConfigParser().parseXmlNode(config1));
return rundeckProject;
}
}