2.17.2: 2011-06-17

net.sf.basedb.util.overview.validator
Class NameableNodeValidator<I extends Nameable>

java.lang.Object
  extended by net.sf.basedb.util.overview.validator.BasicNodeValidator<I>
      extended by net.sf.basedb.util.overview.validator.NameableNodeValidator<I>
All Implemented Interfaces:
NodeValidator<I>
Direct Known Subclasses:
ArrayBatchValidator, ArrayDesignValidator, ArraySlideValidator, BioSourceValidator, ExperimentalFactorValidator, ExperimentValidator, ExtractValidator, HardwareValidator, HybridizationValidator, LabeledExtractValidator, PlatformValidator, ProtocolParameterValidator, ProtocolValidator, RawBioAssayValidator, SampleValidator, ScanValidator, SoftwareValidator

public abstract class NameableNodeValidator<I extends Nameable>
extends BasicNodeValidator<I>


Constructor Summary
NameableNodeValidator(Validator ruleMissing, Validator ruleDenied)
          Creates a new validator.
 
Method Summary
private  void createFailure(OverviewContext context, Set<String> knownDuplicates, Validator validator, Node node, String name)
          Create a failure on this node unless we have created a failure for the same validator already.
 void postValidate(DbControl dc, OverviewContext context, Node node, Node parentNode)
          Do nothing.
 
Methods inherited from class net.sf.basedb.util.overview.validator.BasicNodeValidator
getDeniedItemFix, getMissingItemFix, postDeniedItem, postMissingItem, postValidateFolder, preDeniedItem, preMissingItem, preValidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameableNodeValidator

public NameableNodeValidator(Validator ruleMissing,
                             Validator ruleDenied)
Creates a new validator.

Parameters:
ruleMissing - The validation rule that is broken if an item is missing, or null to not report missing items as a failure
ruleDenied - The validation rule that is broken if we are denied access to an item, or null to not report this as a failure
Method Detail

postValidate

public void postValidate(DbControl dc,
                         OverviewContext context,
                         Node node,
                         Node parentNode)
Description copied from class: BasicNodeValidator
Do nothing. Subclasses should override this method if they need more validation for an existing and accessible item.

Specified by:
postValidate in interface NodeValidator<I extends Nameable>
Overrides:
postValidate in class BasicNodeValidator<I extends Nameable>
Parameters:
dc - A DbControl to use if the validation needs to access the database
context - The current overview context
node - The node object that represents item
parentNode - The parent node that is linked with the item

createFailure

private void createFailure(OverviewContext context,
                           Set<String> knownDuplicates,
                           Validator validator,
                           Node node,
                           String name)
Create a failure on this node unless we have created a failure for the same validator already.


2.17.2: 2011-06-17