public class AnnotationValidator extends BasicNodeValidator<Annotation>
Annotatable
item as it's parent.
Validation rules:
Validator.ANNOTATION_IS_PARAMETER
Validator.ANNOTATION_INVALID_ITEM
Validator.ANNOTATION_INVALID_VALUE
Validator.ANNOTATION_TOO_MANY_VALUES
Validator.DENIED_ANNOTATIONTYPE
Validator.ANNOTATION_INHERIT_FROM_NONPARENT
Validator.ANNOTATION_INHERIT_MULTIPLE
Validator.MISSING_MIAME_ANNOTATION
Validator.MISSING_FACTORVALUE
Constructor and Description |
---|
AnnotationValidator() |
Modifier and Type | Method and Description |
---|---|
protected Fix |
getMissingItemFix(DbControl dc,
Node parentNode)
Subclasses should override this method if they have a suggessted fix
for a missing item problem.
|
void |
postValidate(DbControl dc,
OverviewContext context,
Node node,
Node parentNode)
Do nothing.
|
void |
postValidateFolder(DbControl dc,
OverviewContext context,
Node folderNode,
Node parentNode)
Do nothing.
|
getDeniedItemFix, postDeniedItem, postMissingItem, preDeniedItem, preMissingItem, preValidate
public void postValidate(DbControl dc, OverviewContext context, Node node, Node parentNode)
BasicNodeValidator
postValidate
in interface NodeValidator<Annotation>
postValidate
in class BasicNodeValidator<Annotation>
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextnode
- The node object that represents itemparentNode
- The parent node that is linked with the itempublic void postValidateFolder(DbControl dc, OverviewContext context, Node folderNode, Node parentNode)
BasicNodeValidator
postValidateFolder
in interface NodeValidator<Annotation>
postValidateFolder
in class BasicNodeValidator<Annotation>
dc
- A DbControl to use for database accesscontext
- The current overview contextfolderNode
- The folder node, or null if no folder has been createdparentNode
- The parent node (never null)protected Fix getMissingItemFix(DbControl dc, Node parentNode)
BasicNodeValidator
new Fix("Add item to parent", parentNode.getItem())
getMissingItemFix
in class BasicNodeValidator<Annotation>