public class JBIResultXmlBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_MSG_CODE
default message code
|
static String |
DEFAULT_TASK_ID
default task id
|
static String |
ERROR_MSG_TYPE
error message type
|
static boolean |
FAILED_RESULT
failed result
|
static String |
INFO_MSG_TYPE
info message type
|
static boolean |
SUCCESS_RESULT
success result
|
static String |
WARNING_MSG_TYPE
warning message type
|
| Modifier | Constructor and Description |
|---|---|
protected |
JBIResultXmlBuilder()
Creates a new instance of EsbResultXmlBuilder
|
| Modifier and Type | Method and Description |
|---|---|
static String |
createFailedJbiResultXml(I18NBundle i18nBundle,
String i18nKey,
Object[] args)
creates the jbi management xml
|
static String |
createJbiResultXml(I18NBundle i18nBundle,
String i18nKey,
Object[] args,
String taskId,
boolean successResult,
String msgType,
Throwable ex)
creates the jbi management xml
|
static String |
createJbiResultXml(I18NBundle i18nBundle,
String i18nKey,
Object[] args,
Throwable ex)
creates the jbi management xml
|
String |
createJbiResultXml(JBIManagementMessage msg)
Creates a XML JBI Management message from the JBI Management Message
|
String |
createJbiResultXml(String taskId,
boolean successResult,
String msgType,
String msgCode,
String msg,
Object[] args)
creates the jbi management xml
|
String |
createJbiResultXml(String taskId,
boolean successResult,
String msgType,
String msgCode,
String msg,
Object[] args,
Throwable ex)
creates the jbi management xml
|
String |
createJbiResultXml(String taskId,
String msgCode,
Throwable ex)
creates the jbi management xml
|
protected List |
flatExceptionChain(Throwable ex)
returns the exception cause chain in a list including this exception
|
protected String |
getChainedExceptionInfoXml(String msgCode,
Throwable ex)
returns the xml chunk contains exception message info for the exception
chain
|
protected String |
getExceptionInfoXml(String msgCode,
int nestingLevel,
Throwable ex)
returns exceptin info xml chunk
|
protected String |
getExceptionInfoXml(String msgCode,
String locMsg,
int nestingLevel,
String stackTrace)
returns exceptin info xml chunk
|
protected String |
getExceptionStackTrace(Throwable ex)
return the excpetion stacktrace as a string
|
static JBIResultXmlBuilder |
getInstance()
returns the instance of this class
|
protected String |
getMsgLocInfoXml(String msgCode,
String msg,
Object[] args)
return the xml chunk contains the message info elements
|
protected String |
getTaskInfoXml(String taskId,
boolean successResult,
String msgType)
return the xml chunk that has task info elements
|
protected String |
getTaskStatusMsgXml(String msgCode,
String msg,
Object[] args)
return the xml chuck for status message elements
|
public static final boolean SUCCESS_RESULT
public static final boolean FAILED_RESULT
public static final String INFO_MSG_TYPE
public static final String WARNING_MSG_TYPE
public static final String ERROR_MSG_TYPE
public static final String DEFAULT_TASK_ID
public static final String DEFAULT_MSG_CODE
protected JBIResultXmlBuilder()
public static JBIResultXmlBuilder getInstance()
protected List flatExceptionChain(Throwable ex)
ex - exceptionprotected String getTaskInfoXml(String taskId, boolean successResult, String msgType)
taskId - task idsuccessResult - true for SUCCESS, false for FAILEDmsgType - one of INFO, ERROR, WARNING stringsprotected String getMsgLocInfoXml(String msgCode, String msg, Object[] args)
msgCode - i18n message codemsg - l10n messageargs - arguments for i18n messageprotected String getTaskStatusMsgXml(String msgCode, String msg, Object[] args)
msgCode - i18n message codemsg - l10n messageargs - arguments for i18n messageprotected String getExceptionStackTrace(Throwable ex)
ex - exceptionprotected String getExceptionInfoXml(String msgCode, int nestingLevel, Throwable ex)
msgCode - i18n message codenestingLevel - level in the exception chainex - exception for stacktraceprotected String getExceptionInfoXml(String msgCode, String locMsg, int nestingLevel, String stackTrace)
msgCode - i18n message codelocMsg - localized messagenestingLevel - level in the exception chainstackTrace - stacktrace stringprotected String getChainedExceptionInfoXml(String msgCode, Throwable ex)
msgCode - i18n codeex - exceptionpublic String createJbiResultXml(String taskId, boolean successResult, String msgType, String msgCode, String msg, Object[] args, Throwable ex)
taskId - task idsuccessResult - true for SUCCESS, false for FAILIED messagemsgType - one of INFO, ERROR, WARNINGmsgCode - i18n message codemsg - messageargs - i18n message argumentsex - exceptionpublic String createJbiResultXml(String taskId, boolean successResult, String msgType, String msgCode, String msg, Object[] args)
taskId - task idsuccessResult - true for SUCCESS, false for FAILIED messagemsgType - one of INFO, ERROR, WARNINGmsgCode - i18n message codemsg - messageargs - i18n message argumentspublic String createJbiResultXml(String taskId, String msgCode, Throwable ex)
taskId - task idmsgCode - i18n message codeex - exceptionpublic static String createJbiResultXml(I18NBundle i18nBundle, String i18nKey, Object[] args, String taskId, boolean successResult, String msgType, Throwable ex)
i18nBundle - i18n bundle objecti18nKey - key to look for i18n msgargs - i18n argstaskId - task idsuccessResult - true or falsemsgType - message typeex - exceptionpublic static String createJbiResultXml(I18NBundle i18nBundle, String i18nKey, Object[] args, Throwable ex)
i18nBundle - i18n bundle objecti18nKey - i18n key in the bundleargs - i18n argsex - exceptionpublic String createJbiResultXml(JBIManagementMessage msg)
msg - - JBIManagementMessage instance to create the xml message frompublic static String createFailedJbiResultXml(I18NBundle i18nBundle, String i18nKey, Object[] args)
i18nBundle - i18n bundle objecti18nKey - i18n key in the bundleargs - i18n argsCopyright © 2011-2016 OpenESB Community. All Rights Reserved.