|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.base.DefaultKnowledgeHelper
public class DefaultKnowledgeHelper
| Constructor Summary | |
|---|---|
DefaultKnowledgeHelper()
|
|
DefaultKnowledgeHelper(Activation activation,
WorkingMemory workingMemory)
|
|
DefaultKnowledgeHelper(WorkingMemory workingMemory)
|
|
| Method Summary | ||
|---|---|---|
protected
|
applyManyTraits(K core,
Collection<Class<? extends Thing>> traits,
Object value,
boolean logical)
|
|
protected
|
applyTrait(K core,
Class<T> trait,
Object value,
boolean logical)
|
|
protected
|
asTraitable(K core,
TraitFactory builder)
|
|
void |
blockActivation(org.drools.runtime.rule.Activation act)
|
|
void |
cancelActivation(org.drools.runtime.rule.Activation act)
|
|
void |
cancelRemainingPreviousLogicalDependencies()
|
|
protected
|
configureTrait(T thing,
Object value)
|
|
protected
|
doInsertTrait(T thing,
Object core,
boolean logical,
BitSet boundary)
|
|
|
don(K core,
Class<T> trait)
|
|
|
don(K core,
Class<T> trait,
boolean logical)
|
|
|
don(K core,
Collection<Class<? extends Thing>> traits)
|
|
|
don(K core,
Collection<Class<? extends Thing>> traits,
boolean logical)
|
|
|
don(Thing<K> core,
Class<T> trait)
|
|
|
don(Thing<K> core,
Class<T> trait,
boolean logical)
|
|
Object |
get(Declaration declaration)
|
|
Activation |
getActivation()
|
|
org.drools.runtime.Channel |
getChannel(String id)
|
|
Map<String,org.drools.runtime.Channel> |
getChannels()
|
|
|
getContext(Class<T> contextClass)
|
|
Declaration |
getDeclaration(String identifier)
|
|
org.drools.runtime.rule.WorkingMemoryEntryPoint |
getEntryPoint(String id)
|
|
Map<String,org.drools.runtime.rule.WorkingMemoryEntryPoint> |
getEntryPoints()
|
|
org.drools.runtime.ExitPoint |
getExitPoint(String id)
Deprecated. use getChannel(String) instead |
|
Map<String,org.drools.runtime.ExitPoint> |
getExitPoints()
Deprecated. use getChannels() instead |
|
FactHandle |
getFactHandle(FactHandle handle)
|
|
FactHandle |
getFactHandle(Object object)
|
|
IdentityHashMap<Object,FactHandle> |
getIdentityMap()
|
|
org.drools.runtime.KnowledgeRuntime |
getKnowledgeRuntime()
|
|
Rule |
getRule()
|
|
protected Collection<Key<Thing>> |
getTraitBoundary(TraitableBean inner,
boolean needsProxy,
boolean hasTrait,
Class trait)
|
|
Tuple |
getTuple()
|
|
WorkingMemory |
getWorkingMemory()
|
|
void |
halt()
|
|
void |
insert(Object object)
Asserts an object, notice that it does not return the FactHandle |
|
void |
insert(Object object,
boolean dynamic)
Asserts an object specifying that it implement the onPropertyChange listener, notice that it does not return the FactHandle. |
|
void |
insertLogical(Object object)
|
|
void |
insertLogical(Object object,
boolean dynamic)
|
|
void |
insertLogical(Object object,
Object value)
|
|
void |
insertLogical(Object object,
Object value,
boolean dynamic)
|
|
protected
|
lookupClassDefinition(K core)
|
|
FactHandle |
lookupFactHandle(Object object)
|
|
void |
modify(Object newObject)
|
|
void |
readExternal(ObjectInput in)
|
|
void |
reset()
|
|
void |
retract(FactHandle handle)
|
|
void |
retract(Object object)
|
|
void |
setActivation(Activation agendaItem)
|
|
void |
setFocus(String focus)
|
|
void |
setIdentityMap(IdentityHashMap<Object,FactHandle> identityMap)
|
|
|
shed(Thing<K> thing,
Class<T> trait)
|
|
|
shed(TraitableBean<K,X> core,
Class<T> trait)
|
|
void |
unblockAllActivations(org.drools.runtime.rule.Activation act)
|
|
void |
update(FactHandle handle)
|
|
void |
update(FactHandle handle,
long mask,
Class<?> modifiedClass)
|
|
void |
update(FactHandle handle,
Object newObject)
|
|
void |
update(Object object)
|
|
void |
update(Object object,
long mask,
Class<?> modifiedClass)
|
|
void |
writeExternal(ObjectOutput out)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultKnowledgeHelper()
public DefaultKnowledgeHelper(WorkingMemory workingMemory)
public DefaultKnowledgeHelper(Activation activation,
WorkingMemory workingMemory)
| Method Detail |
|---|
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void setActivation(Activation agendaItem)
setActivation in interface KnowledgeHelperpublic void reset()
reset in interface KnowledgeHelperpublic void blockActivation(org.drools.runtime.rule.Activation act)
blockActivation in interface org.drools.runtime.rule.RuleContextpublic void unblockAllActivations(org.drools.runtime.rule.Activation act)
unblockAllActivations in interface org.drools.runtime.rule.RuleContextpublic void insert(Object object)
KnowledgeHelper
insert in interface KnowledgeHelperobject - -
the object to be asserted
public void insert(Object object,
boolean dynamic)
throws FactException
KnowledgeHelper
insert in interface KnowledgeHelperobject - -
the object to be asserteddynamic - -
specifies the object implements onPropertyChangeListener
FactExceptionpublic void insertLogical(Object object)
insertLogical in interface org.drools.runtime.rule.RuleContextinsertLogical in interface KnowledgeHelper
public void insertLogical(Object object,
boolean dynamic)
insertLogical in interface KnowledgeHelper
public void insertLogical(Object object,
Object value)
insertLogical in interface org.drools.runtime.rule.RuleContext
public void insertLogical(Object object,
Object value,
boolean dynamic)
public void cancelRemainingPreviousLogicalDependencies()
cancelRemainingPreviousLogicalDependencies in interface KnowledgeHelperpublic void cancelActivation(org.drools.runtime.rule.Activation act)
cancelActivation in interface org.drools.runtime.rule.RuleContextpublic FactHandle lookupFactHandle(Object object)
public FactHandle getFactHandle(Object object)
getFactHandle in interface KnowledgeHelperpublic FactHandle getFactHandle(FactHandle handle)
getFactHandle in interface KnowledgeHelper
public void update(FactHandle handle,
Object newObject)
update in interface KnowledgeHelperpublic void update(FactHandle handle)
update in interface KnowledgeHelper
public void update(FactHandle handle,
long mask,
Class<?> modifiedClass)
update in interface KnowledgeHelperpublic void update(Object object)
update in interface KnowledgeHelper
public void update(Object object,
long mask,
Class<?> modifiedClass)
update in interface KnowledgeHelperpublic void retract(Object object)
retract in interface KnowledgeHelperpublic void retract(FactHandle handle)
retract in interface KnowledgeHelperpublic Rule getRule()
getRule in interface org.drools.runtime.rule.RuleContextgetRule in interface KnowledgeHelperpublic Tuple getTuple()
getTuple in interface KnowledgeHelperpublic WorkingMemory getWorkingMemory()
getWorkingMemory in interface KnowledgeHelperpublic org.drools.runtime.KnowledgeRuntime getKnowledgeRuntime()
getKnowledgeRuntime in interface org.drools.runtime.KnowledgeContextpublic Activation getActivation()
getActivation in interface org.drools.runtime.rule.RuleContextgetActivation in interface KnowledgeHelperpublic void setFocus(String focus)
setFocus in interface KnowledgeHelperpublic Object get(Declaration declaration)
get in interface KnowledgeHelperpublic Declaration getDeclaration(String identifier)
getDeclaration in interface KnowledgeHelperpublic void halt()
halt in interface KnowledgeHelperpublic org.drools.runtime.rule.WorkingMemoryEntryPoint getEntryPoint(String id)
getEntryPoint in interface KnowledgeHelper@Deprecated public org.drools.runtime.ExitPoint getExitPoint(String id)
getChannel(String) instead
getExitPoint in interface KnowledgeHelperpublic org.drools.runtime.Channel getChannel(String id)
getChannel in interface KnowledgeHelperpublic Map<String,org.drools.runtime.rule.WorkingMemoryEntryPoint> getEntryPoints()
getEntryPoints in interface KnowledgeHelper@Deprecated public Map<String,org.drools.runtime.ExitPoint> getExitPoints()
getChannels() instead
getExitPoints in interface KnowledgeHelperpublic Map<String,org.drools.runtime.Channel> getChannels()
getChannels in interface KnowledgeHelperpublic IdentityHashMap<Object,FactHandle> getIdentityMap()
getIdentityMap in interface KnowledgeHelperpublic void setIdentityMap(IdentityHashMap<Object,FactHandle> identityMap)
setIdentityMap in interface KnowledgeHelperidentityMap - the identityMap to setpublic <T> T getContext(Class<T> contextClass)
getContext in interface KnowledgeHelper
public <T,K> T don(K core,
Collection<Class<? extends Thing>> traits)
don in interface KnowledgeHelper
public <T,K> T don(K core,
Collection<Class<? extends Thing>> traits,
boolean logical)
don in interface KnowledgeHelper
public <T,K> T don(K core,
Class<T> trait,
boolean logical)
don in interface KnowledgeHelper
protected <T> T doInsertTrait(T thing,
Object core,
boolean logical,
BitSet boundary)
protected <K> TraitableBean<K,CoreWrapper<K>> asTraitable(K core,
TraitFactory builder)
protected <K> ClassDefinition lookupClassDefinition(K core)
protected <T,K> T applyManyTraits(K core,
Collection<Class<? extends Thing>> traits,
Object value,
boolean logical)
throws LogicalTypeInconsistencyException
LogicalTypeInconsistencyException
protected <T,K> T applyTrait(K core,
Class<T> trait,
Object value,
boolean logical)
throws LogicalTypeInconsistencyException
LogicalTypeInconsistencyException
protected Collection<Key<Thing>> getTraitBoundary(TraitableBean inner,
boolean needsProxy,
boolean hasTrait,
Class trait)
protected <T> void configureTrait(T thing,
Object value)
public <T,K> T don(Thing<K> core,
Class<T> trait,
boolean logical)
don in interface KnowledgeHelper
public <T,K> T don(K core,
Class<T> trait)
don in interface KnowledgeHelper
public <T,K> T don(Thing<K> core,
Class<T> trait)
don in interface KnowledgeHelper
public <T,K> Thing<K> shed(Thing<K> thing,
Class<T> trait)
shed in interface KnowledgeHelper
public <T,K,X extends TraitableBean> Thing<K> shed(TraitableBean<K,X> core,
Class<T> trait)
shed in interface KnowledgeHelperpublic void modify(Object newObject)
modify in interface KnowledgeHelper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||