|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wiki.auth.GroupPrincipal
public final class GroupPrincipal
Immutable Principal that represents a Group. GroupPrincipals are injected into a Subject's principal list at the time of authentication (login), and serve as proxies for Group objects for the purposes of making Java 2 security policy decisions. We add GroupPrincipals instead of the actual Groups because calling classes should never be able to obtain a mutable object (Group memberships can be changed by callers). Administrators who wish to grant privileges to specific wiki groups via the security policy file should always specify principals of type GroupPrincipal.
Group
Constructor Summary | |
---|---|
GroupPrincipal(String group)
Constructs a new GroupPrincipal object with a supplied name. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Two GroupPrincipals are equal if their names are equal. |
String |
getName()
Returns the name of the group principal. |
int |
hashCode()
Returns the hashcode for this object. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GroupPrincipal(String group)
group
- the wiki group; cannot be null
Method Detail |
---|
public String getName()
getName
in interface Principal
Principal.getName()
public boolean equals(Object obj)
equals
in interface Principal
equals
in class Object
obj
- the object to compare
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in interface Principal
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in interface Principal
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |