public class ESBResultFormatter extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
APP_VAR_MARKER_ID
application varaible name marker in the msg/exp list
|
static String |
CAS_KEY
CAS msg/exp list key in the instance Maps
|
static int |
CAS_MSG_FORMAT
cas msg format
|
static int |
COMP_MSG_FORMAT
component msg format
|
static String |
ERROR
error message type
|
static String |
EXCEPTION
error message type
|
static String |
FAILED
failed status
|
static String |
INFO
info message type
|
static int |
INST_MSG_FORMAT
instance msg format
|
static String |
INSTANCE_MARKER_ID
instance name marker in the msg/exp list
|
static String |
OUT_DEBUG |
static String |
OUT_NORMAL |
static String |
OUT_VERBOSE |
static String |
SUCCESS
success status
|
static int |
TOP_MSG_FORMAT
same as cas msg format
|
static String |
UNKNOWN
unknown value for any unknonw value of any msg status or type.
|
static String |
WARNING
warning message type
|
| Constructor and Description |
|---|
ESBResultFormatter() |
ESBResultFormatter(String outLevel)
Creates a new instance of AdminResultFormatter
|
| Modifier and Type | Method and Description |
|---|---|
JBIManagementMessage.TaskResultInfo |
createTaskResultInfo(JBIManagementMessage.TaskResultInfo taskResultInfo,
List msgList,
List expList)
copy the id, resutl, msgtype from the taskresultinfo passed and create a new TaskResultInfo with them
and the passed msg, exp lists.
|
protected String |
get2ndExceptionMsgI18NKey(int formatType)
message format type i18n key
|
protected String |
get2ndMessageI18NKey(int formatType)
message format type i18n key
|
protected String |
getExceptionMsgI18NKey(int formatType)
message format type i18n key
|
String |
getFormattedESBResult(JBIManagementMessage jbiMsg)
return the formatted message if you can create. else return null
|
String |
getFormattedESBResult(String jbiMgmtMsgXml)
return the formatted message if you can create. else return null
|
String |
getFormattedResult(JBIManagementMessage.ESBTaskResult esbResult)
creates formatted esb results
|
static I18NBundle |
getI18NBundle()
gives the I18N bundle
|
protected String |
getL10N2ndExptionMessageForAppVar(String appVarName)
creates l10n message in exceptin format
|
protected String |
getL10NExptionMessage(String code,
String msg)
creates l10n message in exceptin format
|
protected String |
getL10NExptionMessageForAppVar(String appVarName)
creates l10n message in exceptin format
|
protected String |
getL10NMainMessage(String msgType,
String code,
String msg)
formats the message
|
protected String |
getL10NMainMessageForAppVar(String msgType,
String appVarName)
formats the message
|
protected String |
getL10NMessage(String code,
String msg)
creates l10n message
|
protected String |
getL10NMessageForAppVar(String appVarName)
creates l10n message
|
protected String |
getL10NMessageType(String msgType)
message type from i18n bundle
|
protected String |
getMainMessageI18NKey(int formatType)
message format type i18n key
|
protected void |
print2ndExceptionMessage(PrintWriter out,
int formatType,
String msgCode,
String msg)
prints message to the output
|
protected void |
print2ndMessage(PrintWriter out,
int formatType,
String msgCode,
String msg)
prints message to the output
|
protected boolean |
printAllFormattedMessages(PrintWriter out,
int formatType,
String msgType,
List msgList,
List expList,
boolean startWithNewLine)
prints the messages from message list
|
boolean |
printComponentLevelMessages(PrintWriter out,
JBIManagementMessage.ComponentTaskResult compTaskResult)
prints the messages
|
boolean |
printESBTaskResult(PrintWriter out,
JBIManagementMessage.ESBTaskResult esbResult)
prints the messages
|
protected void |
printExceptionMessage(PrintWriter out,
int formatType,
String msgCode,
String msg)
prints message to the output
|
protected boolean |
printFormattedExceptionMessages(PrintWriter out,
int formatType,
String msgType,
List expList,
boolean printMainMsg)
prints the messages from message list
|
protected boolean |
printFormattedStatusMessages(PrintWriter out,
int formatType,
String msgType,
List msgList)
prints the messages from message list
|
boolean |
printFrameworkLevelMessages(PrintWriter out,
JBIManagementMessage.FrameworkTaskResult fwTaskResult)
prints the messages
|
boolean |
printInstanceLevelMessages(PrintWriter out,
JBIManagementMessage.InstanceTaskResult instResult)
prints the messages
|
boolean |
printInstanceLevelMessages(PrintWriter out,
JBIManagementMessage.InstanceTaskResult instResult,
boolean printInstanceName)
prints the messages
|
boolean |
printJbiTaskResultMessages(PrintWriter out,
JBIManagementMessage.JBITaskResult jbiTaskResult)
prints the messages
|
protected void |
printMainMessage(PrintWriter out,
int formatType,
String msgType,
String msgCode,
String msg)
prints message to the output
|
boolean |
printTaskResultMessages(PrintWriter out,
int formatType,
JBIManagementMessage.TaskResultInfo taskResultInfo)
prints the messages
|
boolean |
printTaskResultMessages(PrintWriter out,
JBIManagementMessage.TaskResultInfo taskResultInfo)
prints the messages
|
void |
sortComponentTaskResultList(List compTaskResultList)
sort the list
|
void |
sortInstanceResultList(List instResultList)
sort the list
|
JBIManagementMessage.ESBTaskResult |
toESBTaskResult(JBIManagementMessage jbiMsg) |
void |
updateInstanceMap(Map instMap,
JBIManagementMessage.ComponentTaskResult compResult,
Map msgMap,
Map expMap) |
void |
updateInstanceMap(Map instMap,
JBIManagementMessage.FrameworkTaskResult fwTaskResult,
Map fwInstMsgMap,
Map fwInstExpMap) |
public static final int TOP_MSG_FORMAT
public static final int CAS_MSG_FORMAT
public static final int INST_MSG_FORMAT
public static final int COMP_MSG_FORMAT
public static final String FAILED
public static final String SUCCESS
public static final String INFO
public static final String WARNING
public static final String ERROR
public static final String EXCEPTION
public static final String UNKNOWN
public static final String INSTANCE_MARKER_ID
public static final String APP_VAR_MARKER_ID
public static final String CAS_KEY
public static final String OUT_NORMAL
public static final String OUT_VERBOSE
public static final String OUT_DEBUG
public ESBResultFormatter()
public ESBResultFormatter(String outLevel)
public static I18NBundle getI18NBundle()
protected String getL10NMessage(String code, String msg)
code - message codemsg - messageprotected String getL10NMessageForAppVar(String appVarName)
appVarName - protected String getL10NExptionMessage(String code, String msg)
code - message codemsg - messageprotected String getL10NExptionMessageForAppVar(String appVarName)
appVarName - protected String getL10N2ndExptionMessageForAppVar(String appVarName)
appVarName - protected String getL10NMessageType(String msgType)
msgType - message typeprotected String getL10NMainMessage(String msgType, String code, String msg)
msgType - message typecode - message codemsg - messageprotected String getL10NMainMessageForAppVar(String msgType, String appVarName)
msgType - message typeappVarName - messageprotected String getMainMessageI18NKey(int formatType)
formatType - format typeprotected String get2ndMessageI18NKey(int formatType)
formatType - format typeprotected String getExceptionMsgI18NKey(int formatType)
formatType - format typeprotected String get2ndExceptionMsgI18NKey(int formatType)
formatType - format typeprotected void printMainMessage(PrintWriter out, int formatType, String msgType, String msgCode, String msg)
out - print writer to print the messageformatType - format typemsgType - message typemsgCode - message codemsg - messageprotected void print2ndMessage(PrintWriter out, int formatType, String msgCode, String msg)
out - print writer to print the messageformatType - format typemsgCode - message codemsg - messageprotected void printExceptionMessage(PrintWriter out, int formatType, String msgCode, String msg)
out - print writer to print the messageformatType - format typemsgCode - message codemsg - messageprotected void print2ndExceptionMessage(PrintWriter out, int formatType, String msgCode, String msg)
out - print writer to print the messageformatType - format typemsgCode - message codemsg - messageprotected boolean printFormattedStatusMessages(PrintWriter out, int formatType, String msgType, List msgList)
out - print writer to print the messageformatType - format typemsgType - message typemsgList - list of TaskStatusMsgType objectsprotected boolean printFormattedExceptionMessages(PrintWriter out, int formatType, String msgType, List expList, boolean printMainMsg)
out - print writer to print the messageformatType - format typemsgType - message typeexpList - list of ExceptionInfoType objectsprintMainMsg - true prints the first message as main message formatprotected boolean printAllFormattedMessages(PrintWriter out, int formatType, String msgType, List msgList, List expList, boolean startWithNewLine)
out - print writer to print the messageformatType - format typemsgType - message typemsgList - list of TaskStatusMsgType objectsexpList - list of ExceptionInfoType objectsstartWithNewLine - true prints the first message in new linepublic boolean printTaskResultMessages(PrintWriter out, int formatType, JBIManagementMessage.TaskResultInfo taskResultInfo)
out - print writer to print the messageformatType - format typetaskResultDetailsType - TaskResultDetailsType objectpublic boolean printTaskResultMessages(PrintWriter out, JBIManagementMessage.TaskResultInfo taskResultInfo)
taskResultDetailsType - TaskResultDetailsType objectout - print writer to print the messagepublic boolean printFrameworkLevelMessages(PrintWriter out, JBIManagementMessage.FrameworkTaskResult fwTaskResult)
fwTaskResultType - frmwkTaskResultType objectout - print writer to print the messagepublic boolean printComponentLevelMessages(PrintWriter out, JBIManagementMessage.ComponentTaskResult compTaskResult)
compTaskResultType - ComponentTaskResultType objectout - print writer to print the messagepublic void sortComponentTaskResultList(List compTaskResultList)
compTaskResultList - list.public boolean printJbiTaskResultMessages(PrintWriter out, JBIManagementMessage.JBITaskResult jbiTaskResult)
jbiTaskResultType - JbiTaskResultType objectout - print writer to print the messagepublic boolean printInstanceLevelMessages(PrintWriter out, JBIManagementMessage.InstanceTaskResult instResult, boolean printInstanceName)
instResultDetailType - InstanceResultDetailType objectprintInstanceName - true prints the instance name, false prints no instance name.out - print writer to print the messagepublic boolean printInstanceLevelMessages(PrintWriter out, JBIManagementMessage.InstanceTaskResult instResult)
instResultDetailType - InstanceResultDetailType objectout - print writer to print the messagepublic void sortInstanceResultList(List instResultList)
instResultList - list.public boolean printESBTaskResult(PrintWriter out, JBIManagementMessage.ESBTaskResult esbResult)
esbResultType - EsbTaskResultType objectout - print writer to print the messagepublic JBIManagementMessage.TaskResultInfo createTaskResultInfo(JBIManagementMessage.TaskResultInfo taskResultInfo, List msgList, List expList)
public void updateInstanceMap(Map instMap, JBIManagementMessage.FrameworkTaskResult fwTaskResult, Map fwInstMsgMap, Map fwInstExpMap)
public void updateInstanceMap(Map instMap, JBIManagementMessage.ComponentTaskResult compResult, Map msgMap, Map expMap)
public JBIManagementMessage.ESBTaskResult toESBTaskResult(JBIManagementMessage jbiMsg)
public String getFormattedResult(JBIManagementMessage.ESBTaskResult esbResult)
esbResult - esb results objectpublic String getFormattedESBResult(JBIManagementMessage jbiMsg)
jbiMgmtMsgXml - string contains the xml confirms to the JbiManagementMessage schemapublic String getFormattedESBResult(String jbiMgmtMsgXml)
jbiMgmtMsgXml - string contains the xml confirms to the JbiManagementMessage schemaCopyright © 2011-2016 OpenESB Community. All Rights Reserved.