Oracle Data-aware Controls Reference

oracle.dacf.util.errormanager
Interface ErrorLogger

All Known Implementing Classes:
ErrorLoggerAdapter

public interface ErrorLogger

The ErrorLogger interface implements the base methods for an ErrorLogger implementation. There are two types of loggers:

Buffered loggers keep the errors in some type of storage. ErrorListeners use these stored errors to make their decisions whether to recover or ignore an error situation.

Non-buffered loggers do not store errors. Instead, they format errors and dump them to devices such as a printer, an output window, log files, and so on.


Method Summary
 void addError(ErrorMessage emsg)
          Adds an error to the logging facility.
 ErrorMessage[] findAllErrors()
          Finds all errors associated with this source.
 ErrorMessage[] findErrors(ErrorSeverity severity, ErrorType type)
          Finds all errors of the specified severity and type, and returns an array of error messages.
 ErrorMessage[] findErrors(java.lang.Object source)
          Finds all errors related to this source.
 java.lang.String getName()
          Returns the name of the ErrorLogger.
 boolean isBuffered()
          Determines whether this logger is a buffered logger.
 void removeAllErrors()
          Removes all errors associated with this source from the logging facility.
 void removeError(ErrorMessage emsg)
          Removes an error from the logging facility.
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the ErrorLogger.

Loggers are registered in the ErrorManager by name. If this name is already registered, registration will fail and the ErrorManager will throw a NameAlreadyRegisteredException.

Returns:
the name of the ErrorLogger.

addError

public void addError(ErrorMessage emsg)
Adds an error to the logging facility.

Parameters:
emsg - the error message.

removeError

public void removeError(ErrorMessage emsg)
Removes an error from the logging facility. This method applies only to buffered loggers. For non-buffered loggers, extend the ErrorLoggerAdapter class.

Parameters:
emsg - the error message.
See Also:
ErrorLoggerAdapter

findErrors

public ErrorMessage[] findErrors(java.lang.Object source)
Finds all errors related to this source. This method applies only to buffered loggers. For non-buffered loggers, extend the ErrorLoggerAdapter class.

Parameters:
source - the source object.
Returns:
an array of error messages.
See Also:
ErrorLoggerAdapter

findErrors

public ErrorMessage[] findErrors(ErrorSeverity severity,
                                 ErrorType type)
Finds all errors of the specified severity and type, and returns an array of error messages. When requesting an error of severity ErrorSeverity.ALL_SEVERITIES or of type ErrorType.ALL_TYPES, this method should not use severity or type as a search restriction. This method applies only to buffered loggers. For non-buffered loggers, extend the ErrorLoggerAdapter class.

Parameters:
severity - the error severity.
type - the error type.
Returns:
an array of error messages.
See Also:
ErrorLoggerAdapter

findAllErrors

public ErrorMessage[] findAllErrors()
Finds all errors associated with this source. This method applies only to buffered loggers. For non-buffered loggers, extend the ErrorLoggerAdapter class.

Returns:
an array of error messages
See Also:
ErrorLoggerAdapter

removeAllErrors

public void removeAllErrors()
Removes all errors associated with this source from the logging facility. This method applies only to buffered loggers. For non-buffered loggers, extend the ErrorLoggerAdapter class.

See Also:
ErrorLoggerAdapter

isBuffered

public boolean isBuffered()
Determines whether this logger is a buffered logger.

Returns:
true if this is a buffered logger; false otherwise.

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.