2.17.2: 2011-06-17

net.sf.basedb.util.overview.validator
Interface NodeValidatorFactory<L,K>

All Known Implementing Classes:
BasicItemNodeValidatorFactory

public interface NodeValidatorFactory<L,K>

A node validator factory is a class that know how to create NodeValidator:s for a given key domain.

Version:
2.10
Author:
Nicklas
This class/package is not part of the Public API
This class is still being developed. It may change without notice in future versions of BASE.
Last modified
$Date: 2009-03-30 09:18:50 +0200 (Mon, 30 Mar 2009) $

Method Summary
 NodeValidator<? extends L> createNodeValidator(K key)
          Create a node validator that knows how to validate nodes for items that are specified by the given key.
 boolean isDisabled()
          Check if node validation has been disabled.
 void setDisabled(boolean disabled)
          Disable/enabled node validation programmatically.
 

Method Detail

setDisabled

void setDisabled(boolean disabled)
Disable/enabled node validation programmatically. When a node validator factory is disabled the createNodeValidator(Object) should return null or a NullNodeValidator for all requests.

Parameters:
disabled - TRUE to disable node validation
Since:
2.11

isDisabled

boolean isDisabled()
Check if node validation has been disabled.

Returns:
TRUE if validation has been disabled
Since:
2.11

createNodeValidator

NodeValidator<? extends L> createNodeValidator(K key)
Create a node validator that knows how to validate nodes for items that are specified by the given key. The key can be almost anything. The interpretation of it is entirely up to the factory implementation.

Parameters:
key - A key that can be used to identify which items the node validator should handle
Returns:
A node validator object, or null if no validator exists
Throws:
ItemNotFoundException - If a node loader for the given key can't be found. NOTE! Instead of throwing an exception it is possible to simply return null or a NullNodeValidator or any other "generic" implementation.
BaseException - If there is any other problem creating the node validator

2.17.2: 2011-06-17