Class AllHandsGroupProvider
- java.lang.Object
-
- org.sakaiproject.provider.authzGroup.AllHandsGroupProvider
-
- All Implemented Interfaces:
org.sakaiproject.authz.api.GroupProvider
public class AllHandsGroupProvider extends Object implements org.sakaiproject.authz.api.GroupProvider
AllHands GroupProvider allows the creation of provided authzGroups that automatically include all users.
To use, set an authzGroup's external id to one of the following:
- sakai.allhands
-
-
Constructor Summary
Constructors Constructor Description AllHandsGroupProvider()Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Cleanup before shutting down.Map<String,String>getGroupRolesForUser(String userId)If you can do some type of directory lookup to find out some Attribute of this user you could conditionally auto-add them to any number of these "virtual groups" You might try sakai.students, sakai.faculty, sakai.staff, sakai.teamleads There is nothing specific about the string "sakai."MapgetGroupRolesForUser(String userId, String academicSessionEid)StringgetRole(String id, String user)Map<String,String>getUserRolesForGroup(String id)This is not necessary - because the user has already been added because they are enrolled in the allhand.sbooleangroupExists(String arg0)voidinit()Final initialization, once all dependencies are set.StringpackId(String[] ids)StringpreferredRole(String one, String other)String[]unpackId(String id)
-
-
-
Method Detail
-
init
public void init()
Final initialization, once all dependencies are set.
-
destroy
public void destroy()
Cleanup before shutting down.
-
getRole
public String getRole(String id, String user)
- Specified by:
getRolein interfaceorg.sakaiproject.authz.api.GroupProvider
-
getUserRolesForGroup
public Map<String,String> getUserRolesForGroup(String id)
This is not necessary - because the user has already been added because they are enrolled in the allhand.s- Specified by:
getUserRolesForGroupin interfaceorg.sakaiproject.authz.api.GroupProvider
-
getGroupRolesForUser
public Map<String,String> getGroupRolesForUser(String userId)
If you can do some type of directory lookup to find out some Attribute of this user you could conditionally auto-add them to any number of these "virtual groups" You might try sakai.students, sakai.faculty, sakai.staff, sakai.teamleads There is nothing specific about the string "sakai." these could easily be something like course.eecs280, shib:yale.edu:faculty, or h23.groups.ruk.dk One caveat - this class is respnsbile for handling the unpacking when an admin wants to put in multiple external providers The code below uses the common convention of using "+" (homage to "or") to concatenate IDs. So the user above us could set the provider ID in the Sakai Realms Tool to be h23.groups.ruk.dk+course.eecs280 to indicate thatr membership in either group is OK. To indicate membership in multiple groups in *this routine* add additional entries in the hash map (i.e. do not use the + notation in this routine).- Specified by:
getGroupRolesForUserin interfaceorg.sakaiproject.authz.api.GroupProvider
-
getGroupRolesForUser
public Map getGroupRolesForUser(String userId, String academicSessionEid)
- Specified by:
getGroupRolesForUserin interfaceorg.sakaiproject.authz.api.GroupProvider
-
unpackId
public String[] unpackId(String id)
- Specified by:
unpackIdin interfaceorg.sakaiproject.authz.api.GroupProvider
-
packId
public String packId(String[] ids)
- Specified by:
packIdin interfaceorg.sakaiproject.authz.api.GroupProvider
-
preferredRole
public String preferredRole(String one, String other)
- Specified by:
preferredRolein interfaceorg.sakaiproject.authz.api.GroupProvider
-
groupExists
public boolean groupExists(String arg0)
- Specified by:
groupExistsin interfaceorg.sakaiproject.authz.api.GroupProvider
-
-