com.waveset.session
Class MsgTool
java.lang.Object
com.waveset.session.MsgTool
- public class MsgTool
- extends java.lang.Object
Utilities for the creation and maintenance of a custom
Waveset message file (WPMessages.properties).
Method Summary |
int |
extract(java.lang.String sKeyPattern)
Extracts any keys matching the indicated pattern
and append them to CustomMessages.properties
(in WSHOME/custom/msgcat) where they can be edited
(followed by a call to update()). |
static void |
main(java.lang.String[] args)
Utilities for the creation and maintenance of a custom
Waveset message file (WPMessages.properties). |
int |
update()
Updates the config/WPMessages.properties file from
the WPMessages.properties file in the idm.jar
appended with any CustomMessages.properties entries. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
code_id
public static final java.lang.String code_id
- See Also:
- Constant Field Values
sCustomMessages
public java.lang.String sCustomMessages
MsgTool
public MsgTool()
extract
public int extract(java.lang.String sKeyPattern)
throws java.io.IOException,
java.io.FileNotFoundException
- Extracts any keys matching the indicated pattern
and append them to CustomMessages.properties
(in WSHOME/custom/msgcat) where they can be edited
(followed by a call to update()).
Details:
Opens for append (or creates if necessary) the
CustomMessages.properties file.
Writes a header indicating how to use this tool.
Opens the idm.jar file and reads the WPMessages.properties
component.
Finds any keys which match the sKeyPattern argument
Any lines which match will be written to the CustomMessages file
- Returns:
- the number of keys that were found
- Throws:
java.io.IOException
java.io.FileNotFoundException
update
public int update()
throws java.io.IOException,
java.io.FileNotFoundException
- Updates the config/WPMessages.properties file from
the WPMessages.properties file in the idm.jar
appended with any CustomMessages.properties entries.
Details:
Opens (rewrites) the config/WPMessages.properties file.
Writes a header indicating this file should not be edited,
and gives instructions on how to use this tool.
Opens the idm.jar file and reads the WPMessages.properties
component.
Writes all lines from that file to config/WPMessages.properties
Writes a header message (a midder, actually :-) which indicates
the following section is custom messages.
Opens for reading the CustomMessages.properties file
Writes all lines from that file to config/WPMessages.properties
- Throws:
java.io.IOException
java.io.FileNotFoundException
main
public static void main(java.lang.String[] args)
- Utilities for the creation and maintenance of a custom
Waveset message file (WPMessages.properties).