org.eclipse.actf.validation.core
Class ExecutionPointDescriptor

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

public class ExecutionPointDescriptor
extends Object

embodies a description of the execution points at which validations are to be triggered. Currently, three types of execution point descriptors are supported:

In ACTF, the first type of execution point descriptor is only meaningful in the context of an aspect-oriented programming environment in which validation code can be woven into the target class at the appropriate point of invocation. The other types can be implemented via listeners and proxies handled via the Java Reflection API.

Note: The API and functionality for this class are not complete.

Author:
Mike Squillace

Field Summary
static int EVENT_EXECUTION_POINT
           
static String EVENT_TYPE
           
static String EXECUTION_POINT_NAME
           
static String EXECUTION_POINT_VALIDATOR
           
protected  List executionTargets
           
static int METHOD_EXECUTION_POINT
           
static String METHOD_TYPE
           
protected  List modelTransitions
           
protected  String name
           
static int PROPERTYCHANGED_EXECUTION_POINT
           
protected  String ruleBaseName
           
protected  String validatorName
           
 
Constructor Summary
ExecutionPointDescriptor(String name, String ruleBaseName)
           
ExecutionPointDescriptor(String name, String validatorName, List executionTargets, List modelTransitions)
           
ExecutionPointDescriptor(String name, String ruleBaseName, String validatorName, List executionTargets)
           
ExecutionPointDescriptor(String name, String ruleBaseName, String validatorName, List executionTargets, List modelTransitions)
          create a descriptor for a set of execution points.
 
Method Summary
 ExecutionPointTarget[] getExecutionTargets()
           
 ModelTransition[] getModelTransitions()
           
 String getName()
           
 String getQualifiedName()
          Execution point names can be reused across rule bases but they must be unique within a rule base.
 String getRuleBaseName()
           
 String getValidatorName()
           
 void printDescriptor(int indent)
           
 void setExecutionTargets(List targets)
           
 void setModelTransitions(List transitions)
           
 void setName(String name)
           
 void setRuleBaseName(String rbName)
           
 void setValidatorName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METHOD_EXECUTION_POINT

public static final int METHOD_EXECUTION_POINT
See Also:
Constant Field Values

EVENT_EXECUTION_POINT

public static final int EVENT_EXECUTION_POINT
See Also:
Constant Field Values

PROPERTYCHANGED_EXECUTION_POINT

public static final int PROPERTYCHANGED_EXECUTION_POINT
See Also:
Constant Field Values

EXECUTION_POINT_NAME

public static final String EXECUTION_POINT_NAME
See Also:
Constant Field Values

EXECUTION_POINT_VALIDATOR

public static final String EXECUTION_POINT_VALIDATOR
See Also:
Constant Field Values

METHOD_TYPE

public static final String METHOD_TYPE
See Also:
Constant Field Values

EVENT_TYPE

public static final String EVENT_TYPE
See Also:
Constant Field Values

name

protected String name

ruleBaseName

protected String ruleBaseName

validatorName

protected String validatorName

executionTargets

protected List executionTargets

modelTransitions

protected List modelTransitions
Constructor Detail

ExecutionPointDescriptor

public ExecutionPointDescriptor(String name,
                                String ruleBaseName,
                                String validatorName,
                                List executionTargets,
                                List modelTransitions)
create a descriptor for a set of execution points. Each execution point has a name that is unique within a rule base definition. The qualified name is in the form rule_base_name:execution_point_name.

Each execution point has an associated validator class that is to be used when validating components. A rule base can have more than one execution point descriptor where each descriptor is differentiated by its targets and validators.

The list of execution point targets defines the condition or criteria for firing the execution point. Execution point targets define a specific target class name and a type of either method-based,raven:method, or event-based, raven:event.

Parameters:
name - - name of this ExecutionPointDescriptor
ruleBaseName - - name of the IRuleBase for the contained ExecutionPoint
validatorName - - the IValidator class name to be used when generating ExecutionPoints
executionTargets - - the execution point targets for this ExecutionPointDescriptor
modelTransitions - - the architecture transitions for this ExecutionPointDescriptor
See Also:
ExecutionPointTarget, EventExecutionPointTarget,

IModel transitions are used to handle cross-model validations. Java UI code libraries can support embedded GUI implementations. For instance, SWT GUIs can embed Swing GUIs. Since rule bases are specific to GUI Models and execution points are unique to a rule base, the model transition raven:architectureTransition provides a way for a validation in one GUI model to transition to different GUI models. The model transition defines a regular expression to match and a new execution point and rule base to use when validating the new GUI model., ModelTransition


ExecutionPointDescriptor

public ExecutionPointDescriptor(String name,
                                String validatorName,
                                List executionTargets,
                                List modelTransitions)

ExecutionPointDescriptor

public ExecutionPointDescriptor(String name,
                                String ruleBaseName,
                                String validatorName,
                                List executionTargets)
Parameters:
name - - name of this ExecutionPointDescriptor
ruleBaseName - - name of the IRuleBase for the contained ExecutionPoint
validatorName - - the IValidator class name to be used when generating ExecutionPoints
executionTargets - - the execution point targets for this ExecutionPointDescriptor

ExecutionPointDescriptor

public ExecutionPointDescriptor(String name,
                                String ruleBaseName)
Parameters:
name - - name of this ExecutionPointDescriptor
ruleBaseName - - name of the IRuleBase for the contained ExecutionPoint
Method Detail

getName

public String getName()
Returns:
name of this descriptor

setName

public void setName(String name)
Parameters:
name - - name of this descriptor

getRuleBaseName

public String getRuleBaseName()
Returns:
rule base name associated with this descriptor

setRuleBaseName

public void setRuleBaseName(String rbName)
Parameters:
rbName - - name of this descriptor

getExecutionTargets

public ExecutionPointTarget[] getExecutionTargets()
Returns:
the ExecutionPointTargets

setExecutionTargets

public void setExecutionTargets(List targets)
Parameters:
targets - the executionPointTargets to set

getValidatorName

public String getValidatorName()
Returns:
the validator name

setValidatorName

public void setValidatorName(String name)
Parameters:
name - the validator name to set

getModelTransitions

public ModelTransition[] getModelTransitions()
Returns:
the architecture transitions

setModelTransitions

public void setModelTransitions(List transitions)
Parameters:
transitions - -- the model transitions to set

getQualifiedName

public String getQualifiedName()
Execution point names can be reused across rule bases but they must be unique within a rule base. The qualified name is the execution point name scoped to the rule base name. It has the form rule_base_name:execution_point_name.

Returns:
the qualified name of this execution point.

printDescriptor

public void printDescriptor(int indent)