org.norther.tammi.core.security
Class ExtendedPermissions

java.lang.Object
  extended by java.security.PermissionCollection
      extended by org.norther.tammi.core.security.ExtendedPermissions
All Implemented Interfaces:
Serializable

public class ExtendedPermissions
extends PermissionCollection
implements Serializable

An extension to permissions providing an implies method for checking partial matches of resource permissions.

Author:
Ilkka Priha
See Also:
Serialized Form

Constructor Summary
ExtendedPermissions()
          Constructs a new resource permissions.
 
Method Summary
 void add(Permission permission)
          Adds a permission object to the permission collection.
 Enumeration elements()
          Returns an enumeration of all permission objects.
 boolean implies(Permission permission)
          Checks if permissions of this object imply the specified permission.
 boolean isReadOnly()
          Checks the readonly flag.
 void setReadOnly()
          Sets the readonly flag.
 String toString()
          Returns a string presentation of all permissions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendedPermissions

public ExtendedPermissions()
Constructs a new resource permissions.

Method Detail

add

public void add(Permission permission)
Adds a permission object to the permission collection.

Specified by:
add in class PermissionCollection
Parameters:
permission - the permission object to add.
Throws:
SecurityException - if permissions is marked as read-only.

implies

public boolean implies(Permission permission)
Checks if permissions of this object imply the specified permission.

Specified by:
implies in class PermissionCollection
Parameters:
permission - the permission to check against.
Returns:
true if the specified permission is implied by this object.

elements

public Enumeration elements()
Returns an enumeration of all permission objects.

Specified by:
elements in class PermissionCollection
Returns:
an enumeration of all permissions.

isReadOnly

public boolean isReadOnly()
Checks the readonly flag.

Overrides:
isReadOnly in class PermissionCollection
Returns:
true or false.

setReadOnly

public void setReadOnly()
Sets the readonly flag.

Overrides:
setReadOnly in class PermissionCollection

toString

public String toString()
Returns a string presentation of all permissions.

Overrides:
toString in class PermissionCollection
Returns:
a permissions string.


Copyright © 2004 The Norther Organization. All rights reserved.