public class SimplePermissionPolicy
extends java.lang.Object
'('
permission-class [ '"' name-parameter '"' [ '"' action [ ','
action ] ... '"' ] ] ')' Or '#' *
Each valid line is translated into a PermissionInfo object and these objects
together form the permissions for a specific bundle. The class will also
attempt to read a file called "default.perm" from the current bundle that
will have the same format. This is used for the default permissions.
If there is no permission admin service, this class does nothing relevant.
| Modifier and Type | Method and Description |
|---|---|
void |
bundleChanged(BundleEvent event)
Event when a bundle has changed so we need to inspect if it is installed,
and if so we need to set the permissions or remove it when it is
uninstalled.
|
void |
clearPermissions(Bundle bundle)
Clear the permissions for a bundle.
|
PermissionInfo[] |
getPermissions(Bundle bundle)
Get the resource and parse it into PermissionInfo objects.
|
PermissionInfo[] |
parse(java.io.InputStream in)
Parse a permission info file.
|
void |
setDefaultPermissions(PermissionInfo[] defaultPermissions) |
void |
setPermissions(Bundle bundle)
Sets the permissions of a bundle from a resource, if exists.
|
public void setPermissions(Bundle bundle)
public PermissionInfo[] getPermissions(Bundle bundle)
public PermissionInfo[] parse(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionpublic void clearPermissions(Bundle bundle)
public void bundleChanged(BundleEvent event)
public void setDefaultPermissions(PermissionInfo[] defaultPermissions)
Data In Motion GmbH all rights reserved