public class ProtocolParameterValidator extends NameableNodeValidator<AnnotationType>
Annotatable
item since this
is were the parameter values are stored. Validation rules:
Validator.MISSING_PARAMETER
Validator.ANNOTATION_INVALID_VALUE
Modifier and Type | Field and Description |
---|---|
private AnnotationSet |
annotationSet |
private Node |
lastProtocolNode |
private BasicItem |
parentItem |
private Node |
parentItemNode |
Constructor and Description |
---|
ProtocolParameterValidator() |
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.
|
private void |
getParentInformation(DbControl dc,
Node protocolNode)
Load parent item information from the current protocol node.
|
void |
postValidate(DbControl dc,
OverviewContext context,
Node node,
Node protocolNode)
Do nothing.
|
getDeniedItemFix, postDeniedItem, postMissingItem, postValidateFolder, preDeniedItem, preMissingItem, preValidate
private Node lastProtocolNode
private Node parentItemNode
private BasicItem parentItem
private AnnotationSet annotationSet
public void postValidate(DbControl dc, OverviewContext context, Node node, Node protocolNode)
BasicNodeValidator
postValidate
in interface NodeValidator<AnnotationType>
postValidate
in class NameableNodeValidator<AnnotationType>
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextnode
- The node object that represents itemprotocolNode
- The parent node that is linked with the itemprotected Fix getMissingItemFix(DbControl dc, Node parentNode)
BasicNodeValidator
new Fix("Add item to parent", parentNode.getItem())
getMissingItemFix
in class BasicNodeValidator<AnnotationType>