Class DisplayPermission
java.lang.Object
ch.tocco.nice2.model.menu.api.security.DisplayPermission
- All Implemented Interfaces:
Permission
,Serializable
Used to check permission of menu items. This is the only permission unsed
in admin-menu system.
- See Also:
-
Constructor Summary
ConstructorDescriptionDisplayPermission
(String... items) The items represent the path of a menu item. -
Method Summary
Modifier and TypeMethodDescriptionstatic DisplayPermission
Shortcut to create a display permsissionString[]
getItems()
getName()
boolean
implies
(Permission permission) Check whether this permission implies another permission.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.security.api.Permission
equals, toString
-
Constructor Details
-
DisplayPermission
public DisplayPermission() -
DisplayPermission
The items represent the path of a menu item. Eg. for menu item with path modules.addressManagement.address you pass modules, addressManagement, address here.- Parameters:
items
- the item's names
-
-
Method Details
-
getName
- Specified by:
getName
in interfacePermission
-
implies
Description copied from interface:Permission
Check whether this permission implies another permission. Be careful when implementing this method on your own permissions because this is basically the core of the whole security concept. A permission implies another permission, if the other permission is a subset of this permission. For example, the permission to access all fields of an entity implies the permission to access the specific field "myField" of the same entity, or the permission to access all files under /my/directory implies the permission to access the file /my/directory/myFile.- Specified by:
implies
in interfacePermission
- Parameters:
permission
- The permission to check.- Returns:
true
, if this permission implies the given permission,false
otherwise.
-
getItems
-