|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecyrd.jspwiki.auth.UserManager.DummyGroupManager
public class UserManager.DummyGroupManager
Implements a simple GroupManager which does not simply manage any groups. This is used when jspwiki security is turned off.
Field Summary |
---|
Fields inherited from interface com.ecyrd.jspwiki.auth.authorize.GroupManager |
---|
PROP_GROUPMANAGER |
Constructor Summary | |
---|---|
UserManager.DummyGroupManager()
|
Method Summary | |
---|---|
void |
add(Group group)
Adds a Group to the group cache. |
void |
addWikiEventListener(WikiEventListener listener)
Registers a WikiEventListener with this GroupManager. |
void |
commit()
Commits the groups to persistent storage. |
boolean |
exists(Group group)
Returns true if a Group is known to the GroupManager
(contained in the group cache), false otherwise. |
Principal |
findRole(String role)
Looks up and returns a role Principal matching a given String. |
Principal[] |
getRoles()
Returns an array of role Principals this Authorizer knows about. |
void |
initialize(WikiEngine engine,
Properties props)
Initializes the authorizer. |
boolean |
isUserInRole(WikiSession session,
Principal role)
Determines whether the Subject associated with a WikiSession is in a particular role. |
void |
reload()
Reloads the group cache from persistent storage. |
void |
remove(Group group)
Removes a Group from the group cache. |
void |
removeWikiEventListener(WikiEventListener listener)
Un-registers a WikiEventListener with this GroupManager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserManager.DummyGroupManager()
Method Detail |
---|
public void add(Group group)
GroupManager
IllegalArgumentException
, if the proposed group
is the same name as one of the built-in Roles: e.g., Admin,
Authenticated, etc. When a Group is added successfully, the GroupManager
implementation should send a WikiSecurityEvent of type
WikiSecurityEvent.GROUP_ADD
to all of its registered
WikiEventListeners. It should also register itself as a WikiEventListener for the Group
itself, so that additions to the group can be detected and
forwarded on to the GroupManager's own listeners.
add
in interface GroupManager
group
- the Group to addpublic void addWikiEventListener(WikiEventListener listener)
GroupManager
addWikiEventListener
in interface GroupManager
listener
- the event listenerpublic void commit()
GroupManager
commit
in interface GroupManager
public boolean exists(Group group)
GroupManager
true
if a Group is known to the GroupManager
(contained in the group cache), false
otherwise.
exists
in interface GroupManager
public void initialize(WikiEngine engine, Properties props)
Authorizer
initialize
in interface GroupManager
initialize
in interface Authorizer
engine
- the current wiki engineprops
- the wiki engine initialization propertiespublic void reload()
GroupManager
WikiSecurityEvent.GROUP_CLEAR_GROUPS
to
all of its registered WikiEventListeners.
reload
in interface GroupManager
public void remove(Group group)
GroupManager
WikiSecurityEvent.GROUP_REMOVE
to all of
its registered WikiEventListeners.
remove
in interface GroupManager
group
- the group to removepublic void removeWikiEventListener(WikiEventListener listener)
GroupManager
removeWikiEventListener
in interface GroupManager
listener
- the event listenerpublic Principal findRole(String role)
Authorizer
null
.
Note that it may not always be feasible for an Authorizer
implementation to return a role Principal.
findRole
in interface Authorizer
role
- the name of the role to retrieve
public Principal[] getRoles()
Authorizer
getRoles
in interface Authorizer
public boolean isUserInRole(WikiSession session, Principal role)
Authorizer
null
, this method must
return false
.
isUserInRole
in interface Authorizer
session
- the current WikiSessionrole
- the role to check
true
if the user is considered to be in the role,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |