Interface NodeValidator<I>

    • Method Detail

      • preMissingItem

        boolean preMissingItem​(DbControl dc,
                               OverviewContext context,
                               Node parentNode)
        Validate a missing item before creating a node for it. This usually means creating a missing item Failure for the parent node and registering it with the context.
        Parameters:
        dc - A DbControl to use if the validation needs to access the database
        context - The current overview context
        parentNode - The parent node that is missing the item
        Returns:
        TRUE if a node should be created, FALSE if not
      • preDeniedItem

        boolean preDeniedItem​(DbControl dc,
                              OverviewContext context,
                              Node parentNode)
        Validate an item that the current user doen't have access to before creating a node for it.
        Parameters:
        dc - A DbControl to use if the validation needs to access the database
        context - The current overview context
        parentNode - The parent node that is linked with the item
        Returns:
        TRUE if a node should be created, FALSE if not
      • preValidate

        boolean preValidate​(DbControl dc,
                            OverviewContext context,
                            I item,
                            Node parentNode)
        Validate an existing item before creating a node for it.
        Parameters:
        dc - A DbControl to use if the validation needs to access the database
        context - The current overview context
        item - The item to validate
        parentNode - The parent node that is linked with the item
        Returns:
        TRUE if a node should be created, FALSE if not
      • postMissingItem

        void postMissingItem​(DbControl dc,
                             OverviewContext context,
                             Node node,
                             Node parentNode)
        Validate a missing item after a node has been created for it.
        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 the missing item
        parentNode - The parent node that is missing the item
      • postDeniedItem

        void postDeniedItem​(DbControl dc,
                            OverviewContext context,
                            Node node,
                            Node parentNode)
        Validate an item that the current user doen't have access to after a node has been created for it.
        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 the unaccessible item
        parentNode - The parent node that is linked with the item
      • postValidate

        void postValidate​(DbControl dc,
                          OverviewContext context,
                          Node node,
                          Node parentNode)
        Validate an existing item after a node has been created for it.
        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
      • postValidateFolder

        void postValidateFolder​(DbControl dc,
                                OverviewContext context,
                                Node folderNode,
                                Node parentNode)
        Validate a folder node after all child (item-type) nodes has been added to the folder. This method must be called by node loaders in all cases were it is theoretically possible that a folder node can be created. Some validators may, for example, check on missing items!
        Parameters:
        dc - A DbControl to use for database access
        context - The current overview context
        folderNode - The folder node, or null if no folder has been created
        parentNode - The parent node (never null)