public class NullNodeValidator<I> extends java.lang.Object implements NodeValidator<I>
Modifier and Type | Field and Description |
---|---|
private boolean |
acceptDenied |
private boolean |
acceptMissing |
Constructor and Description |
---|
NullNodeValidator()
Create a new validator with default settings.
|
NullNodeValidator(boolean acceptDenied,
boolean acceptMissing)
Created a new validator that accepts denied and/or missing nodes.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public NullNodeValidator()
public NullNodeValidator(boolean acceptDenied, boolean acceptMissing)
acceptDenied
- TRUE to accept denied nodes, FALSE to rejectacceptMissing
- TRUE to accept missing nodes, FALSE to rejectpublic boolean preDeniedItem(DbControl dc, OverviewContext context, Node parentNode)
NodeValidator
preDeniedItem
in interface NodeValidator<I>
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextparentNode
- The parent node that is linked with the itempublic boolean preMissingItem(DbControl dc, OverviewContext context, Node parentNode)
NodeValidator
Failure
for the parent node and registering
it with the context.preMissingItem
in interface NodeValidator<I>
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextparentNode
- The parent node that is missing the itempublic boolean preValidate(DbControl dc, OverviewContext context, I item, Node parentNode)
NodeValidator
preValidate
in interface NodeValidator<I>
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextitem
- The item to validateparentNode
- The parent node that is linked with the itempublic void postMissingItem(DbControl dc, OverviewContext context, Node node, Node parentNode)
postMissingItem
in interface NodeValidator<I>
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextnode
- The node object that represents the missing itemparentNode
- The parent node that is missing the itempublic void postDeniedItem(DbControl dc, OverviewContext context, Node node, Node parentNode)
postDeniedItem
in interface NodeValidator<I>
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextnode
- The node object that represents the unaccessible itemparentNode
- The parent node that is linked with the itempublic void postValidate(DbControl dc, OverviewContext context, Node node, Node parentNode)
postValidate
in interface NodeValidator<I>
dc
- A DbControl to use if the validation needs to access the databasecontext
- The current overview contextnode
- The node object that represents itemparentNode
- The parent node that is linked with the itempublic void postValidateFolder(DbControl dc, OverviewContext context, Node folderNode, Node parentNode)
postValidateFolder
in interface NodeValidator<I>
dc
- A DbControl to use for database accesscontext
- The current overview contextfolderNode
- The folder node, or null if no folder has been createdparentNode
- The parent node (never null)