com.sap.security.api.permissions
Class ValuePermission

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

public class ValuePermission
extends NamePermission

This class implements ValuePermission, i.e. a named permission with an associated value.

See Also:
NamePermission, Permission, Serialized Form

Constructor Summary
ValuePermission(java.lang.String name, java.lang.String actions)
          Creates a new ValuePermission object with the specified name.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks two ValuePermission 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

ValuePermission

public ValuePermission(java.lang.String name,
                       java.lang.String actions)
Creates a new ValuePermission object with the specified name. The name is the symbolic name of the ValuePermission, 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 ValuePermission 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 ValuePermission, and has the same name and action as this ValuePermission 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.