Remote Systems
v6.4.1

com.ibm.etools.systems.core.messages
Class SystemMessageFile

java.lang.Object
  extended bycom.ibm.etools.systems.core.messages.SystemMessageFile
All Implemented Interfaces:
ErrorHandler
Direct Known Subclasses:
SystemUIMessageFile

public class SystemMessageFile
extends Object
implements ErrorHandler

Use this class to open, and parse, a RSE-style message file.


Field Summary
static String copyright
           
 
Constructor Summary
SystemMessageFile(String messageFileName, InputStream messageFile, InputStream dtdStream)
          Constructor
SystemMessageFile(String messageFileName, String defaultMessageFileLocation)
          Constructor
 
Method Summary
 void error(SAXParseException ex)
          XML Parser-required method: XML-parser Error.
 void fatalError(SAXParseException ex)
          XML Parser-required method: XML-parser Fatal error.
protected  com.ibm.etools.systems.core.messages.SystemMessageFile.MessageFileInfo getFromCache(String messageFileName)
          If the named message file has already been loaded return its MessageFileInfo
 SystemMessage getMessage(String msgId)
          Use this method to retrieve a message from the message file.
protected  SystemMessage loadSystemMessage(String componentAbbr, String subComponentAbbr, String msgNumber, char msgIndicator, String msgL1, String msgL2)
          Override this to provide different extended SystemMessage implementation
 boolean printHTML(String fullFileName)
          Use this method to generate html documentation for the messages in the message file.
 boolean scanForDuplicates()
          Use this method to scan message file for duplicate messages.
 void warning(SAXParseException ex)
          XML Parser-required method: XML-parser warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

SystemMessageFile

public SystemMessageFile(String messageFileName,
                         String defaultMessageFileLocation)
Constructor

Parameters:
messageFileName - - name of xml file which will contain the messages

SystemMessageFile

public SystemMessageFile(String messageFileName,
                         InputStream messageFile,
                         InputStream dtdStream)
Constructor

Parameters:
messageFileName - - name of xml file which will contain the messages
Method Detail

getFromCache

protected com.ibm.etools.systems.core.messages.SystemMessageFile.MessageFileInfo getFromCache(String messageFileName)
If the named message file has already been loaded return its MessageFileInfo

Parameters:
messageFileName -
Returns:

getMessage

public SystemMessage getMessage(String msgId)
Use this method to retrieve a message from the message file.

Parameters:
msgId - - the ID of the message to retrieve. This is the concatenation of the message's component abbreviation, subcomponent abbreviation, and message ID as declared in the message xml file.
Returns:
SystemMessage object

loadSystemMessage

protected SystemMessage loadSystemMessage(String componentAbbr,
                                          String subComponentAbbr,
                                          String msgNumber,
                                          char msgIndicator,
                                          String msgL1,
                                          String msgL2)
                                   throws IndicatorException
Override this to provide different extended SystemMessage implementation

Parameters:
componentAbbr -
subComponentAbbr -
msgNumber -
msgIndicator -
msgL1 -
msgL2 -
Returns:
Throws:
IndicatorException

scanForDuplicates

public boolean scanForDuplicates()
Use this method to scan message file for duplicate messages. You typically do this only during development!! If a duplicate is found, its message id is written to standard out, and to the systems.core log file.

Returns:
true if duplicates found.

printHTML

public boolean printHTML(String fullFileName)
Use this method to generate html documentation for the messages in the message file. This is useful for reference information, or to give to Level 2 for service support.

Returns:
true if it went well, false if it failed for some reason, such as given a bad file name. Errors written to standard out.

warning

public void warning(SAXParseException ex)
XML Parser-required method: XML-parser warning.

Specified by:
warning in interface ErrorHandler

error

public void error(SAXParseException ex)
XML Parser-required method: XML-parser Error.

Specified by:
error in interface ErrorHandler

fatalError

public void fatalError(SAXParseException ex)
                throws SAXException
XML Parser-required method: XML-parser Fatal error.

Specified by:
fatalError in interface ErrorHandler
Throws:
SAXException

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.