|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.ooql.sdk.OBBase com.oberon.ooql.sdk.AdminBase com.oberon.ooql.sdk.Menu
public class Menu
Menu Admin Object: defines menu structures for web/client applications
Field Summary | |
---|---|
static int |
APPLICATION_OPTION
The Application flag index inside the Option Set |
static int |
PORTFOLIO_OPTION
The Portfolio flag index inside the Option Set |
Fields inherited from class com.oberon.ooql.sdk.AdminBase |
---|
bsOptions, HIDDEN_OPTION |
Constructor Summary | |
---|---|
Menu()
|
|
Menu(java.lang.String name)
|
Method Summary | |
---|---|
void |
addCommand(java.lang.String commandName)
Add(append) a Command |
void |
addCommandAfter(java.lang.String commandName,
java.lang.String refChild)
Add a Command after a reference sub-Menu or command |
void |
addCommandBefore(java.lang.String commandName,
java.lang.String refChild)
Add a Command before a reference sub-Menu or command |
void |
addSubMenu(java.lang.String menuName)
Add(append) a sub-Menu |
void |
addSubMenuAfter(java.lang.String menuName,
java.lang.String refChild)
Add a sub-Menu after a reference sub-Menu or Command |
void |
addSubMenuBefore(java.lang.String menuName,
java.lang.String refChild)
Add a sub-Menu before a reference sub-Menu or Command |
java.lang.String |
compareUpdate(Menu refMenu,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
Return/apply the OOQL command to update this Menu object and let it become equals to another reference object. |
void |
create(boolean force,
Framework framework)
Create a new Menu object on the database |
void |
create(Framework framework)
Create a new Menu object on the database |
void |
destroy(Framework framework)
Remove the Menu object from the database. |
void |
fromXML(org.jdom.Element rootElement)
Load the Menu object from XML element tree |
java.util.Vector<java.lang.String> |
getActionNames(java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get the available MenuItem s according to framework user rights |
java.util.Vector<MenuItem> |
getActions(java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get the available MenuItem s according to framework user rights |
java.lang.String |
getAlt()
Get the Menu tip (html alt). |
static java.util.Vector<java.lang.String> |
getApplications(Framework framework)
Get all application Menus |
java.util.Vector<java.lang.String> |
getCommands(Framework framework)
Get all sub-Commands |
java.lang.String |
getCommandsAsString(java.lang.String delim,
Framework framework)
Get all sub- Command names as string |
java.lang.String |
getCreateCommand(boolean force)
Return the OOQL command to create this Menu object with the settled properties |
java.lang.String |
getHRef()
Get the web page link |
java.lang.String |
getLabel()
Get the Menu label. |
java.util.Vector<java.lang.String> |
getOwnChilds()
Get own Childs. |
java.lang.String |
getOwnChildsAsString(java.lang.String delim)
Get own child (sub-Menu and Command ) names as string. |
java.util.Vector<java.lang.String> |
getOwnCommands()
Get own sub Commands |
java.lang.String |
getOwnCommandsAsString(java.lang.String delim)
Get own Command names as string |
java.util.Vector<java.lang.String> |
getOwnSubMenus()
Get own sub-Menus |
java.lang.String |
getOwnSubMenusAsString(java.lang.String delim)
Get own sub-Menu names as string |
java.lang.String |
getProperty(java.lang.String propertyName,
java.util.Vector<java.lang.Object> filterArgs,
java.lang.String token,
Framework framework)
Get a property for this Menu object by its OOQL identifier |
java.lang.String |
getSaveCommand(boolean force)
Return the OOQL command to update this Menu object with the modified properties. |
java.util.Vector<java.lang.String> |
getSubMenus(Framework framework)
Get all sub Menus |
java.lang.String |
getSubMenusAsString(java.lang.String delim,
Framework framework)
Get all sub-Menu names as string |
java.util.Vector<java.lang.String> |
getSuperMenus(Framework framework)
Get all parent Menus |
java.lang.String |
getSuperMenusAsString(java.lang.String delim,
Framework framework)
Get all parent Menus as string |
java.util.Vector<?> |
getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Return a Vector of administrative object names extracted by using an OOQL selector |
boolean |
isApplication()
Check if the Menu is an application. |
boolean |
isPortfolio()
Check if the Menu is a portfolio (set of applications) |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the Menu object: connect the memory instance with the database instance |
void |
moveCommand(java.lang.String commandName,
boolean after)
Move a Command |
void |
moveSubMenu(java.lang.String menuName,
boolean after)
Move a sub-Menu |
static Menu |
open(java.lang.String name,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open an administrative object and read properties from the database or retrieve them from memory |
void |
removeCommand(java.lang.String commandName)
Remove a Command |
void |
removeSubMenu(java.lang.String menuName)
Remove a sub-Menu |
void |
setAlt(java.lang.String altTip)
Set the Menu tip (html alt). |
void |
setApplication(boolean applicationFlag)
Set the application flag for this Menu. |
void |
setHRef(java.lang.String url)
Set the web page link for this Menu. |
void |
setLabel(java.lang.String label)
Set the Menu label. |
void |
setPortfolio(boolean portfolioFlag)
Set the portfolio flag for this Menu. |
java.lang.String |
toString()
Return the Menu object basic properties as a single String |
java.lang.String |
toString(Framework framework)
Return the Menu object extended properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the Menu object properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the Menu object properties as XML element tree |
void |
unlink(Framework framework)
Close the object: disconnect the memory instance from the database instance |
void |
updateChilds(java.util.Vector<java.lang.String> childs)
Update the submenus / commands on the basis of a given list |
void |
write(boolean force,
Framework framework)
Update the Menu object to the database |
void |
write(Framework framework)
Update the Menu object to the database |
Methods inherited from class com.oberon.ooql.sdk.OBBase |
---|
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int APPLICATION_OPTION
public static final int PORTFOLIO_OPTION
Constructor Detail |
---|
public Menu()
public Menu(java.lang.String name) throws OberonException
name
- the name of the administrative object
OberonException
- if the name contains invalid charactersMethod Detail |
---|
public static Menu open(java.lang.String name, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
name
- the object nameframework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic void link(Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
link
in class AdminBase
framework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic void create(Framework framework) throws OberonException
create
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void create(boolean force, Framework framework) throws OberonException
force
- if true ignores optional featuresframework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void write(Framework framework) throws OberonException
write
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void write(boolean force, Framework framework) throws OberonException
force
- if true ignores optional featuresframework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void unlink(Framework framework) throws OberonException
unlink
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void destroy(Framework framework) throws OberonException
destroy
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void setApplication(boolean applicationFlag)
applicationFlag
- true to define the Menu as applicationpublic boolean isApplication()
public void setPortfolio(boolean portfolioFlag)
portfolioFlag
- true to define the Menu as portfolio (set of applications)public boolean isPortfolio()
public void setHRef(java.lang.String url)
Feature
s
url
- the http url (example: /myfolder/mypage.jsp)public java.lang.String getHRef()
public void setAlt(java.lang.String altTip)
altTip
- the alt tippublic java.lang.String getAlt()
public void setLabel(java.lang.String label)
label
- the label valuepublic java.lang.String getLabel()
public java.util.Vector<java.lang.String> getSubMenus(Framework framework)
public java.lang.String getSubMenusAsString(java.lang.String delim, Framework framework)
delim
- the name separatorframework
- the current frameworkpublic void addSubMenu(java.lang.String menuName)
menuName
- the sub-Menu namepublic void addSubMenuBefore(java.lang.String menuName, java.lang.String refChild) throws OberonException
menuName
- the sub-Menu namerefChild
- the reference sub-Menu or Command
name
OberonException
- when the reference sub-Menu or Command is not foundpublic void addSubMenuAfter(java.lang.String menuName, java.lang.String refChild) throws OberonException
menuName
- the sub-Menu namerefChild
- the reference sub-Menu or Command
name
OberonException
- when the reference sub-Menu or Command is not foundpublic void moveSubMenu(java.lang.String menuName, boolean after)
menuName
- the sub-Menu nameafter
- if true move the sub-Menu after else move it before the current positionpublic void removeSubMenu(java.lang.String menuName)
public java.util.Vector<java.lang.String> getOwnSubMenus()
public java.lang.String getOwnSubMenusAsString(java.lang.String delim)
delim
- the name separatorpublic java.util.Vector<java.lang.String> getCommands(Framework framework)
Command
elementspublic java.lang.String getCommandsAsString(java.lang.String delim, Framework framework)
Command
names as string
delim
- the name separatorframework
- the current frameworkpublic void addCommand(java.lang.String commandName)
commandName
- the Command
namepublic void addCommandBefore(java.lang.String commandName, java.lang.String refChild) throws OberonException
commandName
- the Command
namerefChild
- the reference sub-Menu or Command name
OberonException
- when the reference sub-Menu or Command is not foundpublic void addCommandAfter(java.lang.String commandName, java.lang.String refChild) throws OberonException
commandName
- the Command
namerefChild
- the reference sub-Menu or Command name
OberonException
- when the reference sub-Menu or Command is not foundpublic void moveCommand(java.lang.String commandName, boolean after)
commandName
- the Command
nameafter
- if true move the Command after else move it before the current positionpublic void removeCommand(java.lang.String commandName)
Command
public java.util.Vector<java.lang.String> getOwnCommands()
Command
namespublic java.lang.String getOwnCommandsAsString(java.lang.String delim)
Command
names as string
delim
- the name separatorpublic void updateChilds(java.util.Vector<java.lang.String> childs)
childs
- list of Menu
/Command
's names (menu names start with "+")public java.util.Vector<java.lang.String> getOwnChilds()
Command
names (the sub-Menu names start with "+" character)public java.lang.String getOwnChildsAsString(java.lang.String delim)
Command
) names as string.
The sub-Menu names start with "+" character
delim
- the name separatorpublic java.util.Vector<MenuItem> getActions(java.util.Vector<java.lang.Object> filterArgs, Framework framework) throws OberonException
MenuItem
s according to framework user rights
filterArgs
- extra arguments used to compute the available actionsframework
- the current framework
MenuItem
elements
OberonException
public java.util.Vector<java.lang.String> getActionNames(java.util.Vector<java.lang.Object> filterArgs, Framework framework) throws OberonException
MenuItem
s according to framework user rights
filterArgs
- extra arguments used to compute the available actionsframework
- the current framework
MenuItem
names - prefixed with level number
OberonException
public java.util.Vector<java.lang.String> getSuperMenus(Framework framework)
public java.lang.String getSuperMenusAsString(java.lang.String delim, Framework framework)
delim
- the Menu name separatorpublic static java.util.Vector<java.lang.String> getApplications(Framework framework)
public java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
getProperty
in class OBBase
propertyName
- OOQL property identifier/name (example: href , command ...)filterArgs
- extra arguments used to compute propertiestoken
- separator token for complex propertiesframework
- the current framework
public java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
getTargetNames
in class OBBase
composedName
- OOQL property identifier/name (example: command, ownsubmenu, .. )filterArgs
- extra arguments used to compute propertiesframework
- the current framework
public java.lang.String toString()
toString
in class AdminBase
public java.lang.String toString(Framework framework)
toString
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element toXML(Framework framework)
toXML
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
toXML
in class AdminBase
getImage
- true to include "imagedata" element with the base64 encoded image datafullDump
- true to include detailed informationframework
- the current frameworkpublic void fromXML(org.jdom.Element rootElement)
fromXML
in class AdminBase
public java.lang.String getCreateCommand(boolean force)
getCreateCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String getSaveCommand(boolean force)
getSaveCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String compareUpdate(Menu refMenu, boolean checkImage, boolean overwrite, boolean force, Framework framework) throws OberonException
refMenu
- the reference Menu objectcheckImage
- if true compare also the image iconoverwrite
- if true update the database object instanceforce
- if true ignores optional propertiesframework
- the current framework
OberonException
fromXML(Element)
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |