org.eclipse.actf.validation.rulebase
Interface IRuleBase

All Known Subinterfaces:
IDocumentRuleBase
All Known Implementing Classes:
ValidationDocumentRuleBase

public interface IRuleBase

main interface representing a collection of rules and their metadata in ACTF. Currently, only rulebases described by XML documents (or validation documents) are supported.

Author:
John Buslawski
See Also:
IDocumentRuleBase

Method Summary
 void addExecutionPointDescriptor(ExecutionPointDescriptor descriptor)
          add an execution point descriptor to this rulebase
 void addRuleSet(IRuleSet set)
          add a ruleset to this rulebase
 ExecutionPointDescriptor getExecutionPointDescriptor(String name)
          get the execution point descriptor with the given name
 ExecutionPointDescriptor[] getExecutionPointDescriptors()
          get the execution point descriptors of this rulebase
 IRuleBaseMetadata getMetadata()
          returns the metadata for this rulebase (if any)
 String getModelType()
          retreave the model type associated with this rulebase
 String getName()
          get the name of this rulebase
 IRuleSet[] getRuleSets()
          retreave the rulesets contained within this rulebase.
 IRuleSet[] getRuleSetsForExecutionPoint(String name)
          retrieves all RuleSets in the IRuleBase that are associated with the ExecutionPoint with the given name.
 boolean isEnabled()
          returns whether or not this rulebase is enabled.
 void removeExecutionPointDescriptor(String name)
          remove the execution point descriptor with the given name from this rulebase
 void removeRuleSet(String name)
          remove the ruleset with the given name
 void setEnabled(boolean enable)
          set whether or not this rulebase is enabled.
 void setExecutionPointDescriptors(ExecutionPointDescriptor[] descriptors)
          set the execution point descriptors for this rulebase.
 void setMetadata(IRuleBaseMetadata metadata)
          set the metadata for this rulebase
 void setModelType(String type)
          set the model type associated with this rulebase.
 void setName(String name)
          set the name of this rulebase
 void setRuleSets(IRuleSet[] rulesets)
          set the rulesets for this rulebase
 

Method Detail

getName

String getName()
get the name of this rulebase

Returns:
name of rulebase

setName

void setName(String name)
set the name of this rulebase

Parameters:
name - - name of rulebase

isEnabled

boolean isEnabled()
returns whether or not this rulebase is enabled. None of the validation rules in a rulebase that is disabled will be processed during validations.

Returns:
true if this rulebase is enabled, false otherwise

setEnabled

void setEnabled(boolean enable)
set whether or not this rulebase is enabled. Once a rulebase is enabled, individual validation rules of that rulebase can be enabled or disabled. However, if a rulebase is not enabled, none of the validation rules contained by that rjulebase will be executed.

Parameters:
enable - - set whether or not this rulebase is enabled

getMetadata

IRuleBaseMetadata getMetadata()
returns the metadata for this rulebase (if any)

Returns:
metadata for this rulebase or null if no metadata is available

setMetadata

void setMetadata(IRuleBaseMetadata metadata)
set the metadata for this rulebase

Parameters:
metadata -

getRuleSets

IRuleSet[] getRuleSets()
retreave the rulesets contained within this rulebase. Rulesets are simply sets of validation rules in ACTF.

Returns:
rulesets of this rulebase
See Also:
IRuleSet

setRuleSets

void setRuleSets(IRuleSet[] rulesets)
set the rulesets for this rulebase

Parameters:
rulesets -

addRuleSet

void addRuleSet(IRuleSet set)
add a ruleset to this rulebase

Parameters:
set -

removeRuleSet

void removeRuleSet(String name)
remove the ruleset with the given name

Parameters:
name - name of ruleset to be removed

getModelType

String getModelType()
retreave the model type associated with this rulebase

Returns:
model type of this rulebase
See Also:
setModelType(String)

setModelType

void setModelType(String type)
set the model type associated with this rulebase. Each rulebase contains metadata and rulesets specific to a supported model.

Parameters:
type - type of model to be associated with this rulebase

getExecutionPointDescriptors

ExecutionPointDescriptor[] getExecutionPointDescriptors()
get the execution point descriptors of this rulebase

Returns:
the array of ExecutionPointDescriptors for this IRuleBase
See Also:
setExecutionPointDescriptors(ExecutionPointDescriptor[])

setExecutionPointDescriptors

void setExecutionPointDescriptors(ExecutionPointDescriptor[] descriptors)
set the execution point descriptors for this rulebase. Execution point descriptors inform the rulebase as to when and how validation rules are to be applied during execution of applications to be validated.

Parameters:
descriptors - - an array of ExecutionPointDescriptors for this IRuleBase

addExecutionPointDescriptor

void addExecutionPointDescriptor(ExecutionPointDescriptor descriptor)
add an execution point descriptor to this rulebase

Parameters:
descriptor -

removeExecutionPointDescriptor

void removeExecutionPointDescriptor(String name)
remove the execution point descriptor with the given name from this rulebase

Parameters:
name - name of descriptor to be removed

getExecutionPointDescriptor

ExecutionPointDescriptor getExecutionPointDescriptor(String name)
get the execution point descriptor with the given name

Parameters:
name - name of desired descriptor
Returns:

getRuleSetsForExecutionPoint

IRuleSet[] getRuleSetsForExecutionPoint(String name)
retrieves all RuleSets in the IRuleBase that are associated with the ExecutionPoint with the given name.

Parameters:
name - -- the execution point name to match