|
3.2.1: 2012-12-13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.util.overview.validator.ExtensionNodeValidator<I>
public class ExtensionNodeValidator<I>
Wrapper for node validators that hooks into the extension system when validating nodes. The parent (or core) validator is always invoked first, then the extension system is queried for additional validators. Methods that return a value return the result from the last call (unless nothing else is specified).
Field Summary | |
---|---|
private Object |
key
|
private NodeValidator<I> |
parent
|
private List<NodeValidatorAction<I>> |
xtValidators
|
Constructor Summary | |
---|---|
ExtensionNodeValidator(NodeValidator<I> parent,
Object key)
Wrap the given parent node validator. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final NodeValidator<I> parent
private final Object key
private List<NodeValidatorAction<I>> xtValidators
Constructor Detail |
---|
public ExtensionNodeValidator(NodeValidator<I> parent, Object key)
Method Detail |
---|
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 item
public 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 item
public 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 item
public 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)public String toString()
toString
in class Object
private Iterable<NodeValidatorAction<I>> getValidators(DbControl dc)
|
3.2.1: 2012-12-13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |