|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Group
Groups are a specialized type of ad-hoc role used by the wiki system. Unlike externally-provided roles (such as those provided by an LDAP server or web container), JSPWiki groups can be created dynamically by wiki users, without requiring special container privileges or administrator intervention. They are designed to provide a lightweight role-based access control system that complements existing role systems.
Group names are case-insensitive, and have a few naming restrictions, which
are enforced by the GroupManager
:
Field Summary | |
---|---|
static String[] |
RESTRICTED_GROUPNAMES
|
Method Summary | |
---|---|
boolean |
add(Principal principal)
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 considered equal if they both contains the same Principals and have the same name (case-insentive comparison). |
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 principal)
Removes a Principal from the group. |
void |
removeWikiEventListener(WikiEventListener listener)
Un-registers a WikiEventListener from this Group. |
String |
toString()
Provides a String representation. |
Methods inherited from interface java.security.Principal |
---|
hashCode |
Field Detail |
---|
static final String[] RESTRICTED_GROUPNAMES
Method Detail |
---|
boolean add(Principal principal)
WikiSecurityEvent.GROUP_ADD_MEMBER
to all of its registered WikiEventListeners.
principal
- the principal to add
true
if the operation was successfulvoid addWikiEventListener(WikiEventListener listener)
listener
- the event listenerboolean remove(Principal principal)
WikiSecurityEvent.GROUP_REMOVE_MEMBER
to all of its registered WikiEventListeners.
principal
- the principal to remove
true
if the operation was successfulvoid removeWikiEventListener(WikiEventListener listener)
listener
- the event listenervoid clear()
WikiSecurityEvent.GROUP_CLEAR_MEMBERS
to all of its registered WikiEventListeners.
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.
principal
- the principal about whom membeship status is sought
String getName()
getName
in interface Principal
Principal[] members()
boolean equals(Object o)
equals
in interface Principal
equals
in class Object
String toString()
toString
in interface Principal
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |