public class ScriptRepository
extends java.lang.Object
Constructor and Description |
---|
ScriptRepository(boolean skipOverrideRules) |
Modifier and Type | Method and Description |
---|---|
RuleScript |
addScript(RuleScript script)
add a rule script to the repository returning any existing script with the same name or null
if no such script can be found.
|
boolean |
checkInterfaces()
see if we need to do any transformation of interfaces
|
java.util.List<RuleScript> |
currentRules()
return a list containing all the currently installed rule scripts.
|
boolean |
matchClass(java.lang.Class<?> clazz)
return true if there is a rule which applies to the supplied class otherwise false
|
java.util.List<RuleScript> |
processScripts(java.lang.String scriptText,
java.lang.String scriptFile)
Split the text of a script file into a list of individual rule scripts
|
RuleScript |
removeScript(RuleScript script)
remove a rule script from the repository returning the script if it is found or null
if is not found.
|
RuleScript |
removeScript(java.lang.String name)
remove a rule script from the repository by name returning the script if it is found or null
if is not found.
|
RuleScript |
scriptForRuleName(java.lang.String name)
locate a rule script with a given name
|
java.util.List<RuleScript> |
scriptsForClassName(java.lang.String name)
return a list of all class scripts indexed using the supplied name.
|
java.util.List<RuleScript> |
scriptsForInterfaceName(java.lang.String name)
return a list of all interface scripts indexed using the supplied name.
|
boolean |
skipOverrideRules() |
public java.util.List<RuleScript> processScripts(java.lang.String scriptText, java.lang.String scriptFile) throws java.lang.Exception
scriptText
- the text obtained from a script filescriptFile
- teh name of the file containing teh textjava.lang.Exception
- if there is an error in the format of the script file tesxtpublic RuleScript addScript(RuleScript script)
script
- the script to be added to the repositorypublic RuleScript removeScript(RuleScript script)
script
- the script to be removed from the repository.public RuleScript removeScript(java.lang.String name)
name
- the name of the script to be removed from the repositorypublic RuleScript scriptForRuleName(java.lang.String name)
name
- the name of the rule scriptpublic java.util.List<RuleScript> scriptsForClassName(java.lang.String name)
name
- public java.util.List<RuleScript> scriptsForInterfaceName(java.lang.String name)
name
- public boolean matchClass(java.lang.Class<?> clazz) throws java.lang.Exception
clazz
- java.lang.Exception
public java.util.List<RuleScript> currentRules()
public boolean checkInterfaces()
public boolean skipOverrideRules()
Copyright © 2013. All Rights Reserved.