1 /* 2 * Copyright 2013 DTO Labs, Inc. (http://dtolabs.com) 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 18 /* 19 * OutputEntryParserV5.java 20 * 21 * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a> 22 * Created: 1/2/13 5:33 PM 23 * 24 */ 25 package org.rundeck.api.parser; 26 27 import org.apache.commons.lang.StringUtils; 28 import org.dom4j.Node; 29 import org.rundeck.api.domain.RundeckOutputEntry; 30 31 32 /** 33 * OutputEntryParserV5 parses message entry for API v5 34 * 35 * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a> 36 */ 37 public class OutputEntryParserV5 extends OutputEntryParser implements XmlNodeParser<RundeckOutputEntry>{ 38 public OutputEntryParserV5() { 39 } 40 41 public OutputEntryParserV5(String xpath) { 42 super(xpath); 43 } 44 45 @Override 46 protected String parseMessage(Node entryNode) { 47 return StringUtils.trimToNull(entryNode.getStringValue()); 48 } 49 }