Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.archive.crawler.admin
Class CrawlJobErrorHandler

    java.lang.Object
      org.archive.crawler.admin.CrawlJobErrorHandler

All Implemented Interfaces:
  ValueErrorHandler

    public class CrawlJobErrorHandler

extends java.lang.Object
implements ValueErrorHandler

An implementation of the ValueErrorHandler for the UI.

The UI uses this class to trap errors in the settings of it's jobs and profiles and manage their presentation to the user.

Author:
  Kristinn Sigurdsson
See Also:
  `ValueErrorHandler`

Field Summary
`(package private) java.util.HashMap<java.lang.String,Constraint.FailedCheck>` | `errors` All encountered errors
`(package private) java.util.logging.Level` | `highestEncounteredLevel`
`(package private) java.util.logging.Level` | `level`

Constructor Summary
`CrawlJobErrorHandler()`
`CrawlJobErrorHandler(java.util.logging.Level level)`

Method Summary
`void` | `clearErrors()` Reset handler.
`Constraint.FailedCheck` | `getError(java.lang.String absoluteName)` Get error for a specific attribute.
`Constraint.FailedCheck` | `getError(java.lang.String absoluteName, java.util.logging.Level level)` Get error for a specific attribute
`java.util.List` | `getErrors()` Get an List of all the encountered errors.
`java.util.List` | `getErrors(java.util.logging.Level level)` Get an List of all the encountered errors.
`java.util.logging.Level` | `getLevel()`
`void` | `handleValueError(Constraint.FailedCheck error)`
`boolean` | `hasError()` Has there been an error with severity (level) equal to or higher then this handlers set level.
`boolean` | `hasError(java.util.logging.Level level)` Has there been an error with severity (level) equal to or higher then specified.
`void` | `setLevel(java.util.logging.Level level)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### errors

    java.util.HashMap<java.lang.String,Constraint.FailedCheck> errors

  All encountered errors

### level

    java.util.logging.Level level

### highestEncounteredLevel

    java.util.logging.Level highestEncounteredLevel

Constructor Detail

### CrawlJobErrorHandler

    public CrawlJobErrorHandler()

### CrawlJobErrorHandler

    public CrawlJobErrorHandler(java.util.logging.Level level)

Method Detail

### handleValueError

    public void handleValueError(Constraint.FailedCheck error)

  Specified by:
    `handleValueError` in interface `ValueErrorHandler`

### getError

    public Constraint.FailedCheck getError(java.lang.String absoluteName)

  Get error for a specific attribute.

  Uses currently set error level

  Parameters:
    `absoluteName` - The absolute name of the attribute
  Returns:
    error for a specific attribute at or above current error level. null if no matching error is found.

### getError

    public Constraint.FailedCheck getError(java.lang.String absoluteName,
                                           java.util.logging.Level level)

  Get error for a specific attribute

  Parameters:
    `absoluteName` - The absolute name of the attribute.
    `level` - Limit errors to those at this or higher level.
  Returns:
    error for a specific attribute at or above specified error level. null if no matching error is found.

### hasError

    public boolean hasError()

  Has there been an error with severity (level) equal to or higher then this handlers set level.

  Returns:
    has there ben an error.

### hasError

    public boolean hasError(java.util.logging.Level level)

  Has there been an error with severity (level) equal to or higher then specified.

  Parameters:
    `level` - The severity.
  Returns:
    has there ben an error.

### getLevel

    public java.util.logging.Level getLevel()

  Returns:
    Returns the level.

### setLevel

    public void setLevel(java.util.logging.Level level)

  Parameters:
    `level` - The level to set.

### clearErrors

    public void clearErrors()

  Reset handler.

  Delets all encountered errors of any level.

### getErrors

    public java.util.List getErrors()

  Get an List of all the encountered errors.

  The List contains a set of `FailedCheck` objects.

  Returns:
    an list of all encountered errors (with level equal to or higher then current level).
  See Also:
    `Constraint.FailedCheck`

### getErrors

    public java.util.List getErrors(java.util.logging.Level level)

  Get an List of all the encountered errors.

  The List contains a set of `FailedCheck` objects.

  Parameters:
    `level` - Get all errors of this level or higher
  Returns:
    an list of all encountered errors (with level equal to or higher then specified level).
  See Also:
    `Constraint.FailedCheck`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Internet Archive. All Rights Reserved.