Oracle9iAS JAAS 9.0.2.0.0

oracle.security.jazn.realm
Class RealmPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--oracle.security.jazn.realm.RealmPermission
All Implemented Interfaces:
Guard, Serializable

public class RealmPermission
extends Permission

A RealmPermission class is defined to represent permissions for a realm. It extends from java.security.Permission, thus can be used just like any regular Java permission.

A RealmPermission consists of the name of the realm (also known as permission target name) and a set of "actions" specifying privileges applicable to that realm. The target name of a RealmPermission instance is the name of the realm in question.

The individual action name is specific to the realm in question and are system-defined.

See Also:
Serialized Form

Constructor Summary
RealmPermission(String realm, String actions)
          Creates a RealmPermission instance with the specified actions.
 
Method Summary
TypeMethod
 boolean equals(Object obj)
          Checks two Permission objects for equality.
 String getActions()
          Returns the actions of this permissioon as a string.
 int hashCode()
          Returns the hash code value for this object.
 boolean implies(Permission permission)
          Checks if the specified permission's actions are "implied by" this object's actions.
 String toString()
          Returns String representation of this instance.
 
Methods inherited from class java.security.Permission
checkGuard, getName, newPermissionCollection
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RealmPermission

public RealmPermission(String realm,
                       String actions)
Creates a RealmPermission instance with the specified actions. The actions parameter contains a comma-separated list of the actions applicable to the specified realm.
Parameters:
realm - - the name of the realm
actions - - the action string
Method Detail

getActions

public String getActions()
Returns the actions of this permissioon as a string.
Overrides:
getActions in class Permission
Returns:
a comma-seperated list of actions

equals

public boolean equals(Object obj)
Checks two Permission objects for equality.
Overrides:
equals in class Permission
Parameters:
obj - - the object we are testing for equality with this object.
Returns:
true if both Permission objects are equivalent.

hashCode

public int hashCode()
Returns the hash code value for this object.
Overrides:
hashCode in class Permission
Returns:
the hash code value for this object.

toString

public String toString()
Returns String representation of this instance.
Overrides:
toString in class Permission
Returns:
String representation of this instance.

implies

public boolean implies(Permission permission)
Checks if the specified permission's actions are "implied by" this object's actions.

The implies method is used by the AccessController to determine whether or not a requested permission is implied by another permission that is known to be valid in the current execution context.

Overrides:
implies in class Permission
Parameters:
permission - - the permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

Oracle9iAS JAAS 9.0.2.0.0

Copyright 2001, Oracle Corporation. All Rights Reserved.