1 17 package org.apache.servicemix.components.util; 18 19 import javax.jbi.messaging.MessageExchange; 20 import javax.jbi.messaging.MessagingException; 21 import javax.jbi.messaging.NormalizedMessage; 22 23 import org.apache.servicemix.components.util.CopyTransformer; 24 25 public class PropertyAddTransformer extends CopyTransformer { 26 27 String name; 28 String value; 29 30 public boolean transform(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out) throws MessagingException { 31 super.transform(exchange, in, out); 32 out.setProperty(name, value); 33 return true; 34 } 35 36 public String getName() { 37 return name; 38 } 39 40 public void setName(String name) { 41 this.name = name; 42 } 43 44 public String getValue() { 45 return value; 46 } 47 48 public void setValue(String value) { 49 this.value = value; 50 } 51 } | Popular Tags |