|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tolven.app.bean.AppEvalAdaptor
public class AppEvalAdaptor
When processing a transaction, this class provides a connection between the Rule engine and the application (menu data and menuStructure). It is account-specific and there should never be more than one per account. It can be reused for multiple transactions. This object needs to be tied to a session bean instance in order to work, it is not a session bean on its own.
| Constructor Summary | |
|---|---|
AppEvalAdaptor()
Constructor |
|
| Method Summary | |
|---|---|
void |
addProviderToPatientLink(java.lang.Long patientLinkId,
CopyTo copyTo)
|
PatientLink |
confirmPatientLink(MenuData patient,
java.lang.Long patientLinkId)
|
MenuData |
createMenuData(MenuStructure ms,
long documentId,
MenuData... parents)
Create a new menu data item given the menuStructure item |
MenuData |
createMenuData(java.lang.String path,
long documentId,
MenuData... parents)
Create a new menu data item given a path name. |
MenuData |
createPlaceholder(Act act,
MenuStructure msInstance,
MenuData mdParent01)
|
MenuData |
createPlaceholder(Act act,
MenuStructure msInstance,
MenuData mdParent01,
Status status)
Upon receiving a trim object, rules will probably want to create appropriate menuData placeholders (Trim instances). |
MenuData |
createPlaceholder(Act act,
java.lang.String path,
MenuData mdParent01)
|
MenuData |
createPlaceholder(Act act,
java.lang.String path,
MenuData mdParent01,
Status status)
|
MenuData |
createPlaceholder(Trim trim,
MenuStructure ms)
New version of createPlaceholder that also populates menuData |
MenuData |
createReferenceMD(MenuData mdPlaceholder,
MenuStructure ms)
|
MenuData |
createReferenceMD(MenuData mdPlaceholder,
MenuStructure ms,
Act act,
boolean ignoreDuplicates)
Create a reference to the specified placeholder. |
MenuData |
createReferenceMD(MenuData mdReferenced,
java.lang.String path)
Create a reference to the specified menuData item |
boolean |
equals(java.lang.Object obj)
Equality is the same as Account equality |
java.lang.Object |
evaluate(java.lang.String expression)
Evaluate the supplied expression and return the value. |
void |
finalize(DocXML docXML)
|
Plan |
findEmptyPlan(MenuData mdPlaceholder)
|
MenuData |
findMenuData(MenuStructure ms,
java.lang.String path)
Find the menuData item defined by the specified menuStructure and having the path as specified. |
MenuData |
findMenuData(SETIISlot ids)
Find a menuData item by looking at the id of the object |
MenuData |
findMenuDataItem(long id)
Return a menuData item by its id |
java.util.List<MenuData> |
findReferencingMDs(MenuData mdPlaceholder,
java.lang.String path)
Given a placeholder and a path to a list, find the item(s) in the list pointing to the placeholder. |
Account |
getAccount()
Return the account object associated with this running of the rules |
DocBase |
getDocument()
|
java.util.Date |
getNow()
|
java.lang.String |
getPersonName(Entity entity)
|
java.lang.String |
getRoleReference(ActEx act,
java.lang.String participationName,
java.lang.String fieldName)
|
java.lang.String |
getRootName()
The root path is available to prepend to other paths when needed. |
Account |
getSourceAccount()
|
int |
hashCode()
Hash is the same as Account hash |
void |
inboundScan(Trim trim)
An inbound scan prepares a trim for introduction into this account. |
void |
init(AccountDAOLocal accountDAOLocal,
MenuLocal menuBean,
DocumentLocal documentLocal,
ProviderLocal providerLocal,
CreatorLocal creatorBean,
ShareLocal shareBean,
org.drools.StatefulSession workingMemory)
Associate this object with working memory as a global and thus allowing callbacks. |
void |
initEL()
Initialize the ExpressionLanguage Evaluator It will do nothing if the context is already initialized. |
boolean |
isSaveTrim()
|
void |
outboundScan(Trim trim)
An outbound scan prepare a trim for the possibility that a reply will be received as a result of sending the message outbound. |
void |
persistMenuData(MenuData md)
Save a new MenuData item in the database. |
java.lang.String |
rebindPatient(java.lang.String internalId)
Rebind patient to local patient using patientLink info |
void |
removeReferencingMenuData(DocBase docBase)
Remove all menuData items that reference this document. |
void |
removeReferencingMenuData(DocBase docBase,
boolean removePlaceholders)
|
void |
removeReferencingMenuData(long documentId,
boolean removePlaceholders)
|
void |
removeReferencingMenuData(TolvenIdEx tolvenId)
Remove menuData specified in the passed in tolvenId |
void |
removeReplacedMenuData(TolvenIdEx tolvenId)
Remove menuData specified in the passed in tolvenId |
void |
runRules(TolvenMessage tm,
DocXML docXML,
TrimEx trim)
|
void |
send(CopyTo copyTo)
Send this document to another account. |
void |
send(Message message)
Send this document to another account. |
void |
sendToProvider(java.lang.Long providerId)
Send this document to another account. |
void |
setSaveTrim(boolean saveTrim)
|
void |
setupName(Entity person,
MenuData md)
Setup a MenuData item with the Entity Name |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AppEvalAdaptor()
| Method Detail |
|---|
public void init(AccountDAOLocal accountDAOLocal,
MenuLocal menuBean,
DocumentLocal documentLocal,
ProviderLocal providerLocal,
CreatorLocal creatorBean,
ShareLocal shareBean,
org.drools.StatefulSession workingMemory)
menuBean - a Menu beanwm - rule working memorypublic Plan findEmptyPlan(MenuData mdPlaceholder)
public void runRules(TolvenMessage tm,
DocXML docXML,
TrimEx trim)
public java.util.Date getNow()
public MenuData findMenuData(MenuStructure ms,
java.lang.String path)
ms - path -
public MenuData findMenuData(SETIISlot ids)
ids -
public MenuData findMenuDataItem(long id)
id -
public void initEL()
public java.lang.Object evaluate(java.lang.String expression)
#{trim.name}
expression -
public java.util.List<MenuData> findReferencingMDs(MenuData mdPlaceholder,
java.lang.String path)
ms - path -
public void removeReferencingMenuData(DocBase docBase)
docBase -
public void removeReferencingMenuData(DocBase docBase,
boolean removePlaceholders)
public void removeReferencingMenuData(long documentId,
boolean removePlaceholders)
public void removeReferencingMenuData(TolvenIdEx tolvenId)
tolvenId - public void removeReplacedMenuData(TolvenIdEx tolvenId)
tolvenId -
public void addProviderToPatientLink(java.lang.Long patientLinkId,
CopyTo copyTo)
public PatientLink confirmPatientLink(MenuData patient,
java.lang.Long patientLinkId)
public java.lang.String rebindPatient(java.lang.String internalId)
internalId -
public void setupName(Entity person,
MenuData md)
person - md - public java.lang.String getPersonName(Entity entity)
public void send(CopyTo copyTo)
throws java.lang.Exception
copyTo -
java.lang.Exceptionpublic void outboundScan(Trim trim)
ShareBeanpublic void inboundScan(Trim trim)
ShareBean
public void send(Message message)
throws java.lang.Exception
copyTo -
java.lang.Exception
public void sendToProvider(java.lang.Long providerId)
throws java.lang.Exception
copyTo -
java.lang.Exceptionpublic Account getAccount()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public MenuData createPlaceholder(Trim trim,
MenuStructure ms)
trim - ms -
public MenuData createPlaceholder(Act act,
java.lang.String path,
MenuData mdParent01)
public MenuData createPlaceholder(Act act,
MenuStructure msInstance,
MenuData mdParent01)
public MenuData createPlaceholder(Act act,
java.lang.String path,
MenuData mdParent01,
Status status)
public MenuData createPlaceholder(Act act,
MenuStructure msInstance,
MenuData mdParent01,
Status status)
public void finalize(DocXML docXML)
public MenuData createReferenceMD(MenuData mdPlaceholder,
MenuStructure ms,
Act act,
boolean ignoreDuplicates)
mdPlaceholder - The menu Item to be referencedpath - The path of the new itemmdPatient -
public MenuData createReferenceMD(MenuData mdPlaceholder,
MenuStructure ms)
public MenuData createReferenceMD(MenuData mdReferenced,
java.lang.String path)
mdReferenced - The menu Item to be referencedpath - The path of the new item
public java.lang.String getRoleReference(ActEx act,
java.lang.String participationName,
java.lang.String fieldName)
public MenuData createMenuData(MenuStructure ms,
long documentId,
MenuData... parents)
ms - documentId -
public MenuData createMenuData(java.lang.String path,
long documentId,
MenuData... parents)
path - documentId - The associated document or 0 if none.
public java.lang.String getRootName()
public void persistMenuData(MenuData md)
md - public DocBase getDocument()
public Account getSourceAccount()
public boolean isSaveTrim()
public void setSaveTrim(boolean saveTrim)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||