public class PermissionAdminImpl extends java.lang.Object implements PermissionAdmin
PermissionAdmin
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SPEC_VERSION |
Constructor and Description |
---|
PermissionAdminImpl(org.knopflerfish.framework.permissions.PermissionInfoStorage pis) |
Modifier and Type | Method and Description |
---|---|
PermissionInfo[] |
getDefaultPermissions()
Gets the default permissions.
|
java.lang.String[] |
getLocations()
Returns the bundle locations that have permissions assigned to them, that
is, bundle locations for which an entry exists in the permission table.
|
PermissionInfo[] |
getPermissions(java.lang.String location)
Gets the permissions assigned to the bundle with the specified
location.
|
void |
setDefaultPermissions(PermissionInfo[] perms)
Sets the default permissions.
|
void |
setPermissions(java.lang.String location,
PermissionInfo[] perms)
Assigns the specified permissions to the bundle with the specified
location.
|
public static final java.lang.String SPEC_VERSION
public PermissionAdminImpl(org.knopflerfish.framework.permissions.PermissionInfoStorage pis)
public PermissionInfo[] getPermissions(java.lang.String location)
getPermissions
in interface PermissionAdmin
location
- The location of the bundle whose permissions are to
be returned.public void setPermissions(java.lang.String location, PermissionInfo[] perms)
setPermissions
in interface PermissionAdmin
location
- The location of the bundle that will be assigned the
permissions.permissions
- The permissions to be assigned, or null
if
the specified location is to be removed from the permission table.java.lang.SecurityException
- If the caller does not have
AllPermission
.public java.lang.String[] getLocations()
getLocations
in interface PermissionAdmin
public PermissionInfo[] getDefaultPermissions()
These are the permissions granted to any bundle that does not have permissions assigned to its location.
getDefaultPermissions
in interface PermissionAdmin
public void setDefaultPermissions(PermissionInfo[] perms)
These are the permissions granted to any bundle that does not have permissions assigned to its location.
setDefaultPermissions
in interface PermissionAdmin
permissions
- The default permissions, or null
if the
default permissions are to be removed from the permission table.java.lang.SecurityException
- If the caller does not have
AllPermission
.