com.sas.util.errorhandlers
Class StringDataErrorHandler

com.sas.util.errorhandlers.StringDataErrorHandler
All Implemented Interfaces:
ErrorHandlerInterface

public class StringDataErrorHandler
implements ErrorHandlerInterface

StringDataErrorHandler is an ErrorHandlerInterface implementation that sends the error message to a StringDataInterface object. This can be used to log errorMessages, send them to a status area, or send to anything else that implements the StringDataInterface.


Constructor Summary
StringDataErrorHandler()
          Default Constructor.
StringDataErrorHandler(com.sas.lang.StringDataInterface sData)
          Construct a StringDataErrorHandler with an initial StringDataInterface object.
 
Method Summary
 com.sas.lang.StringDataInterface getStringData()
          Get the StringDataInterface object to call setText on in handleError.
 void handleError(com.sas.ComponentInterface component, com.sas.text.Message message, java.lang.String messageCode)
          Set the "text" property of the StringDataInterface object with the given Message data.
 void setStringData(com.sas.lang.StringDataInterface sData)
          Set the StringDataInterface object to call setText on in handleError.
 

Constructor Detail

StringDataErrorHandler

public StringDataErrorHandler()
Default Constructor.


StringDataErrorHandler

public StringDataErrorHandler(com.sas.lang.StringDataInterface sData)
Construct a StringDataErrorHandler with an initial StringDataInterface object.

Parameters:
sData -
Method Detail

getStringData

public com.sas.lang.StringDataInterface getStringData()
Get the StringDataInterface object to call setText on in handleError.

Returns:
the StringDataInterface object to set the text of in handleError.

setStringData

public void setStringData(com.sas.lang.StringDataInterface sData)
Set the StringDataInterface object to call setText on in handleError.

Parameters:
sData - the StringDataInterface object to set the text of in handleError.

handleError

public void handleError(com.sas.ComponentInterface component,
                        com.sas.text.Message message,
                        java.lang.String messageCode)
Set the "text" property of the StringDataInterface object with the given Message data.

Specified by:
handleError in interface ErrorHandlerInterface
Parameters:
component - The component on which the error occured.
message - A Message object with formatted with the message to display. The object should also contain the necessary arguments for formatting the message.
messageCode - A non-translatable string which indicates the type of error that occured.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.