|
|||||||||
| 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
public class SmooksTransformer
Smooks Transformer.
This processor hooks the Milyn Smooks XML Transformation/Processing Engine into a message processing pipeline to support non binary message transformations.
<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>
URIResourceLocator.
The default list file is "classpath:/smooks-cdr.lst" (note classpath based URIs are supported).
This file contains a list of URIs that reference
Smooks resource configurations files.
Again, URIResourceLocator is used to load these configurations. "classpath:/"
is the default if no scheme is specified. This is also where the Administration Console
is integrated with this class. The list file needs to specify the following a HTTP based
URI for accessing the configurations under management by the Administration console:
http://localhost:8080/jboss-esb-console/transform/smooks-config.jsp
... where the host and port values need to be modified appropriately.
| Field Summary | |
|---|---|
static java.lang.String |
CONFIGURATION_SECTION
Configuration section key. |
static java.lang.String |
EXTRACTED_BEANS_HASH
Key for storing/accessing any potential message Body bean HashMaps as populated by the Smooks Javabean Cartridge. |
static java.lang.String |
FROM
|
static java.lang.String |
FROM_TYPE
|
static java.lang.String |
SET_BEANHASH_TO_PAYLOAD
Config property key for setting a true/false flag to indicate whether or not a bean hashs should be set as the message payload before exiting the process method. |
static java.lang.String |
TO
|
static java.lang.String |
TO_TYPE
|
| Constructor Summary | |
|---|---|
SmooksTransformer(ConfigTree propertiesTree)
Public constructor. |
|
SmooksTransformer(java.lang.String name,
ConfigTree propertiesTree)
Public constructor. |
|
| Method Summary | |
|---|---|
java.io.Serializable |
getErrorNotification(Message message)
Get the "Error" notification message for this processor. |
protected static java.lang.String[] |
getMessageUseragentProfiles(java.lang.String messageFromType,
java.lang.String messageFrom,
java.lang.String messageToType,
java.lang.String messageTo)
Get the profile list based on the supplied message flow properties. |
protected static java.lang.String |
getMessageUseragentString(java.lang.String messageFromType,
java.lang.String messageFrom,
java.lang.String messageToType,
java.lang.String messageTo)
Construct the Smooks useragent string based on the supplied message flow properties. |
java.io.Serializable |
getOkNotification(Message message)
Get the "OK" notification message for this processor. |
protected void |
initSmooks(java.util.List<KeyValuePair> properties)
Initialise the static SmooksStandalone instance. |
Message |
process(Message message)
Perform the processing action on the message |
static void |
reset()
Reset the transformer. |
Message |
transform(Message message)
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 CONFIGURATION_SECTION
public static final java.lang.String EXTRACTED_BEANS_HASH
public static final java.lang.String SET_BEANHASH_TO_PAYLOAD
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
| Constructor Detail |
|---|
public SmooksTransformer(java.lang.String name,
ConfigTree propertiesTree)
throws ConfigurationException
actionName - Action name.propertiesTree - Action Properties.
ConfigurationException
ConfigurationException - Action not properly configured.
public SmooksTransformer(ConfigTree propertiesTree)
throws ConfigurationException
propertiesTree - Action Properties.
ConfigurationException
ConfigurationException - Action not properly configured.| Method Detail |
|---|
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
ActionProcessor
process in interface ActionProcessormessage - The message to be processed.
ActionProcessingException - Exception during payload processing.
protected static java.lang.String[] getMessageUseragentProfiles(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 getMessageUseragentString(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 java.io.Serializable getOkNotification(Message message)
ActionProcessor
getOkNotification in interface ActionProcessormessage - The message Object.
public java.io.Serializable getErrorNotification(Message message)
ActionProcessor
getErrorNotification in interface ActionProcessormessage - The message Object.
protected void initSmooks(java.util.List<KeyValuePair> properties)
throws ConfigurationException
properties - Action configuration properties.
ConfigurationException - Failed to load Smooks configurations.public static void reset()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||