Added javadocs for ValidationMethod usage in Promotion object

References #162
This commit is contained in:
Mahesh V Kelkar 2015-04-22 23:08:17 -04:00
parent 2a51a4492e
commit 167fd1ce0d
1 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,12 @@ class Promotion {
/**
* Validate contents of "type" using following annotation
*
* - @ValidationMethod is a dropwizard annotation.
* - The format for the method name and signature is fixed: boolean "is<variable-name>"().
* - This method is called when model is validated.
* - When yaml config is parsed into this object, if this method returns false, the
* parser throws ConfigurationValidationException
*
* @return true if its a valid class name
*/
@ValidationMethod(message = "Promotion does not have a valid class name in \"type\"")