org.systinet.security.perm
Class WASPRole

java.lang.Object
  extended byjava.security.Permission
      extended byorg.systinet.security.perm.WASPRole
All Implemented Interfaces:
java.security.Guard, java.io.Serializable

public final class WASPRole
extends java.security.Permission

WASPRole permission can be used by policy implementations to group permissions into a role.

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

Constructor Summary
WASPRole(java.lang.String name)
          Creates role permission.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks two Permission objects for equality.
 java.lang.String getActions()
          No actions supported by this permission.
 int hashCode()
          Always return the value getName().hashCode() or 3 if getName() returns null.
 boolean implies(java.security.Permission permission)
          A permissions is implied from this permission if given permission is instance of WASPRole and their names are equal.
 java.security.PermissionCollection newPermissionCollection()
          Returns a new PermissionCollection object for storing WASPRole objects.
 java.lang.String toString()
          Overriden to return complete description of this permission.
 
Methods inherited from class java.security.Permission
checkGuard, getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WASPRole

public WASPRole(java.lang.String name)
Creates role permission.

Parameters:
name - of of the role, it cannot be null
Method Detail

toString

public java.lang.String toString()
Overriden to return complete description of this permission.

Returns:
description of this

getActions

public java.lang.String getActions()
No actions supported by this permission. Null value is returned.

Returns:
null

implies

public boolean implies(java.security.Permission permission)
A permissions is implied from this permission if given permission is instance of WASPRole and their names are equal.


hashCode

public int hashCode()
Always return the value getName().hashCode() or 3 if getName() returns null.

Returns:
hashcode of this permission

equals

public boolean equals(java.lang.Object obj)
Checks two Permission objects for equality.

Parameters:
obj - the object we are testing for equality with this object
Returns:
true if both Permission objects are equivalent.

newPermissionCollection

public java.security.PermissionCollection newPermissionCollection()
Returns a new PermissionCollection object for storing WASPRole objects.

Returns:
a new WASPRolePermissionCollection object suitable for storing WASPRole.