org.sakaiproject.service.legacy.authzGroup
Interface GroupProvider

All Known Implementing Classes:
SampleGroupProvider

public interface GroupProvider

GroupProvider provides user / role membership in a group, from an external system.

Author:
Sakai Software Development Team

Method Summary
 Map getGroupRolesForUser(String userId)
          Access the external group id - role name map for this user in all external groups.
 String getRole(String id, String user)
          Access the role name for this particular user in the external group.
 Map getUserRolesForGroup(String id)
          Access the user id - role name map for all users in the external group.
 String[] unpackId(String id)
          Unpack a possibly compound id into it's component ids, returning at least the id unchanged if not compound.
 

Method Detail

getRole

public String getRole(String id,
                      String user)
Access the role name for this particular user in the external group.

Parameters:
id - The external group id.
Returns:
the role name for this particular user in the external group, or null if none.

getUserRolesForGroup

public Map getUserRolesForGroup(String id)
Access the user id - role name map for all users in the external group.

Parameters:
id - The external group id.
Returns:
the user id - role name map for all users in the external group (may be empty).

getGroupRolesForUser

public Map getGroupRolesForUser(String userId)
Access the external group id - role name map for this user in all external groups.

If the provider supports compound external ids, the get() of this Map needs to accept a compount external id
and return the single role (if any) resolved from any individual external realm ids in the map.

Parameters:
userId - The user id.
Returns:
the the external group id - role name map for this users in all external groups. (may be empty).

unpackId

public String[] unpackId(String id)
Unpack a possibly compound id into it's component ids, returning at least the id unchanged if not compound.

Parameters:
id - The external realm id.
Returns:
a String array of one or more ids upacked from this possibly compound id.