|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nl.chess.it.util.config.ConfigValidationResult
This is the result of a check on the validity of the properties in a
Config
object. It's basically a wrapper around a list of Strings,
with some helper methods like addError(String, Throwable)
. It can also store a second
list, with unused properties.
Constructor Summary | |
ConfigValidationResult()
|
Method Summary | |
void |
addError(java.lang.String methodName,
java.lang.Throwable e)
Makes a nice description of an error that happens when calling a method and adds this description to the list with errors. |
java.util.List |
getErrors()
Returns a List with Strings that indicate any errors that might have occured. |
java.lang.String |
getSourceDescription()
Describes the location where the properties come from. |
java.util.Set |
getUnusedProperties()
Returns a Set with the unused properties. |
java.util.Set |
getUsedProperties()
Returns a set of {PropertyDisplayItem PropertyDisplayItems} that shows which properties are in use. |
void |
setSourceDescription(java.lang.String sourceDescription)
Set the location where the properties come from. |
void |
setUnusedProperties(java.util.Set set)
Sets the set with unusedProperties. |
void |
setUsedProperties(java.util.Set usedProperties)
Allows replacement of the set with usedProperties. |
boolean |
thereAreErrors()
Whether or not any exceptions occured when validating the configuration. |
boolean |
thereAreUnusedProperties()
Indicates whether or not there are unused properties. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ConfigValidationResult()
Method Detail |
public void addError(java.lang.String methodName, java.lang.Throwable e)
methodName
- Methodname that was called.e
- Throwable that was thrown.public boolean thereAreErrors()
true
if something serious went wrong during validation of the getXxx()
methods, false
otherwise.public boolean thereAreUnusedProperties()
true
if there are any properties in the Properties object that have
not been used while validation the various getXxx() methods, false
otherwise.public java.util.List getErrors()
null
, unmodifiable.public java.util.Set getUnusedProperties()
null
. Elements are of type String.public java.lang.String toString()
public void setUnusedProperties(java.util.Set set)
set
- Set with unusedProperties. Cannot be null
. Elements must be of
type String.public void setUsedProperties(java.util.Set usedProperties)
public java.util.Set getUsedProperties()
null
.public java.lang.String getSourceDescription()
null
, if it is unknown.public void setSourceDescription(java.lang.String sourceDescription)
sourceDescription
- Can be null
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |