org.eclipse.actf.validation.core
Class ValidationProcessManager

java.lang.Object
  extended by org.eclipse.actf.validation.core.ValidationProcessManager

public class ValidationProcessManager
extends Object

entry point for the ACTF validation engine and the point at which all validation processes are initiated. A typical use is:

  ValidationProcessManager vpm = ValidationProcessManager.getInstance();
  vpm.init();
  vpm.initiateValidation(...);
 

During the manager's lifetime, it receives execution point notifications and starts the validation processes associated with these execution points.

Author:
John Buslawski
See Also:
init(), initiateValidation(ExecutionPoint)

Constructor Summary
protected ValidationProcessManager()
           
 
Method Summary
 ExecutionPoint createEventExecutionPointForTarget(String execPointName, Object target, Object event)
           
 ExecutionPoint createMethodExecutionPointForTarget(String execPointName, Object target, Object[] arguments, Member member)
           
protected  ValidationReporter createReporter()
           
protected  IRuleBase findRuleBaseForTarget(Object target)
           
protected  IRuleBase findRuleBaseForTarget(String targetName)
           
static ValidationProcessManager getInstance()
           
 ValidationReporter getReporter()
          get the reporter used by this manager
 String getValidationProcessName(String validatorName)
          Gets the IValidationProcess class name for this IValidator name.
 void init()
          initializes the validation process manager.
 void initiateValidation(ExecutionPoint execPoint)
          Receives an ExecutionPoint and starts a IValidationProcess.
 void initiateValidation(ExecutionPoint[] execPoints)
          Receives an array of ExecutionPoints and starts a IValidationProcess for each one.
 void initiateValidation(ExecutionPoint[] execPoints, Map bridgeMap)
          Receives an array of ExecutionPoints and a component bridge map and starts a IValidationProcess.
 void initiateValidation(ExecutionPoint execPoint, Map bridgeMap)
          Receives an ExecutionPoint and a component bridge map and starts a IValidationProcess.
 void registerProcess(String validatorName, String vpClassName)
          Registers a IValidator/IValidationProcess pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationProcessManager

protected ValidationProcessManager()
Method Detail

getInstance

public static ValidationProcessManager getInstance()

init

public void init()
initializes the validation process manager. This method should be called once before any validations are initiated. This method performs the following tasks:

See Also:
RuleBaseManager, DocumentRuleBaseDescriptor, IValidationProcess

registerProcess

public void registerProcess(String validatorName,
                            String vpClassName)
Registers a IValidator/IValidationProcess pair.

Parameters:
validatorName - -- the IValidator class name
vpClassName - - the IValidationProcess class name

getValidationProcessName

public String getValidationProcessName(String validatorName)
Gets the IValidationProcess class name for this IValidator name.

Parameters:
validatorName - -- the IValidator class name
Returns:
-- the IValidationProcess class name

initiateValidation

public void initiateValidation(ExecutionPoint[] execPoints)
                        throws ValidationProcessException
Receives an array of ExecutionPoints and starts a IValidationProcess for each one.

Parameters:
execPoints - -- the array of execution points to validate
Throws:
ValidationProcessException

initiateValidation

public void initiateValidation(ExecutionPoint[] execPoints,
                               Map bridgeMap)
                        throws ValidationProcessException
Receives an array of ExecutionPoints and a component bridge map and starts a IValidationProcess. Each ExecutionPoint uses the same component bridge map.

A component bridge map is used to traverse trees of GUI components of differing models. The map contains keys that are components of one model that are to serve as the parents of components of another model. This tactic is useful when traversing types of components that do not allow access to children or parents of different models.

Parameters:
execPoints - -- the array of execution points to validate
bridgeMap - -- the component bridge map for these validations
Throws:
ValidationProcessException

initiateValidation

public void initiateValidation(ExecutionPoint execPoint)
                        throws ValidationProcessException
Receives an ExecutionPoint and starts a IValidationProcess.

Parameters:
execPoint - -- the execution point that begins a validation
Throws:
ValidationProcessException

initiateValidation

public void initiateValidation(ExecutionPoint execPoint,
                               Map bridgeMap)
                        throws ValidationProcessException
Receives an ExecutionPoint and a component bridge map and starts a IValidationProcess. A component bridge map is used to traverse trees of GUI components of differing models. The map contains keys that are components of one model that are to serve as the parents of components of another model. This tactic is useful when traversing types of components that do not allow access to children or parents of different models.

Parameters:
execPoint - -- the execution point that begins a validation
bridgeMap - -- sets the component bridge map for this validation
Throws:
ValidationProcessException

createReporter

protected ValidationReporter createReporter()

getReporter

public ValidationReporter getReporter()
get the reporter used by this manager

Returns:
reporter used by this manager

findRuleBaseForTarget

protected IRuleBase findRuleBaseForTarget(Object target)

findRuleBaseForTarget

protected IRuleBase findRuleBaseForTarget(String targetName)

createMethodExecutionPointForTarget

public ExecutionPoint createMethodExecutionPointForTarget(String execPointName,
                                                          Object target,
                                                          Object[] arguments,
                                                          Member member)

createEventExecutionPointForTarget

public ExecutionPoint createEventExecutionPointForTarget(String execPointName,
                                                         Object target,
                                                         Object event)