| org.sakaiproject.authz.api.AuthzGroupService
All known Subclasses: org.sakaiproject.authz.impl.BaseAuthzGroupService,
AuthzGroupService | public interface AuthzGroupService extends EntityProducer(Code) | |
AuthzGroupService manages authorization grops.
|
Method Summary | |
AuthzGroup | addAuthzGroup(String id) Add a new AuthzGroup
Parameters: id - The AuthzGroup id. | AuthzGroup | addAuthzGroup(String id, AuthzGroup other, String maintainUserId) Add a new AuthzGroup, as a copy of another AuthzGroup (except for id), and give a user "maintain" access based on the other's definition of "maintain".
Parameters: id - The id. Parameters: other - The AuthzGroup to copy into this new AuthzGroup. Parameters: maintainUserId - Optional user id to get "maintain" access, or null if none. | boolean | allowAdd(String id) Check permissions for adding an AuthzGroup.
Parameters: id - The authzGroup id. | boolean | allowJoinGroup(String id) Check permissions for the current user joining a group.
Parameters: id - The AuthzGroup id. | boolean | allowRemove(String id) Check permissions for removing an AuthzGroup.
Parameters: id - The AuthzGroup id. | boolean | allowUnjoinGroup(String id) Check permissions for the current user unjoining a group.
Parameters: id - The AuthzGroup id. | boolean | allowUpdate(String id) Check permissions for updating an AuthzGroup.
Parameters: id - The id. | String | authzGroupReference(String id) Access the internal reference which can be used to access the AuthzGroup from within the system.
Parameters: id - The AuthzGroup id. | int | countAuthzGroups(String criteria) Count the AuthzGroups that meet specified criteria.
Parameters: criteria - Selection criteria: AuthzGroups returned will match this string somewhere in their id, or provider group id. | Set | getAllowedFunctions(String role, Collection azGroups) Get the set of functions that users with this role in these AuthzGroups are allowed to perform.
Parameters: role - The role name. Parameters: azGroups - A collection of AuthzGroup ids to consult. | AuthzGroup | getAuthzGroup(String id) Access an AuthzGroup.
Parameters: id - The id string. | public Set | getAuthzGroupIds(String providerId) Gets the IDs of the AuthzGroups with the given provider ID. | List | getAuthzGroups(String criteria, PagingPosition page) Access a list of AuthzGroups that meet specified criteria, naturally sorted.
Parameters: criteria - Selection criteria: AuthzGroups returned will match this string somewhere in their id, or provider group id. Parameters: page - The PagePosition subset of items to return. | Set | getAuthzGroupsIsAllowed(String userId, String function, Collection azGroups) Get the set of AuthzGroup ids in which this user is allowed to perform this function.
Parameters: userId - The user id. Parameters: function - The function to check. Parameters: azGroups - The Collection of AuthzGroup ids to search; if null, search them all. | public Set | getProviderIds(String authzGroupId) Gets the provider IDs associated with an AuthzGroup.
The Set of Strings representing external group IDs, as recognized by the GroupProvider implementation, that are associated with the given groupId. | String | getUserRole(String userId, String azGroupId) Get the role name for this user in this AuthzGroup, if the user has membership (the membership gives the user a single role).
Parameters: userId - The user id. Parameters: function - The function to open. Parameters: azGroupId - The AuthzGroup id to consult, if it exists. | Set | getUsersIsAllowed(String function, Collection azGroups) Get the set of user ids of users who are allowed to perform the function in the named AuthzGroups.
Parameters: function - The function to check. Parameters: azGroups - A collection of the ids of AuthzGroups to consult. | Map | getUsersRole(Collection userIds, String azGroupId) Get the role name for each user in the userIds Collection in this AuthzGroup, for each of these users who have membership (membership gives the user a single role).
Parameters: userIds - The user ids as a Collection of String. Parameters: function - The function to open. Parameters: azGroupId - The AuthzGroup id to consult, if it exists. | boolean | isAllowed(String userId, String function, String azGroupId) Test if this user is allowed to perform the function in the named AuthzGroup.
Parameters: userId - The user id. Parameters: function - The function to open. Parameters: azGroupId - The AuthzGroup id to consult, if it exists. | boolean | isAllowed(String userId, String function, Collection azGroups) Test if this user is allowed to perform the function in the named AuthzGroups.
Parameters: userId - The user id. Parameters: function - The function to open. Parameters: azGroups - A collection of AuthzGroup ids to consult. | void | joinGroup(String authzGroupId, String role) Cause the current user to join the given AuthzGroup with this role, using SECURE_UPDATE_OWN_AUTHZ_GROUP security. | AuthzGroup | newAuthzGroup(String id, AuthzGroup other, String maintainUserId) Create a new AuthzGroup, as a copy of another AuthzGroup (except for id), and give a user "maintain" access based on the other's definition of "maintain", but do not store - it can be saved with a save() call
Parameters: id - The id. Parameters: other - The AuthzGroup to copy into this new AuthzGroup (or null if none). Parameters: maintainUserId - Optional user id to get "maintain" access, or null if none. | void | refreshUser(String userId) Refresh this user's AuthzGroup external definitions. | void | removeAuthzGroup(AuthzGroup azGroup) Remove this AuthzGroup. | void | removeAuthzGroup(String id) Remove the AuthzGroup with this id, if it exists (fails quietly if not). | void | save(AuthzGroup azGroup) Save the changes made to the AuthzGroup. | void | unjoinGroup(String authzGroupId) Cause the current user to unjoin the given AuthzGroup, using SECURE_UPDATE_OWN_AUTHZ_GROUP security. |
ANON_ROLE | final static String ANON_ROLE(Code) | | Standard role name for the anon. role.
|
APPLICATION_ID | final static String APPLICATION_ID(Code) | | The type string for this application: should not change over time as it may be stored in various parts of persistent entities.
|
AUTH_ROLE | final static String AUTH_ROLE(Code) | | Standard role name for the auth. role.
|
REFERENCE_ROOT | final static String REFERENCE_ROOT(Code) | | This string starts the references to resources in this service.
|
SECURE_ADD_AUTHZ_GROUP | final static String SECURE_ADD_AUTHZ_GROUP(Code) | | Name for the event of adding an AuthzGroup.
|
SECURE_REMOVE_AUTHZ_GROUP | final static String SECURE_REMOVE_AUTHZ_GROUP(Code) | | Name for the event of removing an AuthzGroup.
|
SECURE_UPDATE_AUTHZ_GROUP | final static String SECURE_UPDATE_AUTHZ_GROUP(Code) | | Name for the event of updating an AuthzGroup.
|
SECURE_UPDATE_OWN_AUTHZ_GROUP | final static String SECURE_UPDATE_OWN_AUTHZ_GROUP(Code) | | Name for the event of updating ones own relationship in an AuthzGroup.
|
allowAdd | boolean allowAdd(String id)(Code) | | Check permissions for adding an AuthzGroup.
Parameters: id - The authzGroup id. true if the current user is allowed add the AuthzGroup, false if not. |
allowJoinGroup | boolean allowJoinGroup(String id)(Code) | | Check permissions for the current user joining a group.
Parameters: id - The AuthzGroup id. true if the user is allowed to join the group, false if not. |
allowRemove | boolean allowRemove(String id)(Code) | | Check permissions for removing an AuthzGroup.
Parameters: id - The AuthzGroup id. true if the user is allowed to remove the AuthzGroup, false if not. |
allowUnjoinGroup | boolean allowUnjoinGroup(String id)(Code) | | Check permissions for the current user unjoining a group.
Parameters: id - The AuthzGroup id. true if the user is allowed to unjoin the group, false if not. |
allowUpdate | boolean allowUpdate(String id)(Code) | | Check permissions for updating an AuthzGroup.
Parameters: id - The id. true if the user is allowed to update the AuthzGroup, false if not. |
authzGroupReference | String authzGroupReference(String id)(Code) | | Access the internal reference which can be used to access the AuthzGroup from within the system.
Parameters: id - The AuthzGroup id. The the internal reference which can be used to access the AuthzGroup from within the system. |
countAuthzGroups | int countAuthzGroups(String criteria)(Code) | | Count the AuthzGroups that meet specified criteria.
Parameters: criteria - Selection criteria: AuthzGroups returned will match this string somewhere in their id, or provider group id. The count of AuthzGroups that meet specified criteria. |
getAllowedFunctions | Set getAllowedFunctions(String role, Collection azGroups)(Code) | | Get the set of functions that users with this role in these AuthzGroups are allowed to perform.
Parameters: role - The role name. Parameters: azGroups - A collection of AuthzGroup ids to consult. the Set (String) of functions that users with this role in these AuthzGroups are allowed to perform |
getAuthzGroupIds | public Set getAuthzGroupIds(String providerId)(Code) | | Gets the IDs of the AuthzGroups with the given provider ID.
The Set of Strings representing authzGroup IDs (such as /site/1234 or /site/1234/group/5678) for all authzGroups with the given providerId. |
getAuthzGroups | List getAuthzGroups(String criteria, PagingPosition page)(Code) | | Access a list of AuthzGroups that meet specified criteria, naturally sorted.
Parameters: criteria - Selection criteria: AuthzGroups returned will match this string somewhere in their id, or provider group id. Parameters: page - The PagePosition subset of items to return. The List (AuthzGroup) that meet specified criteria. |
getAuthzGroupsIsAllowed | Set getAuthzGroupsIsAllowed(String userId, String function, Collection azGroups)(Code) | | Get the set of AuthzGroup ids in which this user is allowed to perform this function.
Parameters: userId - The user id. Parameters: function - The function to check. Parameters: azGroups - The Collection of AuthzGroup ids to search; if null, search them all. the Set (String) of AuthzGroup ids in which this user is allowed to perform this function. |
getProviderIds | public Set getProviderIds(String authzGroupId)(Code) | | Gets the provider IDs associated with an AuthzGroup.
The Set of Strings representing external group IDs, as recognized by the GroupProvider implementation, that are associated with the given groupId. These stringsmust not be "compound IDs", as defined by the GroupProvider's String[] unpackId(String id) method. |
getUserRole | String getUserRole(String userId, String azGroupId)(Code) | | Get the role name for this user in this AuthzGroup, if the user has membership (the membership gives the user a single role).
Parameters: userId - The user id. Parameters: function - The function to open. Parameters: azGroupId - The AuthzGroup id to consult, if it exists. the role name for this user in this AuthzGroup, if the user has active membership, or null if not. |
getUsersIsAllowed | Set getUsersIsAllowed(String function, Collection azGroups)(Code) | | Get the set of user ids of users who are allowed to perform the function in the named AuthzGroups.
Parameters: function - The function to check. Parameters: azGroups - A collection of the ids of AuthzGroups to consult. the Set (String) of user ids of users who are allowed to perform the function in the named AuthzGroups. |
getUsersRole | Map getUsersRole(Collection userIds, String azGroupId)(Code) | | Get the role name for each user in the userIds Collection in this AuthzGroup, for each of these users who have membership (membership gives the user a single role).
Parameters: userIds - The user ids as a Collection of String. Parameters: function - The function to open. Parameters: azGroupId - The AuthzGroup id to consult, if it exists. A Map (userId (String) -> role name (String)) of role names for each user who have active membership; if the user does not, it will not be in the Map. |
isAllowed | boolean isAllowed(String userId, String function, String azGroupId)(Code) | | Test if this user is allowed to perform the function in the named AuthzGroup.
Parameters: userId - The user id. Parameters: function - The function to open. Parameters: azGroupId - The AuthzGroup id to consult, if it exists. true if this user is allowed to perform the function in the named AuthzGroup, false if not. |
isAllowed | boolean isAllowed(String userId, String function, Collection azGroups)(Code) | | Test if this user is allowed to perform the function in the named AuthzGroups.
Parameters: userId - The user id. Parameters: function - The function to open. Parameters: azGroups - A collection of AuthzGroup ids to consult. true if this user is allowed to perform the function in the named AuthzGroups, false if not. |
newAuthzGroup | AuthzGroup newAuthzGroup(String id, AuthzGroup other, String maintainUserId) throws GroupAlreadyDefinedException(Code) | | Create a new AuthzGroup, as a copy of another AuthzGroup (except for id), and give a user "maintain" access based on the other's definition of "maintain", but do not store - it can be saved with a save() call
Parameters: id - The id. Parameters: other - The AuthzGroup to copy into this new AuthzGroup (or null if none). Parameters: maintainUserId - Optional user id to get "maintain" access, or null if none. The new AuthzGroup object. exception: GroupAlreadyDefinedException - if the id is already used. |
refreshUser | void refreshUser(String userId)(Code) | | Refresh this user's AuthzGroup external definitions.
Parameters: userId - The user id. |
removeAuthzGroup | void removeAuthzGroup(String id) throws AuthzPermissionException(Code) | | Remove the AuthzGroup with this id, if it exists (fails quietly if not).
Parameters: id - The AuthzGroup id. exception: AuthzPermissionException - if the current user does not have permission to remove this AthzGroup. |
|
|