JAAS Provider Java API Reference
10g (9.0.4.0.0)

B10389-01

oracle.security.jazn.policy
Class Grantee

java.lang.Object
  |
  +--oracle.security.jazn.policy.Grantee
All Implemented Interfaces:
Cloneable

public class Grantee
extends Object
implements Cloneable

A Grantee represents a grantee in a policy entry.


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

 

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

 

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

 

Constructor Detail

Grantee

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

Grantee

public Grantee(Set principals,
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,
String displayName,
Set principals,
CodeSource codesource)
Method Detail

getGuid

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

getDisplayName

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

getPrincipals

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

getCodeSource

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

clone

public Object clone()
Creates and return a copy of this object.
Overrides:
clone in class 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(Object obj)
Returns true if the specified object "equals" to this object.
Overrides:
equals in class Object
Returns:
true if the specified object "equals" to this object.

toString

public String toString()
Returns a string representation of this Grantee object.
Overrides:
toString in class Object
Returns:
a string representation of this Grantee object.

JAAS Provider Java API Reference
10g (9.0.4.0.0)

B10389-01

Copyright 2002, 2003 Oracle Corporation. All Rights Reserved.