| com.ecyrd.jspwiki.auth.authorize.GroupDatabase
All known Subclasses: com.ecyrd.jspwiki.auth.authorize.XMLGroupDatabase, com.ecyrd.jspwiki.auth.authorize.JDBCGroupDatabase,
GroupDatabase | public interface GroupDatabase (Code) | | Defines an interface for loading, persisting and storing wiki groups.
author: Andrew Jaquith since: 2.4.22 |
Method Summary | |
public void | commit() No-op method that in previous versions of JSPWiki was intended to
atomically commit changes to the user database. | public void | delete(Group group) Looks up and deletes a
Group from the group database. | public Group[] | groups() Returns all wiki groups that are stored in the GroupDatabase as an array
of Group objects. | public void | initialize(WikiEngine engine, Properties props) Initializes the group database based on values from a Properties object. | public void | save(Group group, Principal modifier) Saves a Group to the group database. |
groups | public Group[] groups() throws WikiSecurityException(Code) | | Returns all wiki groups that are stored in the GroupDatabase as an array
of Group objects. If the database does not contain any groups, this
method will return a zero-length array. This method causes back-end
storage to load the entire set of group; thus, it should be called
infrequently (e.g., at initialization time). Note that this method should
use the protected constructor
Group.Group(StringString) rather
than the various "parse" methods (
GroupManager.parseGroup(StringStringboolean) )
to construct the group. This is so as not to flood GroupManager's event
queue with spurious events.
the wiki groups throws: WikiSecurityException - if the groups cannot be returned by the back-end |
save | public void save(Group group, Principal modifier) throws WikiSecurityException(Code) | | Saves a Group to the group database. Note that this method must
fail, and throw an IllegalArgumentException , if the
proposed group is the same name as one of the built-in Roles: e.g.,
Admin, Authenticated, etc. The database is responsible for setting
create/modify timestamps, upon a successful save, to the Group.
The method commits the results of the delete to persistent storage.
Parameters: group - the Group to save Parameters: modifier - the user who saved the Group throws: WikiSecurityException - if the Group could not be saved successfully |
|
|