|
Drools :: Core 6.0.0.Beta5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.core.rule.Package
public class Package
Collection of related Rules.
Rule,
Serialized Form| Constructor Summary | |
|---|---|
Package()
Default constructor - for Externalizable. |
|
Package(String name)
Construct. |
|
| Method Summary | |
|---|---|
void |
addEntryPointId(String id)
|
void |
addFactTemplate(FactTemplate factTemplate)
|
void |
addFunction(Function function)
|
void |
addGlobal(String identifier,
Class<?> clazz)
|
void |
addImport(ImportDeclaration importDecl)
|
void |
addProcess(org.kie.api.definition.process.Process process)
Add a rule flow to this package. |
void |
addRule(Rule rule)
Add a Rule to this Package. |
void |
addStaticImport(String functionImport)
|
void |
addTypeDeclaration(TypeDeclaration typeDecl)
|
void |
addWindowDeclaration(WindowDeclaration window)
|
void |
checkValidity()
This will throw an exception if the package is not valid |
void |
clear()
|
boolean |
equals(Object object)
|
ClassFieldAccessorStore |
getClassFieldAccessorStore()
|
DialectRuntimeRegistry |
getDialectRuntimeRegistry()
|
Set<String> |
getEntryPointIds()
|
String |
getErrorSummary()
This will return the error summary (if any) if the package is invalid. |
FactTemplate |
getFactTemplate(String name)
|
org.kie.api.definition.type.FactType |
getFactType(String typeName)
|
Map<String,org.kie.api.definition.type.FactType> |
getFactTypes()
|
Map<String,Function> |
getFunctions()
|
Map<String,String> |
getGlobals()
|
Map<String,ImportDeclaration> |
getImports()
|
String |
getName()
Retrieve the name of this Package. |
ClassLoader |
getPackageClassLoader()
|
Rule |
getRule(String name)
Retrieve a Rule by name. |
Map<String,org.kie.api.definition.process.Process> |
getRuleFlows()
Get the rule flows for this package. |
Rule[] |
getRules()
Retrieve all Rules in this Package. |
Set<String> |
getStaticImports()
|
TraitRegistry |
getTraitRegistry()
|
TypeDeclaration |
getTypeDeclaration(Class<?> clazz)
|
TypeDeclaration |
getTypeDeclaration(String type)
|
Map<String,TypeDeclaration> |
getTypeDeclarations()
|
TypeResolver |
getTypeResolver()
|
Map<String,WindowDeclaration> |
getWindowDeclarations()
|
int |
hashCode()
|
boolean |
isEvent(Class clazz)
Returns true if clazz is imported as an Event class in this package |
boolean |
isValid()
|
void |
readExternal(ObjectInput stream)
Handles the read serialization of the Package. |
void |
removeFunction(String functionName)
|
void |
removeFunctionImport(String functionImport)
|
void |
removeGlobal(String identifier)
|
void |
removeImport(String importEntry)
|
boolean |
removeObjectsGeneratedFromResource(org.kie.api.io.Resource resource)
|
void |
removeRule(Rule rule)
|
void |
removeRuleFlow(String id)
Rule flows can be removed by ID. |
void |
removeTypeDeclaration(String type)
|
void |
resetErrors()
Once this is called, the package will be marked as invalid |
void |
setClassFieldAccessorCache(ClassFieldAccessorCache classFieldAccessorCache)
|
void |
setDialectRuntimeRegistry(DialectRuntimeRegistry dialectRuntimeRegistry)
|
void |
setError(String summary)
Once this is called, the package will be marked as invalid |
void |
setTypeResolver(TypeResolver typeResolver)
|
void |
setWindowDeclarations(Map<String,WindowDeclaration> windowDeclarations)
|
String |
toString()
|
void |
writeExternal(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(String name)
name - The name of this Package.| Method Detail |
|---|
public void writeExternal(ObjectOutput stream)
throws IOException
writeExternal in interface Externalizablestream - out the stream to write the object to; should be an instance
of DroolsObjectOutputStream or OutputStream
IOException
public void readExternal(ObjectInput stream)
throws IOException,
ClassNotFoundException
readExternal in interface Externalizablestream, - the stream to read data from in order to restore the object;
should be an instance of DroolsObjectInputStream or
InputStream
IOException
ClassNotFoundExceptionpublic String getName()
Package.
Package.public ClassLoader getPackageClassLoader()
public DialectRuntimeRegistry getDialectRuntimeRegistry()
public void setDialectRuntimeRegistry(DialectRuntimeRegistry dialectRuntimeRegistry)
public void addImport(ImportDeclaration importDecl)
public void removeImport(String importEntry)
public Map<String,ImportDeclaration> getImports()
public void addTypeDeclaration(TypeDeclaration typeDecl)
public void removeTypeDeclaration(String type)
public Map<String,TypeDeclaration> getTypeDeclarations()
public TypeDeclaration getTypeDeclaration(Class<?> clazz)
public TypeDeclaration getTypeDeclaration(String type)
public void addStaticImport(String functionImport)
public void addFunction(Function function)
public Map<String,Function> getFunctions()
public void removeFunctionImport(String functionImport)
public Set<String> getStaticImports()
public void addGlobal(String identifier,
Class<?> clazz)
public void removeGlobal(String identifier)
public Map<String,String> getGlobals()
public void removeFunction(String functionName)
public FactTemplate getFactTemplate(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 addProcess(org.kie.api.definition.process.Process process)
public Map<String,org.kie.api.definition.process.Process> getRuleFlows()
public void removeRuleFlow(String id)
public void removeRule(Rule rule)
public Rule getRule(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 String toString()
toString in class Objectpublic void setError(String summary)
public void resetErrors()
public boolean isValid()
public void checkValidity()
public String getErrorSummary()
public boolean equals(Object object)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean isEvent(Class clazz)
clazz -
public void clear()
public org.kie.api.definition.type.FactType getFactType(String typeName)
public Map<String,org.kie.api.definition.type.FactType> getFactTypes()
public ClassFieldAccessorStore getClassFieldAccessorStore()
public void setClassFieldAccessorCache(ClassFieldAccessorCache classFieldAccessorCache)
public Set<String> getEntryPointIds()
public void addEntryPointId(String id)
public TypeResolver getTypeResolver()
public void setTypeResolver(TypeResolver typeResolver)
public void addWindowDeclaration(WindowDeclaration window)
public Map<String,WindowDeclaration> getWindowDeclarations()
public void setWindowDeclarations(Map<String,WindowDeclaration> windowDeclarations)
public TraitRegistry getTraitRegistry()
public boolean removeObjectsGeneratedFromResource(org.kie.api.io.Resource resource)
|
Drools :: Core 6.0.0.Beta5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||