|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecyrd.jspwiki.auth.authorize.DefaultGroup
public class DefaultGroup
Provides a concrete implementation of the Group
interface.
Field Summary |
---|
Fields inherited from interface com.ecyrd.jspwiki.auth.authorize.Group |
---|
RESTRICTED_GROUPNAMES |
Constructor Summary | |
---|---|
DefaultGroup(String name)
|
Method Summary | |
---|---|
boolean |
add(Principal user)
Adds a Principal to the group. |
void |
addWikiEventListener(WikiEventListener listener)
Registers a WikiEventListener with this Group. |
void |
clear()
Clears all Principals from the group list. |
boolean |
equals(Object o)
Two DefaultGroups are equal if they contain identical member Principals and have the same name. |
String |
getName()
The name of the group. |
boolean |
isMember(Principal principal)
Returns true if a Principal is a member of the group. |
Principal[] |
members()
Returns the members of the group as an array of Principal objects. |
boolean |
remove(Principal user)
Removes a Principal from the group. |
void |
removeWikiEventListener(WikiEventListener listener)
Un-registers a WikiEventListener with this Group. |
String |
toString()
Returns a string representation of the group. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.security.Principal |
---|
hashCode |
Constructor Detail |
---|
public DefaultGroup(String name)
Method Detail |
---|
public boolean add(Principal user)
WikiSecurityEvent.GROUP_ADD_MEMBER
to all of its registered WikiEventListeners.
add
in interface Group
user
- the principal to add
true
if the operation was successfulpublic void addWikiEventListener(WikiEventListener listener)
addWikiEventListener
in interface Group
listener
- the event listenerpublic void clear()
WikiSecurityEvent.GROUP_CLEAR_MEMBERS
to all of its registered WikiEventListeners.
clear
in interface Group
public boolean equals(Object o)
equals
in interface Group
equals
in interface Principal
equals
in class Object
public String getName()
Group
getName
in interface Group
getName
in interface Principal
public boolean isMember(Principal principal)
true
if a Principal is a member of the group.
Specifically, the Principal's getName()
method must return the same value as one of the Principals in the group
member list. The Principal's type does not need to match.
isMember
in interface Group
principal
- the principal about whom membeship status is sought
public Principal[] members()
Group
members
in interface Group
public boolean remove(Principal user)
WikiSecurityEvent.GROUP_REMOVE_MEMBER
to all of its registered WikiEventListeners.
remove
in interface Group
user
- the principal to remove
true
if the operation was successfulpublic void removeWikiEventListener(WikiEventListener listener)
removeWikiEventListener
in interface Group
listener
- the event listenerpublic String toString()
toString
in interface Group
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 |