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.modeshape.common.collection
Class AbstractProblems

    java.lang.Object
      org.modeshape.common.collection.AbstractProblems

All Implemented Interfaces:
  Serializable, Iterable<Problem>, Problems

Direct Known Subclasses:
  SimpleProblems, ThreadSafeProblems

    public abstract class AbstractProblems

extends Object
implements Problems

A list of problems for some execution context. The problems will be `returned` in the order in which they were encountered (although this cannot be guaranteed in contexts involving multiple threads or processes).

See Also:
  Serialized Form

Field Summary
`protected static List<Problem>` | `EMPTY_PROBLEMS`

Constructor Summary
`AbstractProblems()`

Method Summary
`void` | `addError(I18n message, Object... params)` Add an error message with the parameters that should be used when localizing the message.
`void` | `addError(int code, I18n message, Object... params)` Add an error message with the parameters that should be used when localizing the message.
`void` | `addError(int code, String resource, String location, I18n message, Object... params)` Add an error message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addError(String resource, String location, I18n message, Object... params)` Add an error message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addError(Throwable throwable, I18n message, Object... params)` Add an error exception and message with the parameters that should be used when localizing the message.
`void` | `addError(Throwable throwable, int code, I18n message, Object... params)` Add an error exception and message with the parameters that should be used when localizing the message.
`void` | `addError(Throwable throwable, int code, String resource, String location, I18n message, Object... params)` Add an error exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addError(Throwable throwable, String resource, String location, I18n message, Object... params)` Add an error exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addInfo(I18n message, Object... params)` Add a informational message with the parameters that should be used when localizing the message.
`void` | `addInfo(int code, I18n message, Object... params)` Add a informational message with the parameters that should be used when localizing the message.
`void` | `addInfo(int code, String resource, String location, I18n message, Object... params)` Add an informational message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addInfo(String resource, String location, I18n message, Object... params)` Add an informational message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addInfo(Throwable throwable, I18n message, Object... params)` Add an informational exception and message with the parameters that should be used when localizing the message.
`void` | `addInfo(Throwable throwable, int code, I18n message, Object... params)` Add a informational exception and message with the parameters that should be used when localizing the message.
`void` | `addInfo(Throwable throwable, int code, String resource, String location, I18n message, Object... params)` Add an informational exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addInfo(Throwable throwable, String resource, String location, I18n message, Object... params)` Add an informational exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`protected abstract void` | `addProblem(Problem problem)`
`void` | `addWarning(I18n message, Object... params)` Add a warning message with the parameters that should be used when localizing the message.
`void` | `addWarning(int code, I18n message, Object... params)` Add a warning message with the parameters that should be used when localizing the message.
`void` | `addWarning(int code, String resource, String location, I18n message, Object... params)` Add a warning message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addWarning(String resource, String location, I18n message, Object... params)` Add a warning message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addWarning(Throwable throwable, I18n message, Object... params)` Add a warning exception and message with the parameters that should be used when localizing the message.
`void` | `addWarning(Throwable throwable, int code, I18n message, Object... params)` Add a warning exception and message with the parameters that should be used when localizing the message.
`void` | `addWarning(Throwable throwable, int code, String resource, String location, I18n message, Object... params)` Add a warning exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`void` | `addWarning(Throwable throwable, String resource, String location, I18n message, Object... params)` Add a warning exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message
`protected abstract List<Problem>` | `getProblems()`
`boolean` | `hasErrors()` Determine if there is at least one error in this collection.
`boolean` | `hasInfo()` Determine if there is at least one informational problem in this collection.
`boolean` | `hasProblems()` Determine if there are problems in this collection.
`boolean` | `hasWarnings()` Determine if there is at least one warning in this collection.
`boolean` | `isEmpty()` Determine if this collection is empty.
`Iterator<Problem>` | `iterator()`
`protected Logger.Level` | `logLevelFor(Problem.Status status)`
`int` | `size()` Get the number of problems that are in this collection
`String` | `toString()`
`void` | `writeTo(Logger logger)` Write the problems to the supplied logger.
`void` | `writeTo(Logger logger, Problem.Status firstStatus, Problem.Status... additionalStatuses)` Write the problems to the supplied logger.

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

Methods inherited from interface org.modeshape.common.collection.Problems
`addAll`

Field Detail

### EMPTY_PROBLEMS

    protected static final List<Problem> EMPTY_PROBLEMS

Constructor Detail

### AbstractProblems

    public AbstractProblems()

Method Detail

### addError

    public void addError(I18n message,
                         Object... params)

  Description copied from interface: `Problems`
  Add an error message with the parameters that should be used when localizing the message.

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addError

    public void addError(Throwable throwable,
                         I18n message,
                         Object... params)

  Description copied from interface: `Problems`
  Add an error exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the error; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addError

    public void addError(String resource,
                         String location,
                         I18n message,
                         Object... params)

  Description copied from interface: `Problems`
  Add an error message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addError

    public void addError(Throwable throwable,
                         String resource,
                         String location,
                         I18n message,
                         Object... params)

  Description copied from interface: `Problems`
  Add an error exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the error; may be null
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addError

    public void addError(int code,
                         I18n message,
                         Object... params)

  Description copied from interface: `Problems`
  Add an error message with the parameters that should be used when localizing the message.

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `code` - the error code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addError

    public void addError(Throwable throwable,
                         int code,
                         I18n message,
                         Object... params)

  Description copied from interface: `Problems`
  Add an error exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the error; may be null
    `code` - the error code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addError

    public void addError(int code,
                         String resource,
                         String location,
                         I18n message,
                         Object... params)

  Description copied from interface: `Problems`
  Add an error message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `code` - the error code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addError

    public void addError(Throwable throwable,
                         int code,
                         String resource,
                         String location,
                         I18n message,
                         Object... params)

  Description copied from interface: `Problems`
  Add an error exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addError` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the error; may be null
    `code` - the error code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addWarning

    public void addWarning(I18n message,
                           Object... params)

  Description copied from interface: `Problems`
  Add a warning message with the parameters that should be used when localizing the message.

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addWarning

    public void addWarning(Throwable throwable,
                           I18n message,
                           Object... params)

  Description copied from interface: `Problems`
  Add a warning exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the error; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addWarning

    public void addWarning(String resource,
                           String location,
                           I18n message,
                           Object... params)

  Description copied from interface: `Problems`
  Add a warning message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addWarning

    public void addWarning(Throwable throwable,
                           String resource,
                           String location,
                           I18n message,
                           Object... params)

  Description copied from interface: `Problems`
  Add a warning exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the warning; may be null
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addWarning

    public void addWarning(int code,
                           I18n message,
                           Object... params)

  Description copied from interface: `Problems`
  Add a warning message with the parameters that should be used when localizing the message.

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `code` - the problem code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addWarning

    public void addWarning(Throwable throwable,
                           int code,
                           I18n message,
                           Object... params)

  Description copied from interface: `Problems`
  Add a warning exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the warning; may be null
    `code` - the problem code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addWarning

    public void addWarning(int code,
                           String resource,
                           String location,
                           I18n message,
                           Object... params)

  Description copied from interface: `Problems`
  Add a warning message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `code` - the problem code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addWarning

    public void addWarning(Throwable throwable,
                           int code,
                           String resource,
                           String location,
                           I18n message,
                           Object... params)

  Description copied from interface: `Problems`
  Add a warning exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addWarning` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the warning; may be null
    `code` - the problem code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addInfo

    public void addInfo(I18n message,
                        Object... params)

  Description copied from interface: `Problems`
  Add a informational message with the parameters that should be used when localizing the message.

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addInfo

    public void addInfo(Throwable throwable,
                        I18n message,
                        Object... params)

  Description copied from interface: `Problems`
  Add an informational exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the warning; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addInfo

    public void addInfo(String resource,
                        String location,
                        I18n message,
                        Object... params)

  Description copied from interface: `Problems`
  Add an informational message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addInfo

    public void addInfo(Throwable throwable,
                        String resource,
                        String location,
                        I18n message,
                        Object... params)

  Description copied from interface: `Problems`
  Add an informational exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the problem; may be null
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addInfo

    public void addInfo(int code,
                        I18n message,
                        Object... params)

  Description copied from interface: `Problems`
  Add a informational message with the parameters that should be used when localizing the message.

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `code` - the problem code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addInfo

    public void addInfo(Throwable throwable,
                        int code,
                        I18n message,
                        Object... params)

  Description copied from interface: `Problems`
  Add a informational exception and message with the parameters that should be used when localizing the message.

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the warning; may be null
    `code` - the problem code
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addInfo

    public void addInfo(int code,
                        String resource,
                        String location,
                        I18n message,
                        Object... params)

  Description copied from interface: `Problems`
  Add an informational message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `code` - the problem code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### addInfo

    public void addInfo(Throwable throwable,
                        int code,
                        String resource,
                        String location,
                        I18n message,
                        Object... params)

  Description copied from interface: `Problems`
  Add an informational exception and message with a description of the resource, its location, and the parameters that should be used when localizing the message

  Specified by:
    `addInfo` in interface `Problems`
  Parameters:
    `throwable` - the exception that represents the problem; may be null
    `code` - the problem code
    `resource` - the description of the resource; may be null
    `location` - the location of the resource; may be null
    `message` - the internationalized message describing the problem
    `params` - the values for the parameters in the message

### hasProblems

    public boolean hasProblems()

  Description copied from interface: `Problems`
  Determine if there are problems in this collection.

  Specified by:
    `hasProblems` in interface `Problems`
  Returns:
    true if there is at least one problem, or false if it is empty
  See Also:
    `Problems.isEmpty()`, `Problems.size()`

### hasErrors

    public boolean hasErrors()

  Description copied from interface: `Problems`
  Determine if there is at least one error in this collection.

  Specified by:
    `hasErrors` in interface `Problems`
  Returns:
    true if there is at least one error in this collection, or false if there are no errors

### hasWarnings

    public boolean hasWarnings()

  Description copied from interface: `Problems`
  Determine if there is at least one warning in this collection.

  Specified by:
    `hasWarnings` in interface `Problems`
  Returns:
    true if there is at least one warning in this collection, or false if there are no warnings

### hasInfo

    public boolean hasInfo()

  Description copied from interface: `Problems`
  Determine if there is at least one informational problem in this collection.

  Specified by:
    `hasInfo` in interface `Problems`
  Returns:
    true if there is at least one informational problem in this collection, or false if there are no informational problems

### isEmpty

    public boolean isEmpty()

  Description copied from interface: `Problems`
  Determine if this collection is empty.

  Specified by:
    `isEmpty` in interface `Problems`
  Returns:
    true if the there are no problems, or false if there is at least one
  See Also:
    `Problems.hasProblems()`, `Problems.size()`

### size

    public int size()

  Description copied from interface: `Problems`
  Get the number of problems that are in this collection

  Specified by:
    `size` in interface `Problems`
  Returns:
    the number of problems; never negative
  See Also:
    `Problems.hasProblems()`, `Problems.isEmpty()`

### iterator

    public Iterator<Problem> iterator()

  Specified by:
    `iterator` in interface `Iterable<Problem>`
  Specified by:
    `iterator` in interface `Problems`
  See Also:
    `Problems.iterator()`

### addProblem

    protected abstract void addProblem(Problem problem)

### getProblems

    protected abstract List<Problem> getProblems()

### writeTo

    public void writeTo(Logger logger)

  Write the problems to the supplied logger.

  Specified by:
    `writeTo` in interface `Problems`
  Parameters:
    `logger` - the logger
  See Also:
    `Problems.writeTo(org.modeshape.common.util.Logger)`

### writeTo

    public void writeTo(Logger logger,
                        Problem.Status firstStatus,
                        Problem.Status... additionalStatuses)

  Write the problems to the supplied logger.

  Specified by:
    `writeTo` in interface `Problems`
  Parameters:
    `logger` - the logger
    `firstStatus` - the first status to be logged
    `additionalStatuses` - the additional statuses to be logged
  See Also:
    `Problems.writeTo(org.modeshape.common.util.Logger, org.modeshape.common.collection.Problem.Status,org.modeshape.common.collection.Problem.Status[])`

### logLevelFor

    protected final Logger.Level logLevelFor(Problem.Status status)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`
  See Also:
    `Object.toString()`

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 © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.