|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.types.Permissions
This class implements a security manager meant for useage by tasks that run inside the ant VM. An examples are the Java Task and JUnitTask. The basic functionality is that nothing (except for a base set of permissions) is allowed, unless the permission is granted either explicitly or implicitly. If an permission is granted this can be overruled by explicitly revoking the permission. It is not permissible to add permissions (either granted or revoked) while the Security Manager is active (after calling setSecurityManager() but before calling restoreSecurityManager()).
Nested Class Summary | |
static class |
Permissions.Permission
Represents a permission. |
Constructor Summary | |
Permissions()
default constructor |
|
Permissions(boolean delegateToOldSM)
create a new set of permissions |
Method Summary | |
void |
addConfiguredGrant(Permissions.Permission perm)
Adds a permission to be granted. |
void |
addConfiguredRevoke(Permissions.Permission perm)
Adds a permission to be revoked. |
void |
restoreSecurityManager()
To be used by tasks that just finished executing the parts subject to these permissions. |
void |
setSecurityManager()
To be used by tasks wishing to use this security model before executing the part to be subject to these Permissions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Permissions()
public Permissions(boolean delegateToOldSM)
delegateToOldSM
- if true
the old security manager
will be used if the permission has not been explicitly granted or revoked
in this instance
if false, it behaves like the default constructorMethod Detail |
public void addConfiguredGrant(Permissions.Permission perm)
perm
- The Permissions.Permission to be granted.public void addConfiguredRevoke(Permissions.Permission perm)
perm
- The Permissions.Permission to be revokedpublic void setSecurityManager() throws BuildException
BuildException
public void restoreSecurityManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |