public final class GenericAPI
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
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 java.lang.String |
getMessageName(MessageWrapper messageWrapper)
Get from the given
MessageWrapper the message name as it was defined in the cartridge. |
public static java.lang.String getMessageName(MessageWrapper messageWrapper)
MessageWrapper
the message name as it was defined in the cartridge.messageWrapper
- the message wrapper to get the name from.public static <T> T getMessageDataObject(MessageWrapper<T> messageWrapper)
MessageWrapper
.T
- the type of message being wrapped - typically String.messageWrapper
- the message wrapper to retrieve the data object from.public static XmlErrorsDocument getErrors(MessageWrapper messageWrapper)
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.messageWrapper
- the message wrapper to extract the errors from.