com.metamatrix.platform.security.api
Interface AuthorizationPermissions

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AuthorizationPermissionsImpl

public interface AuthorizationPermissions
extends java.io.Serializable

Interface AuthorizationPermissions.

This interface represents a collection of AuthorizationPermissions.


Method Summary
 boolean add(AuthorizationPermission permission)
          Adds a permission object to this object by adding it to the AuthorizationPermissionCollection for the class the AuthorizationPermission belongs to.
 boolean add(AuthorizationPermissions permissions)
          Convenience method to add AuthorizationPermissionsImpl to this object by adding each one to the AuthorizationPermissionCollection for the class that AuthorizationPermission instance belongs to.
 boolean add(java.util.Set permissions)
          Convenience method to add a Set of permission objects to this object by adding each one to the AuthorizationPermissionCollection for the class that AuthorizationPermission instance belongs to.
 void clear()
          Remove from this collection the entire set of existing permissions.
 boolean implies(AuthorizationPermission permission)
          Checks to see if the AuthorizationPermissionCollection in this object that corresponds to the specified permission's type contains permissions that imply access to the resouces in the permission object.
 boolean isReadOnly()
          Determine whether this AuthorizationPermissionCollection object is "readonly".
 java.util.Iterator iterator()
          Obtain an iterator over the AuthorizationPermission instances in this collection.
 boolean remove(AuthorizationPermission permission)
          Remove from this collection's set of existing permissions the specified permission.
 boolean removeAll(AuthorizationPermissions permissions)
          Remove from this collection's set of existing permissions all of the set of specified permissions.
 boolean removeAll(java.util.Set permissions)
          Remove from this collection's set of existing permissions all of the set of specified permissions.
 void setReadOnly()
          Marks this AuthorizationPermissionCollection object as "readonly".
 int size()
          Determine the number of AuthorizationPermission instances represented by this object.
 

Method Detail

setReadOnly

void setReadOnly()
Marks this AuthorizationPermissionCollection object as "readonly". After a AuthorizationPermissionCollection object is marked as readonly, no new AuthorizationPermission objects can be added to it using the add(com.metamatrix.platform.security.api.AuthorizationPermission) method.


isReadOnly

boolean isReadOnly()
Determine whether this AuthorizationPermissionCollection object is "readonly". If it is readonly, no new AuthorizationPermission objects can be added to it using the add(com.metamatrix.platform.security.api.AuthorizationPermission) method.


add

boolean add(AuthorizationPermission permission)
Adds a permission object to this object by adding it to the AuthorizationPermissionCollection for the class the AuthorizationPermission belongs to. This method creates a new AuthorizationPermissionCollection object (and adds the permission to it) if an appropriate collection does not yet exist.

Parameters:
permission - the AuthorizationPermission object to add.
Returns:
true if this collection changed as a result of the addition.
Throws:
java.lang.SecurityException - if this AuthorizationPermission object is marked as readonly.
See Also:
isReadOnly(), add(AuthorizationPermissions), add(Set)

add

boolean add(AuthorizationPermissions permissions)
Convenience method to add AuthorizationPermissionsImpl to this object by adding each one to the AuthorizationPermissionCollection for the class that AuthorizationPermission instance belongs to. This method creates new AuthorizationPermissionCollection object as required.

Parameters:
permissions - the set of AuthorizationPermission objects to add.
Returns:
true if this collection changed as a result of the addition.
Throws:
java.lang.SecurityException - if this AuthorizationPermission object is marked as readonly.
See Also:
isReadOnly(), add(AuthorizationPermission), add(Set)

add

boolean add(java.util.Set permissions)
Convenience method to add a Set of permission objects to this object by adding each one to the AuthorizationPermissionCollection for the class that AuthorizationPermission instance belongs to. This method creates new AuthorizationPermissionCollection object as required.

Parameters:
permissions - the set of AuthorizationPermission objects to add.
Returns:
true if this collection changed as a result of the addition.
Throws:
java.lang.SecurityException - if this AuthorizationPermission object is marked as readonly.
See Also:
isReadOnly(), add(AuthorizationPermission), add(AuthorizationPermissions)

remove

boolean remove(AuthorizationPermission permission)
Remove from this collection's set of existing permissions the specified permission. If the permission is not currently in this collection, this method simply returns without performing any operation.

Parameters:
permission - the permission that is to be removed from this policy.

removeAll

boolean removeAll(java.util.Set permissions)
Remove from this collection's set of existing permissions all of the set of specified permissions. If any of the permissions are not currently in this collection, that permission is ignored.

Parameters:
permissions - the set of permissions that are to be removed from this policy.

removeAll

boolean removeAll(AuthorizationPermissions permissions)
Remove from this collection's set of existing permissions all of the set of specified permissions. If any of the permissions are not currently in this collection, that permission is ignored.

Parameters:
permissions - The AuthorizationPermissionsImpl that are to be removed from this policy.

clear

void clear()
Remove from this collection the entire set of existing permissions.


iterator

java.util.Iterator iterator()
Obtain an iterator over the AuthorizationPermission instances in this collection.

Returns:
an iterator that can be used to access each of the instances in this collection.

implies

boolean implies(AuthorizationPermission permission)
Checks to see if the AuthorizationPermissionCollection in this object that corresponds to the specified permission's type contains permissions that imply access to the resouces in the permission object.

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

size

int size()
Determine the number of AuthorizationPermission instances represented by this object.

Returns:
the number of permissions within this object.


Copyright © 2009. All Rights Reserved.