@Qualifier
@Documented
@Retention(RUNTIME)
@Target(METHOD)
public @interface LegalValues
Used to indicate that a String model property can only contain a specific list of strings.
Typically a model property will use a java enum instead. However, there are some cases
where a String property is defined in a base model (e.g. a Job's status property) and the
various derived models specify what values they allow for the that inherited property
(e.g. a ServerJob's status property).
In these cases, the model property needs to use a String instead of a java enum (since
the base model doesn't know what the possible values are), and this annotation is added
in the derived models to the inherited property to restrict what values it can hold.
- Author:
- tmoreau