com.sap.security.api.permissions
Class ActionPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--com.sap.security.api.permissions.NamePermission
              |
              +--com.sap.security.api.permissions.ActionPermission
All Implemented Interfaces:
java.security.Guard, java.io.Serializable

public class ActionPermission
extends NamePermission

This class implements ActionPermission, i.e. a named permission with associated actions.

Version:
1.0 02/29/00
See Also:
NamePermission, Permission, Serialized Form

Constructor Summary
ActionPermission(java.lang.String name, java.lang.String actions)
          Creates a new ActionPermission object with the specified name.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks two ActionPermission objects for equality.
 java.lang.String getActions()
          Returns the canonical string representation of the actions.
 int hashCode()
          Returns the hash code value for this object.
 boolean implies(java.security.Permission permission)
          Check and see if this set of permissions implies the permissions expressed in "permission".
 
Methods inherited from class java.security.Permission
checkGuard, getName, newPermissionCollection, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionPermission

public ActionPermission(java.lang.String name,
                        java.lang.String actions)
Creates a new ActionPermission object with the specified name. The name is the symbolic name of the ActionPermission, and the actions String specificies the value.
Parameters:
name - the name of the Permission
actions - the value.
Method Detail

implies

public boolean implies(java.security.Permission permission)
Check and see if this set of permissions implies the permissions expressed in "permission".
Overrides:
implies in class NamePermission
Parameters:
p - the Permission object to compare
Returns:
true if "permission" is a proper subset of a permission in the set, false if not.

equals

public boolean equals(java.lang.Object obj)
Checks two ActionPermission objects for equality. Checks that obj's class is the same as this object's class and has the same name as this object.

Overrides:
equals in class NamePermission
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if obj is a ActionPermission, and has the same name and action as this ActionPermission object, false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this object. The hash code used is the hash code of the name, that is, getName().hashCode(), plus the hash code of the actions, that is, getActions().hashCode()
Overrides:
hashCode in class NamePermission
Returns:
a hash code value for this object.

getActions

public java.lang.String getActions()
Returns the canonical string representation of the actions.
Overrides:
getActions in class NamePermission
Returns:
the value as string


Copyright © 2002 SAP AG All Rights Reserved.