Class TimerValidator
java.lang.Object
de.fraunhofer.iese.mydata.timer.validation.TimerValidator
- All Implemented Interfaces:
ITimerValidator
,javax.validation.ConstraintValidator<MyDataTimer,
String>
public class TimerValidator
extends Object
implements ITimerValidator, javax.validation.ConstraintValidator<MyDataTimer,String>
The Class TimerValidator.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(MyDataTimer constraintAnnotation) Implementing this method is optional and is usually blank in example code.boolean
Use this method to test the constraint.void
validateLanguageVersion
(Timer timer) void
validateTimerSolutionAndComponents
(SolutionId solutionId, @NotNull String timer) void
validateXMLSchema
(String timer)
-
Constructor Details
-
TimerValidator
public TimerValidator()
-
-
Method Details
-
validateXMLSchema
- Specified by:
validateXMLSchema
in interfaceITimerValidator
- Throws:
InvalidEntityException
-
initialize
Implementing this method is optional and is usually blank in example code. Use it to setup your constraint validator. In this case, I've created a Pattern object to test the post code.- Specified by:
initialize
in interfacejavax.validation.ConstraintValidator<MyDataTimer,
String> - See Also:
-
ConstraintValidator.initialize(java.lang.annotation.Annotation)
-
isValid
Use this method to test the constraint.- Specified by:
isValid
in interfacejavax.validation.ConstraintValidator<MyDataTimer,
String> - See Also:
-
ConstraintValidator.isValid(java.lang.Object, javax.validation.ConstraintValidatorContext)
-
validateTimerSolutionAndComponents
public void validateTimerSolutionAndComponents(SolutionId solutionId, @NotNull @NotNull String timer) throws InvalidEntityException - Specified by:
validateTimerSolutionAndComponents
in interfaceITimerValidator
- Throws:
InvalidEntityException
-
validateLanguageVersion
- Throws:
InvalidEntityException
-