2.14.2: 2010-02-22

net.sf.basedb.util.overview.validator
Class NullNodeValidator<I>

java.lang.Object
  extended by net.sf.basedb.util.overview.validator.NullNodeValidator<I>
All Implemented Interfaces:
NodeValidator<I>

public class NullNodeValidator<I>
extends Object
implements NodeValidator<I>

A node validator implementation that accepts all nodes, except missing items and denied access items. No validation failures are reported.

Version:
2.10
Author:
Nicklas
Last modified
$Date: 2009-02-05 14:39:25 +0100 (Thu, 05 Feb 2009) $

Constructor Summary
NullNodeValidator()
           
 
Method Summary
 void postDeniedItem(DbControl dc, OverviewContext context, Node node, Node parentNode)
          Do nothing.
 void postMissingItem(DbControl dc, OverviewContext context, Node node, Node parentNode)
          Do nothing.
 void postValidate(DbControl dc, OverviewContext context, Node node, Node parentNode)
          Do nothing.
 void postValidateFolder(DbControl dc, OverviewContext context, Node folderNode, Node parentNode)
          Do nothing.
 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.
 boolean preMissingItem(DbControl dc, OverviewContext context, Node parentNode)
          Validate a missing item before creating a node for it.
 boolean preValidate(DbControl dc, OverviewContext context, I item, Node parentNode)
          Validate an existing item before creating a node for it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullNodeValidator

public NullNodeValidator()
Method Detail

preDeniedItem

public boolean preDeniedItem(DbControl dc,
                             OverviewContext context,
                             Node parentNode)
Description copied from interface: NodeValidator
Validate an item that the current user doen't have access to before creating a node for it.

Specified by:
preDeniedItem in interface NodeValidator<I>
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:
Always false

preMissingItem

public boolean preMissingItem(DbControl dc,
                              OverviewContext context,
                              Node parentNode)
Description copied from interface: NodeValidator
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.

Specified by:
preMissingItem in interface NodeValidator<I>
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:
Always false

preValidate

public boolean preValidate(DbControl dc,
                           OverviewContext context,
                           I item,
                           Node parentNode)
Description copied from interface: NodeValidator
Validate an existing item before creating a node for it.

Specified by:
preValidate in interface NodeValidator<I>
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:
Always true

postMissingItem

public void postMissingItem(DbControl dc,
                            OverviewContext context,
                            Node node,
                            Node parentNode)
Do nothing.

Specified by:
postMissingItem in interface NodeValidator<I>
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

public void postDeniedItem(DbControl dc,
                           OverviewContext context,
                           Node node,
                           Node parentNode)
Do nothing.

Specified by:
postDeniedItem in interface NodeValidator<I>
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

public void postValidate(DbControl dc,
                         OverviewContext context,
                         Node node,
                         Node parentNode)
Do nothing.

Specified by:
postValidate in interface NodeValidator<I>
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

public void postValidateFolder(DbControl dc,
                               OverviewContext context,
                               Node folderNode,
                               Node parentNode)
Do nothing.

Specified by:
postValidateFolder in interface NodeValidator<I>
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)

2.14.2: 2010-02-22