1
2
3
4
5
6
7
8
9
10
11 package org.mule.pattern.core.support;
12
13 import org.mule.api.MuleMessage;
14 import org.mule.api.config.MuleProperties;
15 import org.mule.transformer.TransformerTemplate.TransformerCallback;
16 import org.mule.util.StringUtils;
17
18 public final class CopyInboundToOutboundPropertiesTransformerCallback implements TransformerCallback
19 {
20 public Object doTransform(final MuleMessage message) throws Exception
21 {
22 for (final String inboundPropertyName : message.getInboundPropertyNames())
23 {
24 if (StringUtils.startsWith(inboundPropertyName, MuleProperties.PROPERTY_PREFIX))
25 {
26 continue;
27 }
28
29 message.setOutboundProperty(inboundPropertyName, message.getInboundProperty(inboundPropertyName));
30 }
31
32 return message;
33 }
34 }