Annotation Type AllowedValues
-
@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE) public @interface AllowedValues
This annotation defines a set of values permitted to be used in the context of the containing annotation.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description AllowedValue[]valuesGet any allowed values for this constraint.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanallowOthersIndicates if the constraint allows other values not included in the enumerated list.StringdescriptionAn optional description of the constraint.IAllowedValuesConstraint.ExtensibleextensibleIndicates if the constraint can be extended by other constraints.StringformalNameAn optional formal name for the constraint.StringidAn optional identifier for the constraint, which must be unique to only this constraint.IConstraint.LevellevelThe significance of a violation of this constraint.StringmessageThe message to emit when the constraint is violated.Property[]propertiesAn optional set of properties associated with these allowed values.StringremarksAny remarks about the constraint, encoded as an escaped Markdown string.StringtargetAn optional metapath that points to the target flag or field value that the constraint applies to.
-
-
-
Element Detail
-
values
@NonNull AllowedValue[] values
Get any allowed values for this constraint.- Returns:
- an array of allowed value enumerations
-
-
-
formalName
@NonNull String formalName
An optional formal name for the constraint.- Returns:
- the formal name if provided or an empty string otherwise
- Default:
- ""
-
-
-
description
@NonNull String description
An optional description of the constraint.- Returns:
- the description if provided or an empty string otherwise
- Default:
- ""
-
-
-
level
@NonNull IConstraint.Level level
The significance of a violation of this constraint.- Returns:
- the level
- Default:
- gov.nist.secauto.metaschema.core.model.constraint.IConstraint.Level.ERROR
-
-
-
target
@NonNull String target
An optional metapath that points to the target flag or field value that the constraint applies to. If omitted the target will be ".", which means the target is the value of theBoundFlag,BoundFieldorMetaschemaFieldValueannotation the constraint appears on. In the prior case, this annotation may only appear on aBoundFieldif the field has no flags, which results in aBoundFieldannotation on a field instance with a scalar, data type value.- Returns:
- the target metapath
- Default:
- "."
-
-
-
properties
Property[] properties
An optional set of properties associated with these allowed values.- Returns:
- the properties or an empty array with no properties
- Default:
- {}
-
-
-
allowOthers
boolean allowOthers
Indicates if the constraint allows other values not included in the enumerated list.- Returns:
trueif other values are allowed orfalseotherwise
- Default:
- false
-
-
-
extensible
@NonNull IAllowedValuesConstraint.Extensible extensible
Indicates if the constraint can be extended by other constraints.- Returns:
- the extension mode
- Default:
- gov.nist.secauto.metaschema.core.model.constraint.IAllowedValuesConstraint.Extensible.MODEL
-
-