public class DefaultKnowledgeHelper<T extends ModedAssertion<T>> extends Object implements KnowledgeHelper, Externalizable
Constructor and Description |
---|
DefaultKnowledgeHelper() |
DefaultKnowledgeHelper(Activation activation,
WorkingMemory workingMemory) |
DefaultKnowledgeHelper(WorkingMemory workingMemory) |
Modifier and Type | Method and Description |
---|---|
void |
blockMatch(org.kie.api.runtime.rule.Match act) |
void |
cancelMatch(org.kie.api.runtime.rule.Match act) |
void |
cancelRemainingPreviousLogicalDependencies() |
protected <T> void |
configureTrait(T thing,
Object value) |
void |
delete(org.kie.api.runtime.rule.FactHandle handle) |
void |
delete(Object object) |
<T,K> T |
don(K core,
Class<T> trait) |
<T,K> T |
don(K core,
Class<T> trait,
boolean logical) |
<T,K> T |
don(K core,
Class<T> trait,
boolean logical,
org.kie.internal.runtime.beliefs.Mode... modes) |
<T,K> T |
don(K core,
Class<T> trait,
org.kie.internal.runtime.beliefs.Mode... modes) |
<T,K> T |
don(K core,
Collection<Class<? extends Thing>> traits) |
<T,K> T |
don(K core,
Collection<Class<? extends Thing>> traits,
boolean logical) |
<T,K> T |
don(K core,
Collection<Class<? extends Thing>> traits,
boolean logical,
org.kie.internal.runtime.beliefs.Mode... modes) |
<T,K> T |
don(K core,
Collection<Class<? extends Thing>> traits,
org.kie.internal.runtime.beliefs.Mode... modes) |
<T,K> T |
don(Thing<K> core,
Class<T> trait) |
<T,K> T |
don(Thing<K> core,
Class<T> trait,
boolean logical) |
<T,K> T |
don(Thing<K> core,
Class<T> trait,
boolean logical,
org.kie.internal.runtime.beliefs.Mode... modes) |
<T,K> T |
don(Thing<K> core,
Class<T> trait,
org.kie.internal.runtime.beliefs.Mode... modes) |
Object |
get(Declaration declaration) |
org.kie.api.runtime.Channel |
getChannel(String id) |
Map<String,org.kie.api.runtime.Channel> |
getChannels() |
<T> T |
getContext(Class<T> contextClass) |
Declaration |
getDeclaration(String identifier) |
org.kie.api.runtime.rule.EntryPoint |
getEntryPoint(String id) |
org.kie.api.runtime.rule.FactHandle |
getFactHandle(org.kie.api.runtime.rule.FactHandle handle) |
org.kie.api.runtime.rule.FactHandle |
getFactHandle(Object object) |
IdentityHashMap<Object,org.kie.api.runtime.rule.FactHandle> |
getIdentityMap() |
org.kie.api.runtime.KieRuntime |
getKieRuntime() |
org.kie.internal.runtime.KnowledgeRuntime |
getKnowledgeRuntime() |
Activation |
getMatch() |
LinkedList<LogicalDependency<T>> |
getpreviousJustified() |
RuleImpl |
getRule() |
Tuple |
getTuple() |
WorkingMemory |
getWorkingMemory() |
void |
halt() |
org.kie.api.runtime.rule.FactHandle |
insert(Object object)
Asserts an object
|
org.kie.api.runtime.rule.FactHandle |
insert(Object object,
boolean dynamic)
Asserts an object specifying that it implement the onPropertyChange
listener
|
void |
insertLogical(Object object) |
void |
insertLogical(Object object,
boolean dynamic) |
void |
insertLogical(Object object,
org.kie.internal.runtime.beliefs.Mode... beliefs) |
void |
insertLogical(Object object,
org.kie.internal.runtime.beliefs.Mode belief) |
void |
insertLogical(Object object,
Object value) |
void |
insertLogical(Object object,
Object value,
boolean dynamic) |
protected <K> ClassDefinition |
lookupClassDefinition(K core) |
org.kie.api.runtime.rule.FactHandle |
lookupFactHandle(Object object) |
void |
modify(Object newObject) |
void |
readExternal(ObjectInput in) |
void |
reset() |
void |
retract(org.kie.api.runtime.rule.FactHandle handle) |
void |
retract(Object object) |
void |
setActivation(Activation agendaItem) |
void |
setFocus(String focus) |
void |
setIdentityMap(IdentityHashMap<Object,org.kie.api.runtime.rule.FactHandle> identityMap) |
<T,K> Thing<K> |
shed(Thing<K> thing,
Class<T> trait) |
<T,K,X extends TraitableBean> |
shed(TraitableBean<K,X> core,
Class<T> trait) |
void |
unblockAllMatches(org.kie.api.runtime.rule.Match act) |
void |
update(org.kie.api.runtime.rule.FactHandle handle) |
void |
update(org.kie.api.runtime.rule.FactHandle handle,
BitMask mask,
Class<?> modifiedClass) |
void |
update(org.kie.api.runtime.rule.FactHandle handle,
Object newObject) |
void |
update(Object object) |
void |
update(Object object,
BitMask mask,
Class<?> modifiedClass) |
void |
writeExternal(ObjectOutput out) |
public DefaultKnowledgeHelper()
public DefaultKnowledgeHelper(WorkingMemory workingMemory)
public DefaultKnowledgeHelper(Activation activation, WorkingMemory workingMemory)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void setActivation(Activation agendaItem)
setActivation
in interface KnowledgeHelper
public void reset()
reset
in interface KnowledgeHelper
public LinkedList<LogicalDependency<T>> getpreviousJustified()
public void blockMatch(org.kie.api.runtime.rule.Match act)
blockMatch
in interface org.kie.api.runtime.rule.RuleContext
public void unblockAllMatches(org.kie.api.runtime.rule.Match act)
unblockAllMatches
in interface org.kie.api.runtime.rule.RuleContext
public org.kie.api.runtime.rule.FactHandle insert(Object object)
KnowledgeHelper
insert
in interface KnowledgeHelper
object
- -
the object to be assertedpublic org.kie.api.runtime.rule.FactHandle insert(Object object, boolean dynamic)
KnowledgeHelper
insert
in interface KnowledgeHelper
object
- -
the object to be asserteddynamic
- -
specifies the object implements onPropertyChangeListenerpublic void insertLogical(Object object, org.kie.internal.runtime.beliefs.Mode belief)
insertLogical
in interface KnowledgeHelper
public void insertLogical(Object object, org.kie.internal.runtime.beliefs.Mode... beliefs)
insertLogical
in interface KnowledgeHelper
public void insertLogical(Object object)
insertLogical
in interface KnowledgeHelper
insertLogical
in interface org.kie.api.runtime.rule.RuleContext
public void insertLogical(Object object, boolean dynamic)
insertLogical
in interface KnowledgeHelper
public void insertLogical(Object object, Object value)
insertLogical
in interface org.kie.api.runtime.rule.RuleContext
public void cancelRemainingPreviousLogicalDependencies()
cancelRemainingPreviousLogicalDependencies
in interface KnowledgeHelper
public void cancelMatch(org.kie.api.runtime.rule.Match act)
cancelMatch
in interface org.kie.api.runtime.rule.RuleContext
public org.kie.api.runtime.rule.FactHandle lookupFactHandle(Object object)
public org.kie.api.runtime.rule.FactHandle getFactHandle(Object object)
getFactHandle
in interface KnowledgeHelper
public org.kie.api.runtime.rule.FactHandle getFactHandle(org.kie.api.runtime.rule.FactHandle handle)
getFactHandle
in interface KnowledgeHelper
public void update(org.kie.api.runtime.rule.FactHandle handle, Object newObject)
update
in interface KnowledgeHelper
public void update(org.kie.api.runtime.rule.FactHandle handle)
update
in interface KnowledgeHelper
public void update(org.kie.api.runtime.rule.FactHandle handle, BitMask mask, Class<?> modifiedClass)
update
in interface KnowledgeHelper
public void update(Object object)
update
in interface KnowledgeHelper
public void update(Object object, BitMask mask, Class<?> modifiedClass)
update
in interface KnowledgeHelper
public void retract(Object object)
retract
in interface KnowledgeHelper
public void retract(org.kie.api.runtime.rule.FactHandle handle)
retract
in interface KnowledgeHelper
public void delete(Object object)
delete
in interface KnowledgeHelper
public void delete(org.kie.api.runtime.rule.FactHandle handle)
delete
in interface KnowledgeHelper
public RuleImpl getRule()
getRule
in interface KnowledgeHelper
getRule
in interface org.kie.api.runtime.rule.RuleContext
public Tuple getTuple()
getTuple
in interface KnowledgeHelper
public WorkingMemory getWorkingMemory()
getWorkingMemory
in interface KnowledgeHelper
public org.kie.internal.runtime.KnowledgeRuntime getKnowledgeRuntime()
getKnowledgeRuntime
in interface org.kie.api.runtime.KieContext
public Activation getMatch()
getMatch
in interface KnowledgeHelper
getMatch
in interface org.kie.api.runtime.rule.RuleContext
public void setFocus(String focus)
setFocus
in interface KnowledgeHelper
public Object get(Declaration declaration)
get
in interface KnowledgeHelper
public Declaration getDeclaration(String identifier)
getDeclaration
in interface KnowledgeHelper
public void halt()
halt
in interface KnowledgeHelper
public org.kie.api.runtime.rule.EntryPoint getEntryPoint(String id)
getEntryPoint
in interface KnowledgeHelper
public org.kie.api.runtime.Channel getChannel(String id)
getChannel
in interface KnowledgeHelper
public Map<String,org.kie.api.runtime.Channel> getChannels()
getChannels
in interface KnowledgeHelper
public IdentityHashMap<Object,org.kie.api.runtime.rule.FactHandle> getIdentityMap()
getIdentityMap
in interface KnowledgeHelper
public void setIdentityMap(IdentityHashMap<Object,org.kie.api.runtime.rule.FactHandle> identityMap)
setIdentityMap
in interface KnowledgeHelper
identityMap
- the identityMap to setpublic <T> T getContext(Class<T> contextClass)
getContext
in interface KnowledgeHelper
public void modify(Object newObject)
modify
in interface KnowledgeHelper
public org.kie.api.runtime.KieRuntime getKieRuntime()
getKieRuntime
in interface org.kie.api.runtime.KieContext
protected <K> ClassDefinition lookupClassDefinition(K core)
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(Thing<K> core, Class<T> trait, org.kie.internal.runtime.beliefs.Mode... modes)
don
in interface KnowledgeHelper
public <T,K> T don(Thing<K> core, Class<T> trait, boolean logical, org.kie.internal.runtime.beliefs.Mode... modes)
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> T don(K core, Collection<Class<? extends Thing>> traits)
don
in interface KnowledgeHelper
public <T,K> Thing<K> shed(Thing<K> thing, Class<T> trait)
shed
in interface KnowledgeHelper
public <T,K> T don(K core, Collection<Class<? extends Thing>> traits, org.kie.internal.runtime.beliefs.Mode... modes)
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, Collection<Class<? extends Thing>> traits, boolean logical, org.kie.internal.runtime.beliefs.Mode... modes)
public <T,K> T don(K core, Class<T> trait, boolean logical)
don
in interface KnowledgeHelper
public <T,K> T don(K core, Class<T> trait, org.kie.internal.runtime.beliefs.Mode... modes)
don
in interface KnowledgeHelper
public <T,K> T don(K core, Class<T> trait, boolean logical, org.kie.internal.runtime.beliefs.Mode... modes)
public <T,K,X extends TraitableBean> Thing<K> shed(TraitableBean<K,X> core, Class<T> trait)
shed
in interface KnowledgeHelper
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.