01: /**********************************************************************************
02: *
03: * $Id: UserDirectoryService.java 9271 2006-05-10 21:52:49Z ray@media.berkeley.edu $
04: *
05: ***********************************************************************************
06: *
07: * Copyright (c) 2005 The Regents of the University of California, The MIT Corporation
08: *
09: * Licensed under the Educational Community License, Version 1.0 (the "License");
10: * you may not use this file except in compliance with the License.
11: * You may obtain a copy of the License at
12: *
13: * http://www.opensource.org/licenses/ecl1.php
14: *
15: * Unless required by applicable law or agreed to in writing, software
16: * distributed under the License is distributed on an "AS IS" BASIS,
17: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18: * See the License for the specific language governing permissions and
19: * limitations under the License.
20: *
21: **********************************************************************************/package org.sakaiproject.tool.gradebook.facades;
22:
23: import org.sakaiproject.service.gradebook.shared.UnknownUserException;
24:
25: /**
26: * Facade to a user directory service provided by the framework.
27: */
28: public interface UserDirectoryService {
29:
30: /**
31: * Looks up a user's display name based on their uid.
32: *
33: * TODO See if there's some way to narrow this broad method. It's used only in two places:
34: *
35: * 1) When displaying a grade history log, it's used to obtain a grader's name based on their user UID.
36: * In this case, it couldn't be replaced by checking just people who play an explict part in the
37: * gradebook, since Authz may have let administrators change scores, or the grader may no longer play
38: * an active part. The only workaround is to pick up the currently authorized user's name and then
39: * store it as an additional field in the grade history log.
40: * 2) In the student view, it's currently used to display the student's name. This case could be
41: * handled by supporting either a SectionAwareness getEnrollmentForUserUid() method or an Authn
42: * getCurrentUserDisplayName() method.
43: */
44: public String getUserDisplayName(String userUid)
45: throws UnknownUserException;
46: }
|