org.sakaiproject.tool.gradebook.facades.sakai2impl
Class UserDirectoryServiceSakai2Impl

java.lang.Object
  extended by org.sakaiproject.tool.gradebook.facades.sakai2impl.UserDirectoryServiceSakai2Impl
All Implemented Interfaces:
UserDirectoryService

public class UserDirectoryServiceSakai2Impl
extends Object
implements UserDirectoryService

Sakai2 implementation of the gradebook UserDirectoryService API.


Constructor Summary
UserDirectoryServiceSakai2Impl()
           
 
Method Summary
 String getUserDisplayName(String userUid)
          Looks up a user's display name based on their uid.
 String getUserEmailAddress(String userUid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserDirectoryServiceSakai2Impl

public UserDirectoryServiceSakai2Impl()
Method Detail

getUserDisplayName

public String getUserDisplayName(String userUid)
                          throws UnknownUserException
Description copied from interface: UserDirectoryService
Looks up a user's display name based on their uid. TODO See if there's some way to narrow this broad method. It's used only in two places: 1) When displaying a grade history log, it's used to obtain a grader's name based on their user UID. In this case, it couldn't be replaced by checking just people who play an explict part in the gradebook, since Authz may have let administrators change scores, or the grader may no longer play an active part. The only workaround is to pick up the currently authorized user's name and then store it as an additional field in the grade history log. 2) In the student view, it's currently used to display the student's name. This case could be handled by supporting either a SectionAwareness getEnrollmentForUserUid() method or an Authn getCurrentUserDisplayName() method.

Specified by:
getUserDisplayName in interface UserDirectoryService
Throws:
UnknownUserException

getUserEmailAddress

public String getUserEmailAddress(String userUid)
                           throws UnknownUserException
Specified by:
getUserEmailAddress in interface UserDirectoryService
Throws:
UnknownUserException


Copyright © 2011 Sakai Project. All Rights Reserved.