org.eclipse.actf.validation.valdoc.rulebase
Class ValidationDocumentRuleBase

java.lang.Object
  extended by org.eclipse.actf.validation.valdoc.rulebase.ValidationDocumentRuleBase
All Implemented Interfaces:
IDocumentRuleBase, IRuleBase

public class ValidationDocumentRuleBase
extends Object
implements IDocumentRuleBase


Field Summary
 
Fields inherited from interface org.eclipse.actf.validation.rulebase.IDocumentRuleBase
ALIASES_ID
 
Constructor Summary
ValidationDocumentRuleBase()
           
 
Method Summary
 void addExecutionPointDescriptor(ExecutionPointDescriptor descriptor)
          add an execution point descriptor to this rulebase
 void addRuleSet(IRuleSet set)
          add a ruleset to this rulebase
 ICodeProcessor getCodeProcessor()
          Retrieve the ICodeProcessor for this IRuleBase.
 URL getDocumentLocation()
          Retrieve the URL of the document used for building the IRuleBase.
 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)
 IModel getModel()
          Retrieve the model for this IRuleBase.
 String getModelType()
          retrieve the model type associated with this rulebase
 String getName()
          get the name of this rulebase
 IRuleSet[] getRuleSets()
          retrieve 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.
 String getScriptingLanguage()
           
 String getVersion()
          retrieve the version number associated with this rulebase
 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 setCodeProcessor(ICodeProcessor codeProc)
          Set the ICodeProcessor for this IRuleBase
 void setDocumentLocation(URL location)
          Set the URL of the document used for building the IRuleBase.
 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 setModel(IModel model)
          Set the model for this IRuleBase
 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
 void setScriptingLanguage(String lang)
           
 void setVersion(String version)
          set the version number associated with this rulebase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationDocumentRuleBase

public ValidationDocumentRuleBase()
Method Detail

getDocumentLocation

public URL getDocumentLocation()
Description copied from interface: IDocumentRuleBase
Retrieve the URL of the document used for building the IRuleBase.

Specified by:
getDocumentLocation in interface IDocumentRuleBase
Returns:
URL of the validation document

setDocumentLocation

public void setDocumentLocation(URL location)
Description copied from interface: IDocumentRuleBase
Set the URL of the document used for building the IRuleBase.

Specified by:
setDocumentLocation in interface IDocumentRuleBase
Parameters:
location - - URL of the validation document

addRuleSet

public void addRuleSet(IRuleSet set)
Description copied from interface: IRuleBase
add a ruleset to this rulebase

Specified by:
addRuleSet in interface IRuleBase

getModelType

public String getModelType()
Description copied from interface: IRuleBase
retrieve the model type associated with this rulebase

Specified by:
getModelType in interface IRuleBase
Returns:
model type of this rulebase
See Also:
IRuleBase.setModelType(String)

getMetadata

public IRuleBaseMetadata getMetadata()
Description copied from interface: IRuleBase
returns the metadata for this rulebase (if any)

Specified by:
getMetadata in interface IRuleBase
Returns:
metadata for this rulebase or null if no metadata is available

getName

public String getName()
Description copied from interface: IRuleBase
get the name of this rulebase

Specified by:
getName in interface IRuleBase
Returns:
name of rulebase

getRuleSets

public IRuleSet[] getRuleSets()
Description copied from interface: IRuleBase
retrieve the rulesets contained within this rulebase. Rulesets are simply sets of validation rules in ACTF.

Specified by:
getRuleSets in interface IRuleBase
Returns:
rulesets of this rulebase
See Also:
IRuleSet

isEnabled

public boolean isEnabled()
Description copied from interface: IRuleBase
returns whether or not this rulebase is enabled. None of the validation rules in a rulebase that is disabled will be processed during validations.

Specified by:
isEnabled in interface IRuleBase
Returns:
true if this rulebase is enabled, false otherwise

removeRuleSet

public void removeRuleSet(String name)
Description copied from interface: IRuleBase
remove the ruleset with the given name

Specified by:
removeRuleSet in interface IRuleBase
Parameters:
name - name of ruleset to be removed

setModelType

public void setModelType(String type)
Description copied from interface: IRuleBase
set the model type associated with this rulebase. Each rulebase contains metadata and rulesets specific to a supported model.

Specified by:
setModelType in interface IRuleBase
Parameters:
type - type of model to be associated with this rulebase

setEnabled

public void setEnabled(boolean enable)
Description copied from interface: IRuleBase
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.

Specified by:
setEnabled in interface IRuleBase
Parameters:
enable - - set whether or not this rulebase is enabled

setMetadata

public void setMetadata(IRuleBaseMetadata metadata)
Description copied from interface: IRuleBase
set the metadata for this rulebase

Specified by:
setMetadata in interface IRuleBase

setName

public void setName(String name)
Description copied from interface: IRuleBase
set the name of this rulebase

Specified by:
setName in interface IRuleBase
Parameters:
name - - name of rulebase

setRuleSets

public void setRuleSets(IRuleSet[] rulesets)
Description copied from interface: IRuleBase
set the rulesets for this rulebase

Specified by:
setRuleSets in interface IRuleBase

getScriptingLanguage

public String getScriptingLanguage()

setScriptingLanguage

public void setScriptingLanguage(String lang)

setCodeProcessor

public void setCodeProcessor(ICodeProcessor codeProc)
Description copied from interface: IDocumentRuleBase
Set the ICodeProcessor for this IRuleBase

Specified by:
setCodeProcessor in interface IDocumentRuleBase
Parameters:
codeProc - - ICodeProcessor instance for the IRuleBase

getCodeProcessor

public ICodeProcessor getCodeProcessor()
Description copied from interface: IDocumentRuleBase
Retrieve the ICodeProcessor for this IRuleBase. The ICodeProcessor is derived by the <actf:scriptlang> attribute of the root <raven:rulebase> element.

Specified by:
getCodeProcessor in interface IDocumentRuleBase
Returns:
ICodeProcessor instance for the IRuleBase

setModel

public void setModel(IModel model)
Description copied from interface: IDocumentRuleBase
Set the model for this IRuleBase

Specified by:
setModel in interface IDocumentRuleBase
Parameters:
model - - IModel instance for the IRuleBase

getModel

public IModel getModel()
Description copied from interface: IDocumentRuleBase
Retrieve the model for this IRuleBase. The model is derived by the <raven:model> attribute of the root <raven:rulebase> element.

Specified by:
getModel in interface IDocumentRuleBase
Returns:
model instance for the IRuleBase

getExecutionPointDescriptors

public ExecutionPointDescriptor[] getExecutionPointDescriptors()
Description copied from interface: IRuleBase
get the execution point descriptors of this rulebase

Specified by:
getExecutionPointDescriptors in interface IRuleBase
Returns:
the array of ExecutionPointDescriptors for this IRuleBase
See Also:
IRuleBase.setExecutionPointDescriptors(ExecutionPointDescriptor[])

setExecutionPointDescriptors

public void setExecutionPointDescriptors(ExecutionPointDescriptor[] descriptors)
Description copied from interface: IRuleBase
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.

Specified by:
setExecutionPointDescriptors in interface IRuleBase
Parameters:
descriptors - - an array of ExecutionPointDescriptors for this IRuleBase

addExecutionPointDescriptor

public void addExecutionPointDescriptor(ExecutionPointDescriptor descriptor)
Description copied from interface: IRuleBase
add an execution point descriptor to this rulebase

Specified by:
addExecutionPointDescriptor in interface IRuleBase

removeExecutionPointDescriptor

public void removeExecutionPointDescriptor(String name)
Description copied from interface: IRuleBase
remove the execution point descriptor with the given name from this rulebase

Specified by:
removeExecutionPointDescriptor in interface IRuleBase
Parameters:
name - name of descriptor to be removed

getExecutionPointDescriptor

public ExecutionPointDescriptor getExecutionPointDescriptor(String name)
Description copied from interface: IRuleBase
get the execution point descriptor with the given name

Specified by:
getExecutionPointDescriptor in interface IRuleBase
Parameters:
name - name of desired descriptor
Returns:
ExecutionPointDescriptor

getRuleSetsForExecutionPoint

public IRuleSet[] getRuleSetsForExecutionPoint(String name)
Description copied from interface: IRuleBase
retrieves all RuleSets in the IRuleBase that are associated with the ExecutionPoint with the given name.

Specified by:
getRuleSetsForExecutionPoint in interface IRuleBase
Parameters:
name - -- the execution point name to match

getVersion

public String getVersion()
Description copied from interface: IRuleBase
retrieve the version number associated with this rulebase

Specified by:
getVersion in interface IRuleBase
Returns:
version number of this rulebase
See Also:
IRuleBase.setVersion(String)

setVersion

public void setVersion(String version)
Description copied from interface: IRuleBase
set the version number associated with this rulebase.

Specified by:
setVersion in interface IRuleBase
Parameters:
version - version number to be associated with this rulebase