org.systinet.security.perm
Class WASPPermissions

java.lang.Object
  extended byjava.security.PermissionCollection
      extended byorg.systinet.security.perm.WASPPermissions
All Implemented Interfaces:
java.io.Serializable

public final class WASPPermissions
extends java.security.PermissionCollection

This class represents a heterogeneous collection designed for WASP permissions. It is very simlilar to standard java.security.Permissions (Java 1.3).That is, it contains different types of Permission objects, organized into PermissionCollections. The main difference relieas in the fact that not only AllPermission, but also AllWSManagePermission has special behaviour. AllPermission implies any extension of java Permission, AllWSManagePermission implies any extension of WSManagePermission.

Since:
4.0
See Also:
Serialized Form
Component:
Security-Specific

Constructor Summary
WASPPermissions()
          Creates a new Permissions object containing no PermissionCollections.
 
Method Summary
 void add(java.security.Permission permission)
          Adds a permission object to the PermissionCollection for the class the permission belongs to.
 java.util.Enumeration elements()
          Returns an enumeration of all the Permission objects in all the PermissionCollections in this Permissions object.
 boolean implies(java.security.Permission permission)
          Checks to see if this object's PermissionCollection for permissions of the specified permission's type implies the permissions expressed in the permission object.
 
Methods inherited from class java.security.PermissionCollection
isReadOnly, setReadOnly, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WASPPermissions

public WASPPermissions()
Creates a new Permissions object containing no PermissionCollections.

Method Detail

add

public void add(java.security.Permission permission)
Adds a permission object to the PermissionCollection for the class the permission belongs to.

Parameters:
permission - the Permission object to add.
Throws:
java.lang.SecurityException - if this Permissions object is marked as readonly.

implies

public boolean implies(java.security.Permission permission)
Checks to see if this object's PermissionCollection for permissions of the specified permission's type implies the permissions expressed in the permission object. Returns true if the combination of permissions in the appropriate PermissionCollection (e.g., a FilePermissionCollection for a FilePermission) together imply the specified permission.

Parameters:
permission - the Permission object to check.
Returns:
true if "permission" is implied by the permissions in the PermissionCollection it belongs to, false if not.

elements

public java.util.Enumeration elements()
Returns an enumeration of all the Permission objects in all the PermissionCollections in this Permissions object.

Returns:
an enumeration of all the Permissions.