|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwxtutils.reporter
Reporter is used as a stack. Messages are pushed and popped This facilitates a strategy that prepares for detailed reporting and removing of details if everything goes ok Reporter also holds general utilities: getMergedStrings which operates as sentences with 1 or 2 insertion points %1 and %2 respectively. Strings are fetched from resources if necessary. No string constants are administrated outside this class.
Constructor Summary | |
reporter()
Creates a new instance of reporter |
Method Summary | |
void |
clearLogFile()
Clear the currently selected logfile |
void |
clearMessages()
Clear all message |
static void |
displaySystemProps()
Nice to have during debugging |
static java.lang.String |
getBundleString(java.lang.String S)
Gets a string from a resource bundle: wxtgui/guiStrings |
static java.lang.String |
getBundleString(java.lang.String S,
java.lang.String t1)
Gets a string from a resource bundle: wxtgui/guiStrings combined with a parameter at %1 |
static java.lang.String |
getBundleString(java.lang.String S,
java.lang.String t1,
java.lang.String t2)
Gets a string from a resource bundle: wxtgui/guiStrings combined with a parameter at %1 and one at %2 |
long |
getLogFileMaxlength()
Get the max length of the logfile |
java.net.URI |
getLogFileUri()
Get the logfilepath |
java.lang.String |
getReport(java.lang.String scriptpath)
Retrieves the total report as the stack is at the moment Adds this report to the actual file-log, if turned on |
int |
getStackSize()
Get stacksize |
void |
markStack()
Sets the popmark |
java.lang.String |
popMessage()
Removes the top of the stack. |
void |
pushMessage(java.lang.String m)
Push a message from resourcebundle to the stack |
void |
pushMessage(java.lang.String m,
java.lang.String t1)
Push message from resourcebundle and compose with 1 insertion |
void |
pushMessage(java.lang.String m,
java.lang.String t1,
java.lang.String t2)
Push message from resourcebundle and compose with 2 insertions |
void |
pushSimpleMessage(java.lang.String m)
Push a simple, non constructed message to the stack |
static void |
setLocale(java.lang.String lang)
set locale |
void |
setLogFileMaxlength(long m)
Set the max length of the logfile |
void |
setLogFileURI(java.net.URI theUri)
Set the logfilepath |
void |
writeLogFile(java.lang.String text,
java.lang.String scriptpath)
Append a new report to the currently selected logfile |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public reporter()
Method Detail |
public static void setLocale(java.lang.String lang)
lang
- String defining the localepublic java.net.URI getLogFileUri()
public void setLogFileURI(java.net.URI theUri)
theUri
- the new URI for the logfilepublic long getLogFileMaxlength()
public void setLogFileMaxlength(long m)
m
- the new max length of the logfilepublic void markStack()
public int getStackSize()
public void clearMessages()
public void pushSimpleMessage(java.lang.String m)
m
- The messagepublic void pushMessage(java.lang.String m)
m
- The string used as key in the resourcebundle. If m is no key, m is pushedpublic void pushMessage(java.lang.String m, java.lang.String t1)
m
- The string used as key. If m is no key, m is pushedt1
- The string used as %1 parameterpublic void pushMessage(java.lang.String m, java.lang.String t1, java.lang.String t2)
m
- The string used as key. If m is no key, m is pushedt1
- The string used as %1 parametert2
- The second string, used as %2 parameterpublic java.lang.String popMessage()
public void clearLogFile()
public void writeLogFile(java.lang.String text, java.lang.String scriptpath)
text
- the report to appendscriptpath
- the path to the active script generating the reportpublic java.lang.String getReport(java.lang.String scriptpath)
scriptpath
- The path to the acive script
public static java.lang.String getBundleString(java.lang.String S)
S
- The key
public static java.lang.String getBundleString(java.lang.String S, java.lang.String t1)
S
- The keyt1
- The string that will be inserted for %1 in the string found
public static java.lang.String getBundleString(java.lang.String S, java.lang.String t1, java.lang.String t2)
S
- The keyt1
- The string that will be inserted for %1 in the string foundt2
- The string that will be inserted for %2 in the string found
public static void displaySystemProps()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |