1 17 package org.apache.servicemix.components.mps; 18 19 import javax.jbi.JBIException; 20 import javax.jbi.messaging.NormalizedMessage; 21 22 23 28 public class ExistingPropertyCopier implements PropertyValue { 29 30 public final static String XML_ELEMENT_NAME = "existing-property"; 31 32 private String name; 33 34 public ExistingPropertyCopier(String name) { 35 this.name = name; 36 } 37 public String getPropertyValue(NormalizedMessage msg) throws JBIException { 38 if (msg.getProperty(name) != null) { 39 return msg.getProperty(name).toString(); 40 } else { 41 return null; 42 } 43 44 } 45 46 } 47 | Popular Tags |