|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.platform.security.api.AuthorizationPermissionsImpl
public final class AuthorizationPermissionsImpl
This class represents a heterogeneous set of AuthorizationPermission instances. Like the AuthorizationPermission
class, this class (and all AuthorizationPermissionCollection classes) also has an implies
method that can be used to determine whether a particular AuthorizationPermission is allowed by the
permissions contained within an AuthorizationPermissionsImpl instance.
The different AuthorizationPermission instances contained by an AuthorizationPermissionsImpl instance are
organized into homogeneous AuthorizationPermissionCollection objects contained in the AuthorizationPermissionsImpl
object; an AuthorizationPermission object added to the AuthorizationPermissionsImpl object is automatically
placed into the appropriate AuthorizationPermissionCollection object for that type (or realm) of permission
(as prescribed by the result of the newAuthorizationPermissionCollection()
method on the AuthorizationPermission
subclass). If no special container is specified, a default container (which has some optimizations for the
implies
method, based upon the AuthorizationPermission object's hashCode()
method) is used.
Constructor Summary | |
---|---|
AuthorizationPermissionsImpl()
Creates a new AuthorizationPermissionsImpl object containing no AuthorizationPermission objects. |
|
AuthorizationPermissionsImpl(AuthorizationPermissions orig)
Create a new AuthorizationPermissionsImpl object that is a copy of the original. |
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. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AuthorizationPermissionsImpl()
public AuthorizationPermissionsImpl(AuthorizationPermissions orig)
orig
- The original to be copied.Method Detail |
---|
public void setReadOnly()
add
.
setReadOnly
in interface AuthorizationPermissions
public boolean isReadOnly()
add
.
isReadOnly
in interface AuthorizationPermissions
public boolean add(AuthorizationPermission permission)
add
in interface AuthorizationPermissions
permission
- the AuthorizationPermission object to add.
java.lang.SecurityException
- if this AuthorizationPermission object is marked as readonly.AuthorizationPermissions.isReadOnly()
,
AuthorizationPermissions.add(AuthorizationPermissions)
,
AuthorizationPermissions.add(Set)
public boolean add(AuthorizationPermissions permissions)
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.
add
in interface AuthorizationPermissions
permissions
- the set of AuthorizationPermission objects to add.
java.lang.SecurityException
- if this AuthorizationPermission object is marked as readonly.isReadOnly()
public boolean add(java.util.Set permissions)
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.
add
in interface AuthorizationPermissions
permissions
- the set of AuthorizationPermission objects to add.
java.lang.SecurityException
- if this AuthorizationPermission object is marked as readonly.isReadOnly()
public boolean remove(AuthorizationPermission permission)
remove
in interface AuthorizationPermissions
permission
- the permission that is to be removed from this policy.public boolean removeAll(java.util.Set permissions)
removeAll
in interface AuthorizationPermissions
permissions
- the set of permissions that are to be removed from this policy.public boolean removeAll(AuthorizationPermissions permissions)
removeAll
in interface AuthorizationPermissions
permissions
- The AuthorizationPermissionsImpl that are to be removed from this policy.public void clear()
clear
in interface AuthorizationPermissions
public java.util.Iterator iterator()
iterator
in interface AuthorizationPermissions
public boolean implies(AuthorizationPermission permission)
implies
in interface AuthorizationPermissions
permission
- the AuthorizationPermission object to check.
public int size()
size
in interface AuthorizationPermissions
public java.lang.String toString()
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |