Package net.sf.basedb.core.plugin
Class Permissions
- java.lang.Object
-
- net.sf.basedb.core.plugin.Permissions
-
public class Permissions extends Object
This class holds permissions requested by a plugin. The server admin may or may not grant all requested permissions.- Version:
- 2.0
- Author:
- nicklas
- Last modified
- $Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
-
Field Summary
Fields Modifier and Type Field Description private Set<Permission>
alwaysGranted
private Item
itemType
private Set<Permission>
maybeGranted
-
Constructor Summary
Constructors Constructor Description Permissions(Item itemType, Set<Permission> alwaysGranted, Set<Permission> maybeGranted)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Permission>
getAlwaysGranted()
Get the permissions that the plugin always should be granted, even if the logged in user doesn't have the permissions already.Item
getItemType()
Get the item type the permissions are valid for.Set<Permission>
getMaybeGranted()
Get the permissions that the plugin should be granted only if the logged in user already have the permissions.String
toString()
-
-
-
Field Detail
-
itemType
private final Item itemType
-
alwaysGranted
private final Set<Permission> alwaysGranted
-
maybeGranted
private final Set<Permission> maybeGranted
-
-
Constructor Detail
-
Permissions
public Permissions(Item itemType, Set<Permission> alwaysGranted, Set<Permission> maybeGranted)
-
-
Method Detail
-
getItemType
public Item getItemType()
Get the item type the permissions are valid for.
-
getAlwaysGranted
public Set<Permission> getAlwaysGranted()
Get the permissions that the plugin always should be granted, even if the logged in user doesn't have the permissions already. This makes it possible for a plugin to do things that a user normally can't do.- Returns:
- A set with the permissions to grant, ot null to not grant any permissions
-
getMaybeGranted
public Set<Permission> getMaybeGranted()
Get the permissions that the plugin should be granted only if the logged in user already have the permissions. This is the normal operation for plugins which doesn't use permissions at all, but must be specified if permissions are used since the default is then to deny everything.- Returns:
- A set with the permissions to grant, ot null to not grant any permissions
-
-