|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object aQute.junit.runtime.SimplePermissionPolicy
public class SimplePermissionPolicy
Implements a permissionpolicy. It will tried to read a resource from the bundle. This resource should have the following format:
'(' 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.
Method Summary | |
---|---|
void |
bundleChanged(org.osgi.framework.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(org.osgi.framework.Bundle bundle)
Clear the permissions for a bundle. |
org.osgi.service.permissionadmin.PermissionInfo[] |
getPermissions(org.osgi.framework.Bundle bundle)
Get the resource and parse it into PermissionInfo objects. |
org.osgi.service.permissionadmin.PermissionInfo[] |
parse(InputStream in)
Parse a permission info file. |
void |
setDefaultPermissions(org.osgi.service.permissionadmin.PermissionInfo[] defaultPermissions)
|
void |
setPermissions(org.osgi.framework.Bundle bundle)
Sets the permissions of a bundle from a resource, if exists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setPermissions(org.osgi.framework.Bundle bundle)
public org.osgi.service.permissionadmin.PermissionInfo[] getPermissions(org.osgi.framework.Bundle bundle)
public org.osgi.service.permissionadmin.PermissionInfo[] parse(InputStream in) throws IOException
IOException
public void clearPermissions(org.osgi.framework.Bundle bundle)
public void bundleChanged(org.osgi.framework.BundleEvent event)
bundleChanged
in interface org.osgi.framework.BundleListener
public void setDefaultPermissions(org.osgi.service.permissionadmin.PermissionInfo[] defaultPermissions)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |