public interface Problems extends Iterable<Problem>, Serializable
Problem objects, with multiple overloaded methods for adding errors, warnings, and
informational messages.| Modifier and Type | Method and Description |
|---|---|
void |
addAll(Iterable<Problem> problems)
Add all of the problems in the supplied list.
|
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
|
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
|
void |
apply(Consumer<Problem> consumer)
Apply the consumer to each of the problems.
|
void |
apply(EnumSet<Problem.Status> statuses,
Consumer<Problem> consumer)
Apply the consumer to each of the problems with the supplied status.
|
void |
apply(Problem.Status status,
Consumer<Problem> consumer)
Apply the consumer to each of the problems with the supplied status.
|
int |
errorCount()
Determine the number of errors within these results.
|
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.
|
int |
infoCount()
Determine the number of information messages within these results.
|
boolean |
isEmpty()
Determine if this collection is empty.
|
Iterator<Problem> |
iterator() |
int |
problemCount()
Determine the number of problems (that is, errors and warnings) within these results.
|
int |
size()
Get the number of problems that are in this collection
|
int |
warningCount()
Determine the number of warnings within these results.
|
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.
|
void addError(I18n message, Object... params)
message - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addError(Throwable throwable, I18n message, Object... params)
throwable - the exception that represents the error; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addError(String resource, String location, I18n message, Object... params)
resource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addError(Throwable throwable, String resource, String location, I18n message, Object... params)
throwable - the exception that represents the error; may be nullresource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addError(int code,
I18n message,
Object... params)
code - the error codemessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addError(Throwable throwable, int code, I18n message, Object... params)
throwable - the exception that represents the error; may be nullcode - the error codemessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addError(int code,
String resource,
String location,
I18n message,
Object... params)
code - the error coderesource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addError(Throwable throwable, int code, String resource, String location, I18n message, Object... params)
throwable - the exception that represents the error; may be nullcode - the error coderesource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addWarning(I18n message, Object... params)
message - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addWarning(Throwable throwable, I18n message, Object... params)
throwable - the exception that represents the error; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addWarning(String resource, String location, I18n message, Object... params)
resource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addWarning(Throwable throwable, String resource, String location, I18n message, Object... params)
throwable - the exception that represents the warning; may be nullresource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addWarning(int code,
I18n message,
Object... params)
code - the problem codemessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addWarning(Throwable throwable, int code, I18n message, Object... params)
throwable - the exception that represents the warning; may be nullcode - the problem codemessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addWarning(int code,
String resource,
String location,
I18n message,
Object... params)
code - the problem coderesource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addWarning(Throwable throwable, int code, String resource, String location, I18n message, Object... params)
throwable - the exception that represents the warning; may be nullcode - the problem coderesource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addInfo(I18n message, Object... params)
message - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addInfo(Throwable throwable, I18n message, Object... params)
throwable - the exception that represents the warning; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addInfo(String resource, String location, I18n message, Object... params)
resource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addInfo(Throwable throwable, String resource, String location, I18n message, Object... params)
throwable - the exception that represents the problem; may be nullresource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addInfo(int code,
I18n message,
Object... params)
code - the problem codemessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addInfo(Throwable throwable, int code, I18n message, Object... params)
throwable - the exception that represents the warning; may be nullcode - the problem codemessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addInfo(int code,
String resource,
String location,
I18n message,
Object... params)
code - the problem coderesource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addInfo(Throwable throwable, int code, String resource, String location, I18n message, Object... params)
throwable - the exception that represents the problem; may be nullcode - the problem coderesource - the description of the resource; may be nulllocation - the location of the resource; may be nullmessage - the internationalized message describing the problemparams - the values for the parameters in the messagevoid addAll(Iterable<Problem> problems)
problems - the problems to add to this list; this method does nothing if null or emptyint size()
hasProblems(),
isEmpty()boolean isEmpty()
hasProblems(),
size()boolean hasProblems()
boolean hasErrors()
boolean hasWarnings()
boolean hasInfo()
int errorCount()
int warningCount()
int infoCount()
int problemCount()
void apply(Consumer<Problem> consumer)
consumer - the consumer, which operates with side effectsvoid apply(Problem.Status status, Consumer<Problem> consumer)
status - the status of the problems to be consumedconsumer - the consumer, which operates with side effectsvoid apply(EnumSet<Problem.Status> statuses, Consumer<Problem> consumer)
statuses - the statuses of the problems to be consumedconsumer - the consumer, which operates with side effectsvoid writeTo(Logger logger)
logger - the loggervoid writeTo(Logger logger, Problem.Status firstStatus, Problem.Status... additionalStatuses)
logger - the loggerfirstStatus - the first status to be loggedadditionalStatuses - the additional statuses to be loggedCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.