Package com.iizix.prop
Class PropVerification
java.lang.Object
com.iizix.prop.PropVerification
- All Implemented Interfaces:
IKStringInfoProviderHolder
Class used to hold information about errors of the property container verification process.
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionstatic final PropVerificationError[]
Empty list of errors.static final String
Verification error ID in the error property of the owner ("com.iizix.prop.verify").Constructor Summary
ConstructorDescriptionPropVerification
(IKStringInfoProvider provider) Creates the verification instance.Method Summary
Modifier and TypeMethodDescriptionvoid
add
(PropVerificationError error) Adds an error.boolean
add
(PropVerificationError error, boolean ignoreDups) Adds an error.Gets the list of errors.Gets the list of errors of a property.Gets the KString information provider used for e.g.boolean
Checks if the verification list contains errors.
Field Details
EMPTY
Empty list of errors.ERROR_ID
Verification error ID in the error property of the owner ("com.iizix.prop.verify").- See Also:
Constructor Details
PropVerification
Creates the verification instance.- Parameters:
provider
- Specifies the KString information provider.- Throws:
NullPointerException
- Ifprovider
isnull
.
Method Details
getKStringInfoProvider
Gets the KString information provider used for e.g. resolving KString's.- Specified by:
getKStringInfoProvider
in interfaceIKStringInfoProviderHolder
- Returns:
- The provider, never
null
.
add
Adds an error.- Parameters:
error
- The error.- Throws:
InternalError
- if the error ID already has been added for the property.
add
Adds an error.- Parameters:
error
- The error.ignoreDups
- Ignores duplicates.- Returns:
- true if added, false if ignored (already added).
- Throws:
InternalError
- if the error ID already has been added for the property andignoreDups
is false.
getErrors
Gets the list of errors.- Returns:
- The list of errors.
getErrors
Gets the list of errors of a property.- Parameters:
property
- The property.- Returns:
- The list of errors.
hasErrors
public boolean hasErrors()Checks if the verification list contains errors.- Returns:
- true if errors are present, false otherwise.