Skip navigation links

Oracle Containers for J2EE Security Java API Reference
10g Release 3 (10.1.3.1.0)

B32115-01


oracle.security.jazn.realm
Class RealmPermission

java.lang.Object
  extended byjava.security.Permission
      extended byoracle.security.jazn.realm.RealmPermission

All Implemented Interfaces:
java.security.Guard, java.io.Serializable

public class RealmPermission
extends java.security.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. <p/> 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. <p/> The individual action name is specific to the realm in question and are system-defined. <p/>

The following table lists all the system-defined RealmPermission action names:
 
   Permission Action   the Permission Action Allows
   createRealm   Create realms
   dropRealm   Drop realms
   createUser   Create users in the target realm.
   dropUser   Drop users in the target realm.
   createRole   Create roles in the target realm.
   dropRole   Drop roles in the target realm.
   modifyRole   Modify roles in the target realm.
   grantRole   Grant roles in the target realm.
   revokeRole   Revoke roles from the target realm
See Also:
Serialized Form

Constructor Summary
RealmPermission(java.lang.String realm, java.lang.String actions)
          Creates a RealmPermission instance with the specified actions.

 

Method Summary
 boolean equals(java.lang.Object obj)
          Checks two Permission objects for equality.
 java.lang.String getActions()
          Returns the actions of this permissioon as a string.
 int hashCode()
          Returns the hash code value for this object.
 boolean implies(java.security.Permission permission)
          Checks if the specified permission's actions are "implied by" this object's actions.
 java.lang.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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

RealmPermission

public RealmPermission(java.lang.String realm,
                       java.lang.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 java.lang.String getActions()
Returns the actions of this permissioon as a string.
Returns:
a comma-seperated list of actions

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.

hashCode

public int hashCode()
Returns the hash code value for this object.
Returns:
the hash code value for this object.

toString

public java.lang.String toString()
Returns String representation of this instance.
Returns:
String representation of this instance.

implies

public boolean implies(java.security.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.

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

Skip navigation links

Oracle Containers for J2EE Security Java API Reference
10g Release 3 (10.1.3.1.0)

B32115-01


Copyright © 2004, 2006, Oracle. All rights reserved.