com.bea.alsb.financial.api
Class GenericAPI

java.lang.Object
  extended by com.bea.alsb.financial.api.GenericAPI

public final class GenericAPI
extends Object

Utility methods for manipulating Financial Facade objects stored in the ALSB Pipeline.


Method Summary
static XmlErrorsDocument getErrors(MessageWrapper messageWrapper)
          Get errors from the given MessageWrapper.
static
<T> T
getMessageDataObject(MessageWrapper<T> messageWrapper)
          Retrieves the data object from the given MessageWrapper.
static String getMessageName(MessageWrapper messageWrapper)
          Get from the given MessageWrapper the message name as it was defined in the cartridge.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMessageName

public static String getMessageName(MessageWrapper messageWrapper)
Get from the given MessageWrapper the message name as it was defined in the cartridge.

Parameters:
messageWrapper - the message wrapper to get the name from.
Returns:
the message name, as defined in the Financial Message Designer.

getMessageDataObject

public static <T> T getMessageDataObject(MessageWrapper<T> messageWrapper)
Retrieves the data object from the given MessageWrapper.

Type Parameters:
T - the type of message being wrapped - typically String.
Parameters:
messageWrapper - the message wrapper to retrieve the data object from.
Returns:
the retrieved data object.

getErrors

public static XmlErrorsDocument getErrors(MessageWrapper messageWrapper)
Get errors from the given MessageWrapper. If there are no errors a simple root element with no child is returned. For more details about the xml structure refers to the schemas provided with the facade Jar file.

Parameters:
messageWrapper - the message wrapper to extract the errors from.
Returns:
the errors extracted from the given message wrapper.