Oracle Application Server JAAS Provider API Reference
10g Release 2 (10.1.2)

B14019-02


oracle.security.jazn.policy
Class Grantee

java.lang.Object
  extended byoracle.security.jazn.policy.Grantee

All Implemented Interfaces:
java.lang.Cloneable

public class Grantee
extends java.lang.Object
implements java.lang.Cloneable

A Grantee represents a grantee in a policy entry.

Version:
0.1
Author:
rkng Id Date Description rkng 09/06/00 Creation

Field Summary
protected java.security.CodeSource _cs
protected java.lang.String _displayName
protected oracle.ldap.util.Guid _guid
protected java.util.Set _principals

Constructor Summary
protected Grantee()
Grantee(oracle.ldap.util.Guid id, java.lang.String displayName, java.util.Set principals, java.security.CodeSource codesource)
Grantee(java.security.Principal principal)
Creates a new Grantee instance.
Grantee(java.util.Set principals, java.security.CodeSource codesource)
Creates a new Grantee instance.

Method Summary
java.lang.Object clone()
Creates and return a copy of this object.
boolean equals(java.lang.Object obj)
Returns true if the specified object "equals" to this object.
java.security.CodeSource getCodeSource()
Returns the codesource associated with this entry.
java.lang.String getDisplayName()
Returns the Display Name of this Grantee
oracle.ldap.util.Guid getGuid()
java.util.Set getPrincipals()
Returns the principals associated with this entry.
boolean implies(Grantee grantee)
Returns if this Grantee object "implies" the specified Grantee object.
protected void setCodeSource(java.security.CodeSource cs)
protected void setDisplayName(java.lang.String displayName)
protected void setPrincipalSet(java.util.Set prs)
java.lang.String toString()
Returns a string representation of this Grantee object.

Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

_displayName

protected java.lang.String _displayName

_guid

protected oracle.ldap.util.Guid _guid

_principals

protected java.util.Set _principals

_cs

protected java.security.CodeSource _cs

Constructor Detail

Grantee

protected Grantee()

Grantee

public Grantee(java.security.Principal principal)
Creates a new Grantee instance.
Parameters:
principal - the grantee in question.

Grantee

public Grantee(java.util.Set principals,
               java.security.CodeSource codesource)
Creates a new Grantee instance.
Parameters:
principals - the grantee(s) in question. Note that when multiple Principals are specified in a grant, the "current" Subject (specified in a Subject.doAs() method call) will need to have all the Principals in its Principal Set in order to assume the granted permissions.
codesource - the codesource to be associated with this entry. If specified in a grant, then the Subject can only assume the granted permissions when executing code from the specified codesource. This argument can be null.

Grantee

public Grantee(oracle.ldap.util.Guid id,
               java.lang.String displayName,
               java.util.Set principals,
               java.security.CodeSource codesource)

Method Detail

setDisplayName

protected void setDisplayName(java.lang.String displayName)

setPrincipalSet

protected void setPrincipalSet(java.util.Set prs)

setCodeSource

protected void setCodeSource(java.security.CodeSource cs)

getGuid

public final oracle.ldap.util.Guid getGuid()

getDisplayName

public final java.lang.String getDisplayName()
Returns the Display Name of this Grantee

getPrincipals

public java.util.Set getPrincipals()
Returns the principals associated with this entry.
Returns:
the principals associated with this entry.

getCodeSource

public java.security.CodeSource getCodeSource()
Returns the codesource associated with this entry.
Returns:
the codesource associated with this entry.

clone

public java.lang.Object clone()
Creates and return a copy of this object.
Returns:
a copy of this object.

implies

public boolean implies(Grantee grantee)
Returns if this Grantee object "implies" the specified Grantee object.

In general, G1.implies(G2) returns true iff

  1. G1.cs.implies(G2.cs) and
  2. G1.prs.implies(G2.prs)
where G1 and G2 refer to different grantees, and cs and prs refer to CodeSource and Principal Set associated with each Grantee, respectively.

Informally, the implication relationship is one such that the less restrictive form implies the more restrictive form.

For examples:

NOTE:

As far as permission assignment is concerned, if G1([scott],null) implies G2([scott],http://www.oracle.com) then permissions(G1)=>permissions(G2) (i.e. permissions granted to G1 are assigned to G2 as well.)

Parameters:
grantee - Grantee to compare against
Returns:
true if the specified grantee is implied by this Grantee.

equals

public boolean equals(java.lang.Object obj)
Returns true if the specified object "equals" to this object.
Returns:
true if the specified object "equals" to this object.

toString

public java.lang.String toString()
Returns a string representation of this Grantee object.
Returns:
a string representation of this Grantee object.

Oracle Application Server JAAS Provider API Reference
10g Release 2 (10.1.2)

B14019-02


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