|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.jbi.transformer.CopyTransformer
public class CopyTransformer
A simple transformer which copies the properties and content from the source message to the destination message.
| Constructor Summary | |
|---|---|
CopyTransformer()
|
|
CopyTransformer(boolean copySecuritySubject,
boolean copyContent,
boolean copyProperties,
boolean copyAttachments)
|
|
| Method Summary | |
|---|---|
static void |
copyAttachments(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
Copies the attachments from a message to another message |
static void |
copyProperties(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
Copies all of the properties from one message to another |
static void |
copySecuritySubject(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
Copies the subject from a message to another message |
static CopyTransformer |
getInstance()
Returns the singleton instance |
boolean |
isCopyAttachments()
|
boolean |
isCopyProperties()
|
boolean |
isCopySecuritySubject()
|
void |
setCopyAttachments(boolean copyAttachments)
|
void |
setCopyProperties(boolean copyProperties)
|
void |
setCopySecuritySubject(boolean copySecuritySubject)
|
javax.jbi.messaging.NormalizedMessage |
transform(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in)
Transforms an input message into the returned output message |
boolean |
transform(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
Transfers the state in the input message into the output message |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CopyTransformer()
public CopyTransformer(boolean copySecuritySubject,
boolean copyContent,
boolean copyProperties,
boolean copyAttachments)
| Method Detail |
|---|
public boolean isCopyAttachments()
public void setCopyAttachments(boolean copyAttachments)
copyAttachments - the copyAttachments to setpublic boolean isCopyProperties()
public void setCopyProperties(boolean copyProperties)
copyProperties - the copyProperties to setpublic boolean isCopySecuritySubject()
public void setCopySecuritySubject(boolean copySecuritySubject)
copySecuritySubject - the copySecuritySubject to setpublic static CopyTransformer getInstance()
public boolean transform(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
throws javax.jbi.messaging.MessagingException
MessageTransformer
transform in interface MessageTransformerexchange - the exchange on which the messages are flowingfrom - the input messageto - an empty out message ready to contain the result of the transformation
javax.jbi.messaging.MessagingException
public javax.jbi.messaging.NormalizedMessage transform(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in)
throws javax.jbi.messaging.MessagingException
MessageTransformer
transform in interface MessageTransformerexchange - the exchange fon which the messages are flowingin - the input message
null if the output message co
javax.jbi.messaging.MessagingException - when an error occurs while transforming the message
public static void copyProperties(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
from - the message containing the propertiesto - the destination messages where the properties are set
public static void copyAttachments(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
throws javax.jbi.messaging.MessagingException
from - the message with the attachmentsto - the message to which attachments are added
javax.jbi.messaging.MessagingException - if an attachment could not be added
public static void copySecuritySubject(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
throws javax.jbi.messaging.MessagingException
from - the message with the subjectto - the message to which the subject is added
javax.jbi.messaging.MessagingException - if an attachment could not be added
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||