| java.lang.Object org.apache.harmony.security.UnresolvedPrincipal
UnresolvedPrincipal | final public class UnresolvedPrincipal implements Principal(Code) | | Descriptive implementation of Principal, which holds a name and a classname
of unresolved principal. It is used to define an arbitrary Principal which
may be not yet instantiated and authenticated.
This concept is somewhat similar to UnresolvedPermission. A principal-based
policy may grant permissions depending on what Principals own the current
execution thread. So the policy refers to this model definition of
acceptable principal and compares it with the actual principal.
See Also: org.apache.harmony.security.PolicyEntry See Also: org.apache.harmony.security.DefaultPolicy |
Field Summary | |
final public static String | WILDCARD Wildcard value denotes any class and/or any name. |
Method Summary | |
public boolean | equals(Object that) Returns true if compared object is a Principal
matching this definition, or if it is an UnresolvedPrincipal,
which defines the same Principal; false otherwise. | public String | getClassName() Returns fully qualified class name of a modeled Principal,
or wildcard if any class is acceptable. | public String | getName() Returns name of a modeled Principal, or wildcard
if any name is acceptable. | public int | hashCode() Returns the hash code value for this object. | public boolean | implies(Principal another) Returns true if compared object is a Principal
exactly matching this definition. | public String | toString() Returns a string describing this model of Principal. |
WILDCARD | final public static String WILDCARD(Code) | | Wildcard value denotes any class and/or any name.
|
UnresolvedPrincipal | public UnresolvedPrincipal(String klass, String name)(Code) | | Constructs a a new definition of a Principal with specified
parameters.
Parameters: klass - fully qualified class name, may be wildcard Parameters: name - name of principal, may be wildcard throws: IllegalArgumentException - if klass value is null or is empty string |
equals | public boolean equals(Object that)(Code) | | Returns true if compared object is a Principal
matching this definition, or if it is an UnresolvedPrincipal,
which defines the same Principal; false otherwise.
|
getClassName | public String getClassName()(Code) | | Returns fully qualified class name of a modeled Principal,
or wildcard if any class is acceptable.
|
getName | public String getName()(Code) | | Returns name of a modeled Principal, or wildcard
if any name is acceptable.
|
hashCode | public int hashCode()(Code) | | Returns the hash code value for this object.
|
implies | public boolean implies(Principal another)(Code) | | Returns true if compared object is a Principal
exactly matching this definition. Namely, if the fully qualified name
of class of passed Principal is equal to the class name value
of this definition and the name of passed Principal is equal to
the name value of this definition, or if this definition allows
any class or name, respectively.
Otherwise returns false .
|
toString | public String toString()(Code) | | Returns a string describing this model of Principal.
The format is 'Principal classname "name"'.
|
|
|