|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tolven.app.entity.MenuStructure
org.tolven.app.entity.UserMenuStructure
public class UserMenuStructure
An occurance of this object defines an item in an application menu structure. MenuStructure objects are defined within an account. Therefore, different accounts can have completely different menu structures.
MenuStructure objects are arranged in a hierarchy. Each object, except the root object, has a parent MenuStructure. This hierarchy is confined to a single account. Thus, a hierarchy cannot be used to span accounts and thus violate security partitioning. That said, the hierarchy can span sub-accounts within the top-level account.
A MenuStructure object not only defines how the menu looks on the screen, it can also define how the data for dynamic structures is acquired, generally in the form of rules.
The MenuData class defines occurances of menu structures when repeating is specified and/or if there is a rule that creates menu data. By definition, a MenuStructure for a repeating entity is a prototype and therefore only represents a usually invisible placeholder in the menu hierarchy. For example, defining a patient MenuStructure does not imply that there is a visible object on the screen unless there is actually a specific patient to be displayed. Conversely, a MenuStructure called Patients might very well be static, visible and represent a tab one can go to to see a list of patients. Therefore, the static "Patients" MenuStructure makes a good parent for the dynamic "patient placeholder" MenuStructure.
Dynamic (repeating) MenuStructures are represented by a key value. Nested structures may have more than one key value.
A Menustructure can also be static but not have a key value. For example, a "new activity" tab might carry an indication if there are any items to view or not thus saving the user the trouble of having to click the tab to find out of there is anything to do or not. And since saving time is so critical, it is usually better to maintain the indicator on such menus or tabs by rules that run in the background. Thus, the rules for a MenuStructure item can be run asynchronously. Later, the presentation of the pre-computed indicator is simply a matter of looking up the indicator, rather than running a potentially complex query while the user waits.
While each rule in a MenuStructure controls the MenuData associated with that MenuStructure, the individual rules are rolled up to the account. When any data associated with an account changes, the data element is asserted into the working memory of all the rules for that Account. Thus, a rule can potentially see every possible change to an Account. To organize this process, it may be appropriate to modularize the rule logic. For example, say an account gets lab results from a variety of sources in different formats. A rule collecting data from lab results could be quite tedious if it had to handle each lab format. Instead, two different kinds of rules should be created. The first kind simply reads a document and creates a new document in a normalized form. Each separate interface then had a rule that maps to it to this canonical form. The MenuStructure for such an object could be invisible if no one needs to see the raw messages. Then, one much simpler rule reacts the the creation of this new document type and populates the appropriate visible menu structure.
| Field Summary |
|---|
| Fields inherited from class org.tolven.app.entity.MenuStructure |
|---|
LOCALEPATH_COLUMN_PREFIX, LOCALEPATH_SEPARATOR, MENUPATH_SEPARATOR, VISIBLE_NEVER |
| Constructor Summary | |
|---|---|
UserMenuStructure()
|
|
UserMenuStructure(AccountUser accountuser,
AccountMenuStructure underlytingMS,
java.lang.String visible,
java.lang.Integer seq,
java.lang.Integer colnumber,
java.lang.String windowStyle,
java.lang.Integer numSummaryItems,
java.lang.String defaultpath,
java.lang.String interval)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
AccountMenuStructure |
findChild(java.lang.String node)
Find the first child containing the specified node name. |
AccountMenuStructure |
findDescendent(java.lang.String node)
Find the first child or child of child, etc containing the specified node name. |
Account |
getAccount()
|
AccountMenuStructure |
getAccountMenuStructure()
|
AccountUser |
getAccountuser()
|
java.util.List<MSAction> |
getActions()
Return a list of actions, sorted per sequence |
java.lang.String |
getAllowRoles()
|
java.util.Collection<AccountMenuStructure> |
getChildren()
|
java.lang.Integer |
getColumnNumber()
|
java.util.Collection<MSColumn> |
getColumns()
|
java.lang.String |
getDefaultPathSuffix()
|
java.lang.String |
getDenyRoles()
|
java.lang.Boolean |
getEnableBackButton()
|
java.lang.String |
getFilter()
The user should never be allowed to override the filter criteria. |
long |
getId()
|
java.lang.String |
getInitialSort()
|
java.lang.String |
getInterval()
|
int |
getLevel()
|
java.lang.String |
getMenuTemplate()
|
java.lang.String |
getNode()
|
java.lang.Integer |
getNumSummaryItems()
|
AccountMenuStructure |
getParent()
|
java.lang.String |
getPath()
|
java.lang.String |
getQuery()
|
AccountMenuStructure |
getReferenced()
When non-null, a "list" item refers to another MenuStructure item that actually contains the data. |
java.lang.String |
getRepeating()
|
java.lang.String |
getRole()
Depending on the template, this role helps determine where in the page this menu item occurs. |
AccountMenuStructure |
getRoot()
Get the root of this MenuStructure tree |
int |
getSequence()
|
java.util.List<AccountMenuStructure> |
getSortedChildren()
|
java.util.List<MSColumn> |
getSortedColumns()
|
java.lang.String |
getStyle()
|
java.lang.String |
getTemplate()
|
java.lang.String |
getText()
|
java.lang.String |
getTextOverride()
|
MenuStructure |
getUnderlyingMS()
|
java.lang.String |
getUniqueKey()
|
java.lang.String |
getVisible()
|
java.lang.String |
getWindowstyle()
|
int |
hashCode()
|
void |
setAccount(Account account)
|
void |
setAccountuser(AccountUser accountuser)
|
void |
setChildren(java.util.Collection<AccountMenuStructure> children)
|
void |
setColumnNumber(java.lang.Integer columnNumber)
|
void |
setDefaultPathSuffix(java.lang.String defaultPathSuffix)
|
void |
setEnableBackButton(java.lang.Boolean enableBackButton)
|
void |
setFilter(java.lang.String filter)
|
void |
setId(long id)
|
void |
setInitialSort(java.lang.String initialSort)
|
void |
setInterval(java.lang.String timelineInterval)
|
void |
setLevel(int level)
|
void |
setMenuTemplate(java.lang.String menuTemplate)
|
void |
setNode(java.lang.String node)
|
void |
setNumSummaryItems(java.lang.Integer numSummaryItems)
|
void |
setParent(AccountMenuStructure parent)
|
void |
setParent(MenuStructure parent)
|
void |
setPath(java.lang.String path)
Let the infrastructure set this attribute by following the parent/child hierarchy. |
void |
setQuery(java.lang.String query)
|
void |
setReferenced(AccountMenuStructure referenced)
|
void |
setReferenced(MenuStructure referenced)
|
void |
setRepeating(java.lang.String repeating)
|
void |
setRole(java.lang.String role)
|
void |
setSequence(int sequence)
|
void |
setSequence(java.lang.Integer sequence)
|
void |
setStyle(java.lang.String style)
|
void |
setTemplate(java.lang.String template)
|
void |
setText(java.lang.String text)
|
void |
setTextOverride(java.lang.String text)
|
void |
setUnderlyingMS(AccountMenuStructure underlyingMS)
|
void |
setUniqueKey(java.lang.String uniqueKey)
|
void |
setVisible(java.lang.String visible)
|
void |
setWindowstyle(java.lang.String windowstyle)
|
java.lang.String |
toString()
|
void |
UpdateDPSOfParent(AccountMenuStructure ms)
|
| Methods inherited from class org.tolven.app.entity.MenuStructure |
|---|
getDefaultLocaleText, getDefaultLocaleText, getLocaleText, getLocaleText, getLocaleTextKey, getRootApplication, getSortedList, getTemplateType |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UserMenuStructure()
public UserMenuStructure(AccountUser accountuser,
AccountMenuStructure underlytingMS,
java.lang.String visible,
java.lang.Integer seq,
java.lang.Integer colnumber,
java.lang.String windowStyle,
java.lang.Integer numSummaryItems,
java.lang.String defaultpath,
java.lang.String interval)
| Method Detail |
|---|
public long getId()
getId in class MenuStructurepublic void setId(long id)
setId in class MenuStructurepublic AccountUser getAccountuser()
public void setAccountuser(AccountUser accountuser)
public MenuStructure getUnderlyingMS()
public void setUnderlyingMS(AccountMenuStructure underlyingMS)
public void setDefaultPathSuffix(java.lang.String defaultPathSuffix)
setDefaultPathSuffix in class MenuStructurepublic AccountMenuStructure getRoot()
getRoot in class MenuStructurepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class MenuStructurepublic int hashCode()
hashCode in class MenuStructurepublic int getLevel()
getLevel in class MenuStructurepublic java.lang.String getNode()
getNode in class MenuStructurepublic java.lang.String getPath()
getPath in class MenuStructurepublic java.lang.String getQuery()
getQuery in class MenuStructurepublic void setQuery(java.lang.String query)
setQuery in class MenuStructurepublic java.lang.String getFilter()
getFilter in class MenuStructurepublic void setFilter(java.lang.String filter)
setFilter in class MenuStructurepublic java.lang.String getInitialSort()
getInitialSort in class MenuStructurepublic void setInitialSort(java.lang.String initialSort)
setInitialSort in class MenuStructurepublic java.util.List<MSAction> getActions()
getActions in class MenuStructurepublic int getSequence()
getSequence in class MenuStructurepublic java.lang.String getTemplate()
getTemplate in class MenuStructurepublic java.lang.String getRepeating()
getRepeating in class MenuStructurepublic java.lang.String getVisible()
getVisible in class MenuStructurepublic java.lang.String getText()
getText in class MenuStructurepublic java.lang.String getTextOverride()
getTextOverride in class MenuStructurepublic AccountMenuStructure getParent()
getParent in class MenuStructurepublic java.util.Collection<AccountMenuStructure> getChildren()
getChildren in class MenuStructurepublic java.util.List<AccountMenuStructure> getSortedChildren()
getSortedChildren in class MenuStructurepublic java.lang.String getRole()
getRole in class MenuStructurepublic java.lang.String getMenuTemplate()
getMenuTemplate in class MenuStructurepublic Account getAccount()
getAccount in class MenuStructurepublic java.util.Collection<MSColumn> getColumns()
getColumns in class MenuStructurepublic java.util.List<MSColumn> getSortedColumns()
getSortedColumns in class MenuStructurepublic AccountMenuStructure getReferenced()
When non-null, a "list" item refers to another MenuStructure item that actually contains the data. This allows a list to be moved around in the menu structure while the rule that populates the list always does do in a consistent place.
This also allows a list, such as a generic menu to be accessed from within, say, the patient context without requiring patient to be specified in the path
getReferenced in class MenuStructurepublic java.lang.String getDefaultPathSuffix()
getDefaultPathSuffix in class MenuStructurepublic java.lang.Boolean getEnableBackButton()
getEnableBackButton in class MenuStructurepublic void setVisible(java.lang.String visible)
setVisible in class MenuStructurepublic void setSequence(java.lang.Integer sequence)
public void UpdateDPSOfParent(AccountMenuStructure ms)
UpdateDPSOfParent in class MenuStructurepublic AccountMenuStructure findChild(java.lang.String node)
MenuStructure
findChild in class MenuStructurenode - Parent node to search
public AccountMenuStructure findDescendent(java.lang.String node)
MenuStructure
findDescendent in class MenuStructurenode - Node from which to begin search
public void setAccount(Account account)
setAccount in class MenuStructurepublic void setChildren(java.util.Collection<AccountMenuStructure> children)
setChildren in class MenuStructurepublic void setEnableBackButton(java.lang.Boolean enableBackButton)
setEnableBackButton in class MenuStructurepublic void setLevel(int level)
setLevel in class MenuStructurepublic void setMenuTemplate(java.lang.String menuTemplate)
setMenuTemplate in class MenuStructurepublic void setNode(java.lang.String node)
setNode in class MenuStructurepublic void setParent(AccountMenuStructure parent)
setParent in class MenuStructurepublic void setParent(MenuStructure parent)
setParent in class MenuStructurepublic void setPath(java.lang.String path)
MenuStructure
setPath in class MenuStructurepublic void setReferenced(AccountMenuStructure referenced)
setReferenced in class MenuStructurepublic void setReferenced(MenuStructure referenced)
setReferenced in class MenuStructurepublic void setRepeating(java.lang.String repeating)
setRepeating in class MenuStructurepublic void setRole(java.lang.String role)
setRole in class MenuStructurepublic void setSequence(int sequence)
setSequence in class MenuStructurepublic void setTemplate(java.lang.String template)
setTemplate in class MenuStructurepublic void setText(java.lang.String text)
setText in class MenuStructurepublic void setTextOverride(java.lang.String text)
setTextOverride in class MenuStructurepublic AccountMenuStructure getAccountMenuStructure()
getAccountMenuStructure in class MenuStructurepublic java.lang.Integer getColumnNumber()
getColumnNumber in class MenuStructurepublic void setColumnNumber(java.lang.Integer columnNumber)
setColumnNumber in class MenuStructurepublic java.lang.String getWindowstyle()
getWindowstyle in class MenuStructurepublic void setWindowstyle(java.lang.String windowstyle)
public java.lang.Integer getNumSummaryItems()
getNumSummaryItems in class MenuStructurepublic void setNumSummaryItems(java.lang.Integer numSummaryItems)
public java.lang.String getAllowRoles()
getAllowRoles in class MenuStructurepublic java.lang.String getDenyRoles()
getDenyRoles in class MenuStructurepublic java.lang.String getInterval()
getInterval in class MenuStructurepublic void setInterval(java.lang.String timelineInterval)
setInterval in class MenuStructurepublic java.lang.String getStyle()
getStyle in class MenuStructurepublic void setStyle(java.lang.String style)
setStyle in class MenuStructurepublic java.lang.String getUniqueKey()
getUniqueKey in class MenuStructurepublic void setUniqueKey(java.lang.String uniqueKey)
setUniqueKey in class MenuStructure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||