| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.soa.esb.actions.converters.SmooksTransformer
SmooksAction.
public class SmooksTransformer
Smooks Transformer.
This processor hooks the Milyn Smooks Data Transformation/Processing Engine into a message processing pipeline. A wide range of source (XML, CSV, EDI etc) and target (XML, Java, CSV, EDI etc) formats are supported.
 <action name="transformAB" class="org.jboss.soa.esb.actions.converters.SmooksTransformer">
        <property name="from" value="A" />
        <property name="from-type" value="text/xml:messageAtA" />
        <property name="to" value="B" />
        <property name="to-type" value="text/xml:messageAtB" />
 </action>
 
 Message.Body location where the transformation input
 and output are attached.
 
 If either these properties are not set, the action class defaults that value
 to being "defaultEntry".  In other words, if "input-location" is not configured
 on the action, the action will attempt to load the transformation input from the
 Message.Body location named "defaultEntry".  If the "output-location"
 is not configured on the action, the action will set the transformation result/output
 in the Message.Body location named "defaultEntry".
 Message.getBody().add(String key, Object object)) under a key based
 directly on the objects "beanId"
 as defined in the Smooks Javabean config.
| Field Summary | |
|---|---|
| static java.lang.String | EXTRACTED_BEANS_HASHDeprecated. The Smooks ExecutionContextis
 attached to the message and can be accessed through the | 
| static java.lang.String | FROMDeprecated. | 
| static java.lang.String | FROM_TYPEDeprecated. | 
| static java.lang.String | INPUT_LOCATIONDeprecated. Config key for the message body location on which the input message is attached. | 
| static java.lang.String | JAVA_OUTPUTDeprecated. Config key for the name of the Smooks Execution context object to be output to the "output-location". | 
| static java.lang.String | OUTPUT_LOCATIONDeprecated. Config key for the message body location on which the output message is attached. | 
| static java.lang.String | RESOURCE_CONFIGDeprecated. Action config Smooks configuration key. | 
| static java.lang.String | TODeprecated. | 
| static java.lang.String | TO_TYPEDeprecated. | 
| static java.lang.String | UPDATE_TOPICDeprecated. | 
| Fields inherited from interface org.jboss.soa.esb.actions.ActionPipelineProcessor | 
|---|
| PROCESS_EXCEPTION_METHOD, PROCESS_METHOD, PROCESS_SUCCESS_METHOD | 
| Constructor Summary | |
|---|---|
| SmooksTransformer(ConfigTree propertiesTree)Deprecated. Public constructor. | |
| Method Summary | |
|---|---|
|  void | destroy()Deprecated. Destroy the action instance. | 
| protected static java.lang.String[] | getMessageProfiles(java.lang.String messageFromType,
                   java.lang.String messageFrom,
                   java.lang.String messageToType,
                   java.lang.String messageTo)Deprecated. Get the profile list based on the supplied message flow properties. | 
| protected static java.lang.String | getMessageProfileString(java.lang.String messageFromType,
                        java.lang.String messageFrom,
                        java.lang.String messageToType,
                        java.lang.String messageTo)Deprecated. Construct the Smooks profile string based on the supplied message flow properties. | 
|  void | initialise()Deprecated. Initialise the Smooks instance. | 
|  Message | process(Message message)Deprecated. Perform the action processing on the specified message. | 
|  void | processException(Message message,
                 java.lang.Throwable th)Deprecated. Process an exception generated by the pipeline processing. | 
|  void | processSuccess(Message message)Deprecated. Process a successful pipeline process. | 
|  Message | transform(Message message)Deprecated. Transform the supplied message object and return the transformation result. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String EXTRACTED_BEANS_HASH
ExecutionContext is
 attached to the message and can be accessed through the 
public static final java.lang.String RESOURCE_CONFIG
public static final java.lang.String INPUT_LOCATION
public static final java.lang.String OUTPUT_LOCATION
public static final java.lang.String JAVA_OUTPUT
public static final java.lang.String FROM
public static final java.lang.String FROM_TYPE
public static final java.lang.String TO
public static final java.lang.String TO_TYPE
public static final java.lang.String UPDATE_TOPIC
| Constructor Detail | 
|---|
public SmooksTransformer(ConfigTree propertiesTree)
                  throws ConfigurationException
propertiesTree - Action Properties.
ConfigurationException - Action not properly configured.| Method Detail | 
|---|
public void initialise()
                throws ActionLifecycleException
initialise in interface ActionLifecycleActionLifecycleException - Failed to load Smooks configurations.
public void destroy()
             throws ActionLifecycleException
ActionLifecycle
destroy in interface ActionLifecycleActionLifecycleException
public Message transform(Message message)
                  throws TransformationException
TransformationService
transform in interface TransformationServicemessage - The message to be transformed.
TransformationException - An Exception occured during the transformation process.
public Message process(Message message)
                throws ActionProcessingException
ActionPipelineProcessor
process in interface ActionPipelineProcessormessage - The current message being processed.
ActionProcessingException - for errors during processing.
protected static java.lang.String[] getMessageProfiles(java.lang.String messageFromType,
                                                       java.lang.String messageFrom,
                                                       java.lang.String messageToType,
                                                       java.lang.String messageTo)
messageFromType - The type string for the message source.messageFrom - The Message Exchange Participant name for the message source.messageToType - The type string for the message target.messageTo - The Message Exchange Participant name for the message target.
protected static java.lang.String getMessageProfileString(java.lang.String messageFromType,
                                                          java.lang.String messageFrom,
                                                          java.lang.String messageToType,
                                                          java.lang.String messageTo)
messageFromType - The type string for the message source.messageFrom - The EPR string for the message source.messageToType - The type string for the message target.messageTo - The EPR srting for the message target.
public void processException(Message message,
                             java.lang.Throwable th)
ActionPipelineProcessor
processException in interface ActionPipelineProcessormessage - The original message.th - The throwable raised by the pipeline processingpublic void processSuccess(Message message)
ActionPipelineProcessor
processSuccess in interface ActionPipelineProcessormessage - The original message.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||