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

java.lang.Object
  extended bycom.cc.framework.ui.model.imp.ButtonContainerImp
All Implemented Interfaces:
ButtonContainer, java.io.Serializable

public class ButtonContainerImp
extends java.lang.Object
implements ButtonContainer, java.io.Serializable

Button Container implementation

Author:
P001002
See Also:
Serialized Form

Field Summary
private  java.util.Map buttonPermissions
          The users permission which is necessary to see any buttons (Map<ControlButton, Permission>)
private static long serialVersionUID
          Serial Version UID
 
Constructor Summary
ButtonContainerImp()
           
 
Method Summary
 Permission getButtonPermission(ControlButton button)
          Retrieves the permission for the given button
 void setButtonPermission(ControlButton button, Permission permission)
          Sets whether a command button should be displayed by specifying an Access Control List.
 boolean showButton(ControlButton button, Principal principal)
          Checks if the button can be displayed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

buttonPermissions

private java.util.Map buttonPermissions
The users permission which is necessary to see any buttons (Map<ControlButton, Permission>)

Constructor Detail

ButtonContainerImp

public ButtonContainerImp()
Method Detail

getButtonPermission

public Permission getButtonPermission(ControlButton button)
Description copied from interface: ButtonContainer
Retrieves the permission for the given button

Specified by:
getButtonPermission in interface ButtonContainer
Parameters:
button - Button constant
Returns:
Permission or null
See Also:
ButtonContainer.getButtonPermission(com.cc.framework.ui.control.ControlButton)

showButton

public boolean showButton(ControlButton button,
                          Principal principal)
Description copied from interface: ButtonContainer
Checks if the button can be displayed.

Specified by:
showButton in interface ButtonContainer
Parameters:
button - The Button to query
principal - The principal object
Returns:
boolean true if the button should be displayed
See Also:
ButtonContainer.showButton(com.cc.framework.ui.control.ControlButton, com.cc.framework.security.Principal)

setButtonPermission

public void setButtonPermission(ControlButton button,
                                Permission permission)
Description copied from interface: ButtonContainer
Sets whether a command button should be displayed by specifying an Access Control List.

Specified by:
setButtonPermission in interface ButtonContainer
Parameters:
button - The Button to query
permission - Permission
See Also:
ButtonContainer.setButtonPermission(com.cc.framework.ui.control.ControlButton, com.cc.framework.security.Permission)


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