public interface GroupDatabase
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Deprecated.
there is no need to call this method because the save and
delete methods contain their own commit logic
|
void |
delete(Group group)
Looks up and deletes a
Group from the group database. |
Group[] |
groups()
Returns all wiki groups that are stored in the GroupDatabase as an array
of Group objects.
|
void |
initialize(WikiEngine engine,
java.util.Properties props)
Initializes the group database based on values from a Properties object.
|
void |
save(Group group,
java.security.Principal modifier)
Saves a Group to the group database.
|
void commit()
throws WikiSecurityException
save(Group, Principal) and delete(Group) methods
are atomic themselves.WikiSecurityException - never...void delete(Group group) throws WikiSecurityException
Group from the group database. If the
group database does not contain the supplied Group. this method throws a
NoSuchPrincipalException. The method commits the results
of the delete to persistent storage.group - the group to removeWikiSecurityException - if the database does not contain the
supplied group (thrown as NoSuchPrincipalException) or if
the commit did not succeedvoid initialize(WikiEngine engine, java.util.Properties props) throws NoRequiredPropertyException, WikiSecurityException
engine - the wiki engineprops - the properties used to initialize the group databaseWikiSecurityException - if the database could not be initialized successfullyNoRequiredPropertyException - if a required property is not presentvoid save(Group group, java.security.Principal modifier) throws WikiSecurityException
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.group - the Group to savemodifier - the user who saved the GroupWikiSecurityException - if the Group could not be saved successfullyGroup[] groups() throws WikiSecurityException
Group(String, String) rather
than the various "parse" methods (GroupManager.parseGroup(String, String, boolean))
to construct the group. This is so as not to flood GroupManager's event
queue with spurious events.WikiSecurityException - if the groups cannot be returned by the back-endstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.