| java.lang.Object com.ecyrd.jspwiki.auth.authorize.Role
Role | final public class Role implements Principal(Code) | | A lightweight, immutable Principal that represents a built-in wiki role such
as Anonymous, Asserted and Authenticated. It can also represent dynamic roles
used by an external
com.ecyrd.jspwiki.auth.Authorizer , such as a web
container.
author: Andrew Jaquith since: 2.3 |
Constructor Summary | |
public | Role(String name) Constructs a new Role with a given name. |
ALL | final public static Role ALL(Code) | | All users, regardless of authentication status
|
ANONYMOUS | final public static Role ANONYMOUS(Code) | | If the user hasn't supplied a name
|
ASSERTED | final public static Role ASSERTED(Code) | | If the user has supplied a cookie with a username
|
AUTHENTICATED | final public static Role AUTHENTICATED(Code) | | If the user has authenticated with the Container or UserDatabase
|
Role | public Role(String name)(Code) | | Constructs a new Role with a given name.
Parameters: name - the name of the Role |
equals | final public boolean equals(Object obj)(Code) | | Two Role objects are considered equal if their names are identical.
Parameters: obj - the object to test true if both objects are of type Role and have identical names See Also: java.lang.Object.equals(java.lang.Object) |
getName | final public String getName()(Code) | | Returns the name of the Principal.
the name of the Role |
hashCode | final public int hashCode()(Code) | | Returns a unique hashcode for the Role.
the hashcode |
isReservedName | final public static boolean isReservedName(String name)(Code) | | Returns true if the supplied name is identical to the name
of a built-in Role; that is, the value returned by getName()
for built-in Roles
Role.ALL ,
Role.ANONYMOUS ,
Role.ASSERTED , or
Role.AUTHENTICATED .
Parameters: name - the name to be tested true if the name is reserved; false if not |
|
|