01: /**********************************************************************************
02: *
03: * $Id: Authz.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 java.util.List;
24:
25: /**
26: * Facade to external role and authorization service.
27: */
28: public interface Authz {
29: public boolean isUserAbleToGrade(String gradebookUid);
30:
31: public boolean isUserAbleToGradeAll(String gradebookUid);
32:
33: public boolean isUserAbleToGradeSection(String sectionUid);
34:
35: public boolean isUserAbleToEditAssessments(String gradebookUid);
36:
37: public boolean isUserAbleToViewOwnGrades(String gradebookUid);
38:
39: /**
40: * This method is used by the external gradebook service but not
41: * by the gradebook application itself.
42: */
43: public boolean isUserAbleToGradeStudent(String gradebookUid,
44: String studentUid);
45:
46: /**
47: * @return
48: * an EnrollmentRecord list for each student that the current user
49: * is allowed to grade.
50: */
51: public List getAvailableEnrollments(String gradebookUid);
52:
53: /**
54: * @return
55: * a CourseSection list for each group that the current user
56: * belongs to.
57: */
58: public List getAvailableSections(String gradebookUid);
59:
60: /**
61: * The section enrollment list will not be returned unless the user
62: * has access to it.
63: *
64: * @return
65: * an EnrollmentRecord list for all the students in the given group.
66: */
67: public List getSectionEnrollments(String gradebookUid,
68: String sectionUid);
69:
70: /**
71: * @param searchString
72: * a substring search for student name or display UID; the exact rules are
73: * up to the implementation
74: *
75: * @param optionalSectionUid
76: * null if the search should be made across all sections
77: *
78: * @return
79: * an EnrollmentRecord list for all matching available students.
80: */
81: public List findMatchingEnrollments(String gradebookUid,
82: String searchString, String optionalSectionUid);
83: }
|