|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.common.collection.AbstractProblems
public abstract class AbstractProblems
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).
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 |
---|
protected static final List<Problem> EMPTY_PROBLEMS
Constructor Detail |
---|
public AbstractProblems()
Method Detail |
---|
public void addError(I18n message, Object... params)
Problems
addError
in interface Problems
message
- the internationalized message describing the problemparams
- the values for the parameters in the messagepublic void addError(Throwable throwable, I18n message, Object... params)
Problems
addError
in interface Problems
throwable
- the exception that represents the error; may be nullmessage
- the internationalized message describing the problemparams
- the values for the parameters in the messagepublic void addError(String resource, String location, I18n message, Object... params)
Problems
addError
in interface Problems
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 messagepublic void addError(Throwable throwable, String resource, String location, I18n message, Object... params)
Problems
addError
in interface Problems
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 messagepublic void addError(int code, I18n message, Object... params)
Problems
addError
in interface Problems
code
- the error codemessage
- the internationalized message describing the problemparams
- the values for the parameters in the messagepublic void addError(Throwable throwable, int code, I18n message, Object... params)
Problems
addError
in interface Problems
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 messagepublic void addError(int code, String resource, String location, I18n message, Object... params)
Problems
addError
in interface Problems
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 messagepublic void addError(Throwable throwable, int code, String resource, String location, I18n message, Object... params)
Problems
addError
in interface Problems
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 messagepublic void addWarning(I18n message, Object... params)
Problems
addWarning
in interface Problems
message
- the internationalized message describing the problemparams
- the values for the parameters in the messagepublic void addWarning(Throwable throwable, I18n message, Object... params)
Problems
addWarning
in interface Problems
throwable
- the exception that represents the error; may be nullmessage
- the internationalized message describing the problemparams
- the values for the parameters in the messagepublic void addWarning(String resource, String location, I18n message, Object... params)
Problems
addWarning
in interface Problems
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 messagepublic void addWarning(Throwable throwable, String resource, String location, I18n message, Object... params)
Problems
addWarning
in interface Problems
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 messagepublic void addWarning(int code, I18n message, Object... params)
Problems
addWarning
in interface Problems
code
- the problem codemessage
- the internationalized message describing the problemparams
- the values for the parameters in the messagepublic void addWarning(Throwable throwable, int code, I18n message, Object... params)
Problems
addWarning
in interface Problems
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 messagepublic void addWarning(int code, String resource, String location, I18n message, Object... params)
Problems
addWarning
in interface Problems
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 messagepublic void addWarning(Throwable throwable, int code, String resource, String location, I18n message, Object... params)
Problems
addWarning
in interface Problems
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 messagepublic void addInfo(I18n message, Object... params)
Problems
addInfo
in interface Problems
message
- the internationalized message describing the problemparams
- the values for the parameters in the messagepublic void addInfo(Throwable throwable, I18n message, Object... params)
Problems
addInfo
in interface Problems
throwable
- the exception that represents the warning; may be nullmessage
- the internationalized message describing the problemparams
- the values for the parameters in the messagepublic void addInfo(String resource, String location, I18n message, Object... params)
Problems
addInfo
in interface Problems
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 messagepublic void addInfo(Throwable throwable, String resource, String location, I18n message, Object... params)
Problems
addInfo
in interface Problems
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 messagepublic void addInfo(int code, I18n message, Object... params)
Problems
addInfo
in interface Problems
code
- the problem codemessage
- the internationalized message describing the problemparams
- the values for the parameters in the messagepublic void addInfo(Throwable throwable, int code, I18n message, Object... params)
Problems
addInfo
in interface Problems
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 messagepublic void addInfo(int code, String resource, String location, I18n message, Object... params)
Problems
addInfo
in interface Problems
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 messagepublic void addInfo(Throwable throwable, int code, String resource, String location, I18n message, Object... params)
Problems
addInfo
in interface Problems
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 messagepublic boolean hasProblems()
Problems
hasProblems
in interface Problems
Problems.isEmpty()
,
Problems.size()
public boolean hasErrors()
Problems
hasErrors
in interface Problems
public boolean hasWarnings()
Problems
hasWarnings
in interface Problems
public boolean hasInfo()
Problems
hasInfo
in interface Problems
public boolean isEmpty()
Problems
isEmpty
in interface Problems
Problems.hasProblems()
,
Problems.size()
public int size()
Problems
size
in interface Problems
Problems.hasProblems()
,
Problems.isEmpty()
public Iterator<Problem> iterator()
iterator
in interface Iterable<Problem>
iterator
in interface Problems
Problems.iterator()
protected abstract void addProblem(Problem problem)
protected abstract List<Problem> getProblems()
public void writeTo(Logger logger)
writeTo
in interface Problems
logger
- the loggerProblems.writeTo(org.modeshape.common.util.Logger)
public void writeTo(Logger logger, Problem.Status firstStatus, Problem.Status... additionalStatuses)
writeTo
in interface Problems
logger
- the loggerfirstStatus
- the first status to be loggedadditionalStatuses
- the additional statuses to be loggedProblems.writeTo(org.modeshape.common.util.Logger,
org.modeshape.common.collection.Problem.Status,org.modeshape.common.collection.Problem.Status[])
protected final Logger.Level logLevelFor(Problem.Status status)
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |