Class NameableNodeValidator<I extends Nameable>

java.lang.Object
net.sf.basedb.util.overview.validator.BasicNodeValidator<I>
net.sf.basedb.util.overview.validator.NameableNodeValidator<I>
All Implemented Interfaces:
NodeValidator<I>
Direct Known Subclasses:
ArrayBatchValidator, ArrayDesignValidator, ArraySlideValidator, BioPlateValidator, BioSourceValidator, DerivedBioAssayValidator, ExperimentalFactorValidator, ExperimentValidator, ExtractValidator, FileValidator, HardwareValidator, KitValidator, PhysicalBioAssayValidator, PlatformValidator, ProtocolParameterValidator, ProtocolValidator, RawBioAssayValidator, SampleValidator, SoftwareValidator, TagValidator

public abstract class NameableNodeValidator<I extends Nameable>
extends BasicNodeValidator<I>
  • Constructor Details

    • 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 Details

    • 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.