public class ExtensionNodeValidator<I> extends Object implements NodeValidator<I>
Modifier and Type | Field and Description |
---|---|
private Object |
key |
private NodeValidator<I> |
parent |
private List<NodeValidatorAction<I>> |
xtValidators |
Constructor and Description |
---|
ExtensionNodeValidator(NodeValidator<I> parent,
Object key)
Wrap the given parent node validator.
|
Modifier and Type | Method and Description |
---|---|
private Iterable<NodeValidatorAction<I>> |
getValidators(DbControl dc) |
void |
postDeniedItem(DbControl dc,
OverviewContext context,
Node node,
Node parentNode)
Call the same method on the parent validator and then on
all extension validator actions.
|
void |
postMissingItem(DbControl dc,
OverviewContext context,
Node node,
Node parentNode)
Call the same method on the parent validator and then on
all extension validator actions.
|
void |
postValidate(DbControl dc,
OverviewContext context,
Node node,
Node parentNode)
Call the same method on the parent validator and then on
all extension validator actions.
|
void |
postValidateFolder(DbControl dc,
OverviewContext context,
Node folderNode,
Node parentNode)
Call the same method on the parent validator and then on
all extension validator actions.
|
boolean |
preDeniedItem(DbControl dc,
OverviewContext context,
Node parentNode)
Call the same method on the parent validator and then on
all extension validator actions.
|
boolean |
preMissingItem(DbControl dc,
OverviewContext context,
Node parentNode)
Call the same method on the parent validator and then on
all extension validator actions.
|
boolean |
preValidate(DbControl dc,
OverviewContext context,
I item,
Node parentNode)
Call the same method on the parent validator and then on
all extension validator actions.
|
String |
toString() |
private final NodeValidator<I> parent
private final Object key
private List<NodeValidatorAction<I>> xtValidators
public ExtensionNodeValidator(NodeValidator<I> parent, Object key)
public boolean preMissingItem(DbControl dc, OverviewContext context, Node parentNode)
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 preDeniedItem(DbControl dc, OverviewContext context, Node parentNode)
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 preValidate(DbControl dc, OverviewContext context, I item, Node parentNode)
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)private Iterable<NodeValidatorAction<I>> getValidators(DbControl dc)