2.17.2: 2011-06-17

net.sf.basedb.core
Class InternalJobQueue.JobQueueKeyring

java.lang.Object
  extended by net.sf.basedb.core.Keyring
      extended by net.sf.basedb.core.InternalJobQueue.JobQueueKeyring
Enclosing class:
InternalJobQueue

private static class InternalJobQueue.JobQueueKeyring
extends Keyring

Our own keyring containing the permissions we need to execute the jobs. The only required permission is: Permission.ACT_AS_ANOTHER_USER. All other permissions are denied.


Field Summary
private  Map<Integer,Integer> emptyMap
           
private  Set<Integer> emptySet
           
private  int systemPermissions
           
 
Constructor Summary
private InternalJobQueue.JobQueueKeyring()
           
 
Method Summary
(package private)  int getAllPermissions(Item itemType, UserData owner, ItemKeyData itemKey, ProjectKeyData projectKey)
          Return 0.
(package private)  Set<Integer> getGroups()
          Return empty set.
(package private)  Set<Integer> getItemKeys()
          Return empty set.
(package private)  Set<Integer> getProjectKeys()
          Return empty set.
(package private)  Map<Integer,Integer> getProjects()
          Return empty map.
(package private)  boolean getReload()
          Never reload since everything is static.
(package private)  int getRolePermissions(Item itemType)
          Return Permission.ACT_AS_ANOTHER_USER if itemType = Item.SYSTEM, 0 otherwise.
(package private)  Set<Integer> getRoles()
          Return empty set.
(package private)  int getSharedPermissions(ShareableData sharableData)
          Return 0.
(package private)  Set<Integer> getUsers()
          Return empty set.
 
Methods inherited from class net.sf.basedb.core.Keyring
getGroups, getItemKeys, getPluginPermissions, getProjectKeys, init, setActiveProject, setReload, unload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

systemPermissions

private final int systemPermissions

emptySet

private final Set<Integer> emptySet

emptyMap

private final Map<Integer,Integer> emptyMap
Constructor Detail

InternalJobQueue.JobQueueKeyring

private InternalJobQueue.JobQueueKeyring()
Method Detail

getReload

boolean getReload()
Never reload since everything is static.

Overrides:
getReload in class Keyring

getRolePermissions

int getRolePermissions(Item itemType)
Return Permission.ACT_AS_ANOTHER_USER if itemType = Item.SYSTEM, 0 otherwise.

Overrides:
getRolePermissions in class Keyring
Parameters:
itemType - The item type as defined by the Item class
Returns:
The permission

getSharedPermissions

int getSharedPermissions(ShareableData sharableData)
Return 0.

Overrides:
getSharedPermissions in class Keyring

getAllPermissions

int getAllPermissions(Item itemType,
                      UserData owner,
                      ItemKeyData itemKey,
                      ProjectKeyData projectKey)
Return 0.

Overrides:
getAllPermissions in class Keyring

getRoles

Set<Integer> getRoles()
Return empty set.

Overrides:
getRoles in class Keyring

getGroups

Set<Integer> getGroups()
Return empty set.


getUsers

Set<Integer> getUsers()
Return empty set.

Overrides:
getUsers in class Keyring

getProjects

Map<Integer,Integer> getProjects()
Return empty map.

Overrides:
getProjects in class Keyring

getItemKeys

Set<Integer> getItemKeys()
Return empty set.


getProjectKeys

Set<Integer> getProjectKeys()
Return empty set.


2.17.2: 2011-06-17