Class NameableNodeValidator<I extends Nameable>

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