com.cc.framework.ui.model.imp
Class MenuItemDesignModelImp

java.lang.Object
  extended bycom.cc.framework.ui.model.imp.ClientHandlerImp
      extended bycom.cc.framework.ui.model.imp.MenuItemDesignModelImp
All Implemented Interfaces:
AccessControlled, ClientHandler, DesignModel, MenuItemDesignModel, java.io.Serializable

public class MenuItemDesignModelImp
extends ClientHandlerImp
implements MenuItemDesignModel

Designmodel for a menu item

Since:
1.0
Version:
$Revision: 1.21 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  java.lang.String action
          The action to process if the user clicks the item
private  java.lang.String id
          The unique Id of the menu item
private  java.lang.String imageRef
          Reference for an image in an ImageMap
private  java.util.ArrayList items
          A buffer for sub menu items
private  java.lang.String localeName
          Locale Setting
private  java.lang.String menuFilter
          A filter expression used to hide or show the menu item in different contexts
private  java.lang.String menuid
          The Menu item id
private  MenuItemDesignModel parent
          Parent Menu item
private  Permission permission
          The permission for this menu item
private static long serialVersionUID
          Serial Version UID
private  java.lang.String shortcut
          A shortcut
private  int state
          The state flags of the menu item
private  java.lang.String target
          The window target in which the resource requested by this hyperlink will be displayed, for example "blank, self, parent, ..."
private  java.lang.String text
          The display text
private  java.lang.String tooltip
          A tool tip
private  java.lang.String width
          The width of the menu item
 
Fields inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp
 
Constructor Summary
MenuItemDesignModelImp()
          Constructor
 
Method Summary
 MenuItemDesignModel addItem(MenuItemDesignModel item)
          Adds a SubMenuItem to the MenuItem
 java.lang.String getAction()
          Returns the Action
 MenuItemDesignModel[] getContent()
          Returns a List with all SubMenuItems
 java.lang.String getId()
           
 java.lang.String getImageRef()
          Returns the imageRef.
 java.lang.String getLocaleName()
          Gets the Local Setting for this element
 java.lang.String getMenuFilter()
          Returns the menu filter.
 java.lang.String getMenuId()
          Returns the Menu Id
 MenuItemDesignModel getParent()
          Returns a reference to the parent element
 Permission getPermission()
          Returns the authorizations required to access an object If the method returns null no access rights is required.
 java.lang.String getShortcut()
          Returns the Shortcut
 int getState()
          Returns the Menu State flags (MenuState)
 java.lang.String getTarget()
          Returns the Target
 java.lang.String getText()
          Returns the Text
 java.lang.String getTooltip()
          Returns the static tooltip text
 java.lang.String getWidth()
          Returns the Width
 MenuItemDesignModel removeItem(MenuItemDesignModel item)
          Removes a SubMenuItem from the List
 void setAction(java.lang.String action)
          Sets the Action
 void setId(java.lang.String id)
           
 void setImageRef(java.lang.String imageRef)
          Sets the imageRef.
 void setLocaleName(java.lang.String locale)
          Sets the Locale configuration for this element
 void setMenuFilter(java.lang.String menuFilter)
          Sets the menu filter.
 void setMenuId(java.lang.String menuid)
          Sets the Menu Id
 void setParent(MenuItemDesignModel parent)
          Sets the reference to the parent element
 void setPermission(Permission permission)
          Sets a list with permissions needed to access this object.
 void setShortcut(java.lang.String shortcut)
          Sets the Shortcut
 void setState(int state)
          Sets the Menu State
 void setTarget(java.lang.String target)
          Sets the Target
 void setText(java.lang.String text)
          sets the Text
 void setTooltip(java.lang.String tooltip)
          Sets the static tooltip text.
 void setWidth(java.lang.String width)
          Sets the Width
 boolean show(Principal principal)
          Checks if the Object has a required permission.
 int size()
          Returns the Number of SubMenuItems
 
Methods inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp
evaluate, getHandler, getHandlers, setHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cc.framework.ui.model.ClientHandler
getHandler, getHandlers, setHandler
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

menuid

private java.lang.String menuid
The Menu item id


parent

private MenuItemDesignModel parent
Parent Menu item


items

private java.util.ArrayList items
A buffer for sub menu items


state

private int state
The state flags of the menu item


text

private java.lang.String text
The display text


tooltip

private java.lang.String tooltip
A tool tip


shortcut

private java.lang.String shortcut
A shortcut


target

private java.lang.String target
The window target in which the resource requested by this hyperlink will be displayed, for example "blank, self, parent, ..."


menuFilter

private java.lang.String menuFilter
A filter expression used to hide or show the menu item in different contexts


localeName

private java.lang.String localeName
Locale Setting


imageRef

private java.lang.String imageRef
Reference for an image in an ImageMap


action

private java.lang.String action
The action to process if the user clicks the item


id

private java.lang.String id
The unique Id of the menu item


width

private java.lang.String width
The width of the menu item


permission

private Permission permission
The permission for this menu item

Constructor Detail

MenuItemDesignModelImp

public MenuItemDesignModelImp()
Constructor

Method Detail

setState

public void setState(int state)
Description copied from interface: MenuItemDesignModel
Sets the Menu State

Specified by:
setState in interface MenuItemDesignModel
Parameters:
state - the state flags (MenuState)
See Also:
MenuItemDesignModel.setState(int)

setText

public void setText(java.lang.String text)
Description copied from interface: MenuItemDesignModel
sets the Text

Specified by:
setText in interface MenuItemDesignModel
Parameters:
text - Text
See Also:
MenuItemDesignModel.setText(String)

setShortcut

public void setShortcut(java.lang.String shortcut)
Description copied from interface: MenuItemDesignModel
Sets the Shortcut

Specified by:
setShortcut in interface MenuItemDesignModel
Parameters:
shortcut - String
See Also:
MenuItemDesignModel.setShortcut(String)

setId

public final void setId(java.lang.String id)
Parameters:
id - The unique Id of the menu item

setWidth

public final void setWidth(java.lang.String width)
Description copied from interface: MenuItemDesignModel
Sets the Width

Specified by:
setWidth in interface MenuItemDesignModel
Parameters:
width - Width
See Also:
MenuItemDesignModel.setWidth(java.lang.String)

setAction

public final void setAction(java.lang.String action)
Description copied from interface: MenuItemDesignModel
Sets the Action

Specified by:
setAction in interface MenuItemDesignModel
Parameters:
action - Action
See Also:
MenuItemDesignModel.setAction(java.lang.String)

getId

public final java.lang.String getId()
Returns:
returns the id

getAction

public java.lang.String getAction()
Description copied from interface: MenuItemDesignModel
Returns the Action

Specified by:
getAction in interface MenuItemDesignModel
Returns:
String
See Also:
MenuItemDesignModel.getAction()

getWidth

public final java.lang.String getWidth()
Description copied from interface: MenuItemDesignModel
Returns the Width

Specified by:
getWidth in interface MenuItemDesignModel
Returns:
String
See Also:
MenuItemDesignModel.getWidth()

getState

public int getState()
Description copied from interface: MenuItemDesignModel
Returns the Menu State flags (MenuState)

Specified by:
getState in interface MenuItemDesignModel
Returns:
menu state flags
See Also:
MenuItemDesignModel.getState()

getText

public java.lang.String getText()
Description copied from interface: MenuItemDesignModel
Returns the Text

Specified by:
getText in interface MenuItemDesignModel
Returns:
String
See Also:
MenuItemDesignModel.getText()

getShortcut

public java.lang.String getShortcut()
Description copied from interface: MenuItemDesignModel
Returns the Shortcut

Specified by:
getShortcut in interface MenuItemDesignModel
Returns:
String
See Also:
MenuItemDesignModel.getShortcut()

getParent

public MenuItemDesignModel getParent()
Description copied from interface: MenuItemDesignModel
Returns a reference to the parent element

Specified by:
getParent in interface MenuItemDesignModel
Returns:
MenuItemDesignModel
See Also:
MenuItemDesignModel.getParent()

setParent

public void setParent(MenuItemDesignModel parent)
Description copied from interface: MenuItemDesignModel
Sets the reference to the parent element

Specified by:
setParent in interface MenuItemDesignModel
Parameters:
parent - MenuItemDesignModel
See Also:
MenuItemDesignModel.setParent(com.cc.framework.ui.model.MenuItemDesignModel)

addItem

public MenuItemDesignModel addItem(MenuItemDesignModel item)
Description copied from interface: MenuItemDesignModel
Adds a SubMenuItem to the MenuItem

Specified by:
addItem in interface MenuItemDesignModel
Parameters:
item - MenuItemDesignModel
Returns:
MenuItemDesignModel
See Also:
MenuItemDesignModel.addItem(MenuItemDesignModel)

removeItem

public MenuItemDesignModel removeItem(MenuItemDesignModel item)
Description copied from interface: MenuItemDesignModel
Removes a SubMenuItem from the List

Specified by:
removeItem in interface MenuItemDesignModel
Parameters:
item - MenuItemDesignModel
Returns:
MenuItemDesignModel
See Also:
MenuItemDesignModel.removeItem(MenuItemDesignModel)

getContent

public MenuItemDesignModel[] getContent()
Description copied from interface: MenuItemDesignModel
Returns a List with all SubMenuItems

Specified by:
getContent in interface MenuItemDesignModel
Returns:
MenuItemDesignModel
See Also:
MenuItemDesignModel.getContent()

size

public int size()
Description copied from interface: MenuItemDesignModel
Returns the Number of SubMenuItems

Specified by:
size in interface MenuItemDesignModel
Returns:
integer
See Also:
MenuItemDesignModel.size()

setTarget

public void setTarget(java.lang.String target)
Description copied from interface: MenuItemDesignModel
Sets the Target

Specified by:
setTarget in interface MenuItemDesignModel
Parameters:
target - Target
See Also:
MenuItemDesignModel.setTarget(String)

getTarget

public java.lang.String getTarget()
Description copied from interface: MenuItemDesignModel
Returns the Target

Specified by:
getTarget in interface MenuItemDesignModel
Returns:
String
See Also:
MenuItemDesignModel.getTarget()

getMenuFilter

public java.lang.String getMenuFilter()
Returns the menu filter.

Specified by:
getMenuFilter in interface MenuItemDesignModel
Returns:
String

setMenuFilter

public void setMenuFilter(java.lang.String menuFilter)
Sets the menu filter.

Specified by:
setMenuFilter in interface MenuItemDesignModel
Parameters:
menuFilter - The filter to set

getImageRef

public java.lang.String getImageRef()
Returns the imageRef.

Specified by:
getImageRef in interface MenuItemDesignModel
Returns:
String

setImageRef

public void setImageRef(java.lang.String imageRef)
Sets the imageRef.

Specified by:
setImageRef in interface MenuItemDesignModel
Parameters:
imageRef - The imageRef to set

getPermission

public Permission getPermission()
Description copied from interface: AccessControlled
Returns the authorizations required to access an object If the method returns null no access rights is required.

Specified by:
getPermission in interface AccessControlled
Returns:
Permission A list with required permissions separated by ";"
See Also:
AccessControlled.getPermission()

setPermission

public void setPermission(Permission permission)
Description copied from interface: MenuItemDesignModel
Sets a list with permissions needed to access this object. The list is separated by ';'

Specified by:
setPermission in interface MenuItemDesignModel
Parameters:
permission - Permission
See Also:
MenuItemDesignModel.setPermission(com.cc.framework.security.Permission)

show

public boolean show(Principal principal)
Description copied from interface: AccessControlled
Checks if the Object has a required permission.

Specified by:
show in interface AccessControlled
Parameters:
principal - the users principal object
Returns:
true if the permission exists
See Also:
AccessControlled.show(Principal)

getMenuId

public java.lang.String getMenuId()
Description copied from interface: MenuItemDesignModel
Returns the Menu Id

Specified by:
getMenuId in interface MenuItemDesignModel
Returns:
String
See Also:
MenuItemDesignModel.getMenuId()

setMenuId

public void setMenuId(java.lang.String menuid)
Description copied from interface: MenuItemDesignModel
Sets the Menu Id

Specified by:
setMenuId in interface MenuItemDesignModel
Parameters:
menuid - menu id
See Also:
MenuItemDesignModel.setMenuId(java.lang.String)

getTooltip

public java.lang.String getTooltip()
Description copied from interface: MenuItemDesignModel
Returns the static tooltip text

Specified by:
getTooltip in interface MenuItemDesignModel
Returns:
String
See Also:
MenuItemDesignModel.getTooltip()

setTooltip

public void setTooltip(java.lang.String tooltip)
Description copied from interface: MenuItemDesignModel
Sets the static tooltip text.

Specified by:
setTooltip in interface MenuItemDesignModel
Parameters:
tooltip - Tooltip text
See Also:
MenuItemDesignModel.setTooltip(java.lang.String)

getLocaleName

public java.lang.String getLocaleName()
Description copied from interface: MenuItemDesignModel
Gets the Local Setting for this element

Specified by:
getLocaleName in interface MenuItemDesignModel
Returns:
Locale Setting
See Also:
MenuItemDesignModel.getLocaleName()

setLocaleName

public void setLocaleName(java.lang.String locale)
Description copied from interface: MenuItemDesignModel
Sets the Locale configuration for this element

Specified by:
setLocaleName in interface MenuItemDesignModel
Parameters:
locale - Locale Identifier or true|false
See Also:
MenuItemDesignModel.setLocaleName(java.lang.String)


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.