|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.rule.Package
public class Package
Collection of related Rule
s.
Rule
,
Serialized FormConstructor Summary | |
---|---|
Package()
Default constructor - for Externalizable. |
|
Package(java.lang.String name)
Construct. |
|
Package(java.lang.String name,
java.lang.ClassLoader parentClassLoader)
Construct. |
Method Summary | |
---|---|
void |
addFactTemplate(FactTemplate factTemplate)
|
void |
addFunction(java.lang.String functionName)
|
void |
addGlobal(java.lang.String identifier,
java.lang.Class clazz)
|
void |
addImport(java.lang.String importEntry)
|
void |
addRule(Rule rule)
Add a Rule to this Package . |
void |
addRuleFlow(Process process)
Add a rule flow to this package. |
void |
addStaticImport(java.lang.String functionImport)
|
void |
checkValidity()
This will throw an exception if the package is not valid |
void |
clear()
|
boolean |
equals(java.lang.Object object)
|
java.lang.String |
getErrorSummary()
This will return the error summary (if any) if the package is invalid. |
FactTemplate |
getFactTemplate(java.lang.String name)
|
java.util.List |
getFunctions()
|
java.util.Map |
getGlobals()
|
java.util.Set |
getImports()
|
java.lang.String |
getName()
Retrieve the name of this Package . |
PackageCompilationData |
getPackageCompilationData()
|
Rule |
getRule(java.lang.String name)
Retrieve a Rule by name. |
java.util.Map |
getRuleFlows()
Get the rule flows for this package. |
Rule[] |
getRules()
Retrieve all Rules in this Package . |
java.util.Set |
getStaticImports()
|
int |
hashCode()
|
boolean |
isValid()
|
void |
readExternal(java.io.ObjectInput stream)
Handles the read serialization of the Package. |
PackageCompilationData |
removeFunction(java.lang.String functionName)
|
void |
removeFunctionImport(java.lang.String functionImport)
|
void |
removeGlobal(java.lang.String identifier)
|
void |
removeImport(java.lang.String importEntry)
|
PackageCompilationData |
removeRule(Rule rule)
|
void |
removeRuleFlow(java.lang.String id)
Rule flows can be removed by ID. |
void |
setError(java.lang.String summary)
Once this is called, the package will be marked as invalid |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput stream)
Handles the write serialization of the Package. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Package()
public Package(java.lang.String name)
name
- The name of this Package
.public Package(java.lang.String name, java.lang.ClassLoader parentClassLoader)
name
- The name of this Package
.Method Detail |
---|
public void writeExternal(java.io.ObjectOutput stream) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput stream) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.String getName()
Package
.
Package
.public void addImport(java.lang.String importEntry)
public void removeImport(java.lang.String importEntry)
public java.util.Set getImports()
public void addStaticImport(java.lang.String functionImport)
public void addFunction(java.lang.String functionName)
public java.util.List getFunctions()
public void removeFunctionImport(java.lang.String functionImport)
public java.util.Set getStaticImports()
public void addGlobal(java.lang.String identifier, java.lang.Class clazz)
public void removeGlobal(java.lang.String identifier)
public java.util.Map getGlobals()
public PackageCompilationData removeFunction(java.lang.String functionName)
public FactTemplate getFactTemplate(java.lang.String name)
public void addFactTemplate(FactTemplate factTemplate)
public void addRule(Rule rule)
Rule
to this Package
.
rule
- The rule to add.
DuplicateRuleNameException
- If the Rule
attempting to be added has the
same name as another previously added Rule
.
InvalidRuleException
- If the Rule
is not valid.public void addRuleFlow(Process process)
public java.util.Map getRuleFlows()
public void removeRuleFlow(java.lang.String id)
public PackageCompilationData removeRule(Rule rule)
public Rule getRule(java.lang.String name)
Rule
by name.
name
- The name of the Rule
to retrieve.
Rule
, or null
if not
such Rule
has been added to this
Package
.public Rule[] getRules()
Rules
in this Package
.
Rules
in this Package
.public PackageCompilationData getPackageCompilationData()
public java.lang.String toString()
toString
in class java.lang.Object
public void setError(java.lang.String summary)
public boolean isValid()
public void checkValidity()
public java.lang.String getErrorSummary()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |