public class KnowledgeBaseAdapter extends Object implements KnowledgeBase, Externalizable
| Modifier and Type | Field and Description |
|---|---|
org.kie.internal.KnowledgeBase |
delegate |
| Constructor and Description |
|---|
KnowledgeBaseAdapter() |
KnowledgeBaseAdapter(org.kie.internal.KnowledgeBase delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(KnowledgeBaseEventListener listener)
Add an event listener.
|
void |
addKnowledgePackages(Collection<KnowledgePackage> kpackages)
Add the collection of KnowledgePackages to the KnowledgeBase.
|
boolean |
equals(Object obj) |
org.kie.internal.KnowledgeBase |
getDelegate() |
Set<String> |
getEntryPointIds()
Returns the set of the entry points declared and/or used in this knowledge base
|
FactType |
getFactType(String packageName,
String typeName)
Returns the FactType identified by the given package and type names.
|
Collection<KnowledgeBaseEventListener> |
getKnowledgeBaseEventListeners()
Returns all event listeners.
|
KnowledgePackage |
getKnowledgePackage(String packageName)
Returns a reference to the KnowledgePackage identified by the given name.
|
Collection<KnowledgePackage> |
getKnowledgePackages()
Return an immutable collection of the packages that exist in this KnowledgeBase.
|
Process |
getProcess(String processId)
Returns a referent to the Process identified by the given processId
|
Collection<Process> |
getProcesses() |
Query |
getQuery(String packageName,
String queryName)
Returns a reference to the Rule identified by the given package and rule names.
|
Rule |
getRule(String packageName,
String ruleName)
Returns a reference to the Rule identified by the given package and rule names.
|
Collection<StatefulKnowledgeSession> |
getStatefulKnowledgeSessions()
Return a collection of the StatefulKnowledgeSessions that exist in this KnowledgeBase.
|
int |
hashCode() |
StatefulKnowledgeSession |
newStatefulKnowledgeSession()
Create a new StatefulKnowledgeSession using the default session configuration.
|
StatefulKnowledgeSession |
newStatefulKnowledgeSession(KnowledgeSessionConfiguration conf,
Environment environment)
Create a new StatefulKnowledgeSession using the given session configuration and/or environment.
|
StatelessKnowledgeSession |
newStatelessKnowledgeSession()
Create a new StatelessKnowledgeSession using the default session configuration.
|
StatelessKnowledgeSession |
newStatelessKnowledgeSession(KnowledgeSessionConfiguration conf)
Create a new StatelessKnowledgeSession using the given session configuration.
|
void |
readExternal(ObjectInput in) |
void |
removeEventListener(KnowledgeBaseEventListener listener)
Remove an event listener.
|
void |
removeFunction(String packageName,
String ruleName)
Remove a function from the specified package.
|
void |
removeKnowledgePackage(String packageName)
Remove a KnowledgePackage and all the definitions it contains from the KnowledgeBase.
|
void |
removeProcess(String processId)
Remove a process from the specified package.
|
void |
removeQuery(String packageName,
String queryName)
Remove a rule from the specified package.
|
void |
removeRule(String packageName,
String ruleName)
Remove a rule from the specified package.
|
void |
writeExternal(ObjectOutput out) |
public KnowledgeBaseAdapter()
public KnowledgeBaseAdapter(org.kie.internal.KnowledgeBase delegate)
public org.kie.internal.KnowledgeBase getDelegate()
public void addKnowledgePackages(Collection<KnowledgePackage> kpackages)
KnowledgeBaseaddKnowledgePackages in interface KnowledgeBasepublic Collection<KnowledgePackage> getKnowledgePackages()
KnowledgeBasegetKnowledgePackages in interface KnowledgeBasepublic KnowledgePackage getKnowledgePackage(String packageName)
KnowledgeBasegetKnowledgePackage in interface KnowledgeBasepackageName - the name of the KnowledgePackage to returnpublic void removeKnowledgePackage(String packageName)
KnowledgeBaseremoveKnowledgePackage in interface KnowledgeBasepublic Rule getRule(String packageName, String ruleName)
KnowledgeBasegetRule in interface KnowledgeBasepackageName - the package name to which the rule belongs to.ruleName - the name of the rule.public void removeRule(String packageName, String ruleName)
KnowledgeBaseremoveRule in interface KnowledgeBasepublic Query getQuery(String packageName, String queryName)
KnowledgeBasegetQuery in interface KnowledgeBasepackageName - the package name to which the rule belongs to.public void removeQuery(String packageName, String queryName)
KnowledgeBaseremoveQuery in interface KnowledgeBasepublic void removeFunction(String packageName, String ruleName)
KnowledgeBaseremoveFunction in interface KnowledgeBasepublic FactType getFactType(String packageName, String typeName)
KnowledgeBasegetFactType in interface KnowledgeBasepackageName - the name of the package the fact belongs to.typeName - the name of the type.public Process getProcess(String processId)
KnowledgeBasegetProcess in interface KnowledgeBaseprocessId - the id of the processpublic void removeProcess(String processId)
KnowledgeBaseremoveProcess in interface KnowledgeBasepublic Collection<Process> getProcesses()
getProcesses in interface KnowledgeBasepublic StatefulKnowledgeSession newStatefulKnowledgeSession(KnowledgeSessionConfiguration conf, Environment environment)
KnowledgeBasenewStatefulKnowledgeSession in interface KnowledgeBasepublic StatefulKnowledgeSession newStatefulKnowledgeSession()
KnowledgeBasenewStatefulKnowledgeSession in interface KnowledgeBasepublic Collection<StatefulKnowledgeSession> getStatefulKnowledgeSessions()
KnowledgeBasegetStatefulKnowledgeSessions in interface KnowledgeBasepublic StatelessKnowledgeSession newStatelessKnowledgeSession(KnowledgeSessionConfiguration conf)
KnowledgeBasenewStatelessKnowledgeSession in interface KnowledgeBasepublic StatelessKnowledgeSession newStatelessKnowledgeSession()
KnowledgeBasenewStatelessKnowledgeSession in interface KnowledgeBasepublic Set<String> getEntryPointIds()
KnowledgeBasegetEntryPointIds in interface KnowledgeBasepublic void addEventListener(KnowledgeBaseEventListener listener)
KnowledgeBaseEventManageraddEventListener in interface KnowledgeBaseEventManagerlistener - The listener to add.public void removeEventListener(KnowledgeBaseEventListener listener)
KnowledgeBaseEventManagerremoveEventListener in interface KnowledgeBaseEventManagerlistener - The listener to remove.public Collection<KnowledgeBaseEventListener> getKnowledgeBaseEventListeners()
KnowledgeBaseEventManagergetKnowledgeBaseEventListeners in interface KnowledgeBaseEventManagerpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2001–2016 JBoss by Red Hat. All rights reserved.