|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.services.clientserver.messages.SystemMessage
public class SystemMessage
SystemMessage is used to supply detailed status when an error or other significant event occurs that should be presented to the user or logged. It is structured to capture information from a variety of remote systems.
Field Summary | |
---|---|
static char |
COMPLETION
Completion message indicator |
static char |
ERROR
Error message indicator |
static char |
INFORMATION
Information message indicator |
static char |
INQUIRY
Inquiry message indicator |
protected static String |
NESTING_INDENT
|
static char |
UNEXPECTED
Unexpected message indicator (same as warning but will log exception & stack in message log) |
static char |
WARNING
Warning message indicator |
Constructor Summary | |
---|---|
SystemMessage(String comp,
String sub,
String number,
char ind,
String l1,
String l2)
SystemMesssage constructor Throws: IndicatorException: the indicator specified is not a valid indicator |
Method Summary | |
---|---|
String |
getFullMessageID()
Use this method to retrieve the full message ID: Component + SubComponent + Number + indicator |
char |
getIndicator()
Use this method to get the message type indicator. |
String |
getLevelOneText()
Use this method to retrieve level one text |
String |
getLevelTwoText()
Use this method to retrieve level two text |
String |
getMessageNumber()
|
int |
getNumSubstitutionVariables()
Use this method to retrieve the unique number of substitution variables in this message (this would include level 1 and 2 text |
String |
getSubValue(Object sub)
used to determine the string value of the object it calls toString for all object types except for Exceptions where the stack is also rendered |
Object[] |
getSubVariables()
retrieves an array of substitution variables |
SystemMessage |
makeSubstitution(Object sub1)
Use this method to set substitution value %1. |
SystemMessage |
makeSubstitution(Object[] subsList)
Use this method to set substitution values Generally toString() is used on the substitution objects, but there is special case handling for exception objects and IStatus objects. |
SystemMessage |
makeSubstitution(Object sub1,
Object sub2)
Use this method to set substitution value %1 %2 Generally toString() is used on the substitution objects, but there is special case handling for exception objects and IStatus objects. |
SystemMessage |
makeSubstitution(Object sub1,
Object sub2,
Object sub3)
Use this method to set substitution value %1 %2 %3 Generally toString() is used on the substitution objects, but there is special case handling for exception objects and IStatus objects. |
SystemMessage |
makeSubstitution(Object sub1,
Object sub2,
Object sub3,
Object sub4)
Use this method to set substitution value %1 %2 %3 %4 Generally toString() is used on the substitution objects, but there is special case handling for exception objects and IStatus objects. |
void |
setIndicator(char ind)
Use this method to override the default indicator of the message |
void |
setPrefixChar(char prefixChar)
|
static String |
sub(String target,
String subOld,
String subNew)
Replace a string with another string throughout a target string. |
String |
toString()
Convert this message to a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final char COMPLETION
public static final char INQUIRY
public static final char INFORMATION
public static final char ERROR
public static final char WARNING
public static final char UNEXPECTED
protected static final String NESTING_INDENT
Constructor Detail |
---|
public SystemMessage(String comp, String sub, String number, char ind, String l1, String l2)
Throws:
comp
- Component code. Usually a 3 letter component code like "RSE".sub
- Subcomponent code. Usually a 1 letter subcomponent such as "F" for filesind
- Message type indicator. See constants for values.number
- a string that gives the 4 digit message numberl1
- Level 1 text that describes the errorl2
- Level 2 text that describes any recovery actions or further detailsMethod Detail |
---|
public void setIndicator(char ind) throws IndicatorException
ind
- the new indicator. See constants for values.
IndicatorException
- if the indicator is not validpublic char getIndicator()
INQUIRY
for a question message.
COMPLETION
for a completion message.
INFORMATION
for an informational message.
ERROR
for an error message.
WARNING
for a warning message.
UNEXPECTED
for an unexpected-situation-encountered message.
public String getMessageNumber()
public int getNumSubstitutionVariables()
public String getLevelOneText()
public String getLevelTwoText()
public String getFullMessageID()
public SystemMessage makeSubstitution(Object sub1)
sub1
- the substitution object for the first value.
public SystemMessage makeSubstitution(Object sub1, Object sub2)
sub1
- the substitution object for the first value.sub2
- the substitution object for the second value.
public SystemMessage makeSubstitution(Object sub1, Object sub2, Object sub3)
sub1
- the substitution object for the first value.sub2
- the substitution object for the second value.sub3
- the substitution object for the third value.
public SystemMessage makeSubstitution(Object sub1, Object sub2, Object sub3, Object sub4)
sub1
- the substitution object for the first value.sub2
- the substitution object for the second value.sub3
- the substitution object for the third value.sub4
- the substitution object for the fourth value.
public SystemMessage makeSubstitution(Object[] subsList)
subsList
- the array of substitution objects
public Object[] getSubVariables()
public void setPrefixChar(char prefixChar)
public static String sub(String target, String subOld, String subNew)
target
- - string containing substring to be substituted.subOld
- - substitution variable. Eg "%1"subNew
- - substitution data. Eg "001"
public String toString()
toString
in class Object
public String getSubValue(Object sub)
sub
- the substitution object
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |