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
ConstructorsConstructorDescriptionDisplayPermission(String... items) The items represent the path of a menu item. -
Method Summary
Modifier and TypeMethodDescriptionstatic DisplayPermissionShortcut to create a display permsissionString[]getItems()getName()booleanimplies(Permission permission) Check whether this permission implies another permission.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
getNamein interfacePermission
-
implies
Description copied from interface:PermissionCheck 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:
impliesin interfacePermission- Parameters:
permission- The permission to check.- Returns:
true, if this permission implies the given permission,falseotherwise.
-
getItems
-