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: 2008-09-11 22:09:17 +0200 (Thu, 11 Sep 2008) $
itemType
private final Item itemType
alwaysGranted
private final Set<Permission> alwaysGranted
maybeGranted
private final Set<Permission> maybeGranted
Permissions
public Permissions(Item itemType,
Set<Permission> alwaysGranted,
Set<Permission> maybeGranted)
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
toString
public String toString()
- Overrides:
toString
in class Object