de.smartics.properties.spi.core.validate
Class PropertyValidator
java.lang.Object
de.smartics.properties.spi.core.validate.PropertyValidator
-
All Implemented Interfaces:
-
Serializable
-
public class PropertyValidator
-
extends
Object
-
implements
Serializable
Helper to validate constraints.
-
See Also:
-
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyValidator
public PropertyValidator(boolean adminMode)
-
Default constructor.
-
Parameters:
-
adminMode
- the switch to turn validation into administration mode.
validate
public final void validate(PropertyDescriptor descriptor,
Object value,
Class<?>... groups)
throws PropertyValidationException
-
Validates if the given value meets the constraints defined by the given descriptor.
-
-
-
Parameters:
-
descriptor
- the descriptor whose constraints are required to be met.
-
value
- the value to check.
-
groups
- the validation only takes place for the given groups.
-
Throws:
-
PropertyValidationException
- if at least on constraint is not met.
Copyright © 2012-2013
Kronseder & Reiner GmbH - smartics. All Rights Reserved.