org.sakaiproject.tool.gradebook.facades.sections
Class AuthzSectionsImpl

java.lang.Object
  extended by org.sakaiproject.tool.gradebook.facades.sections.AuthzSectionsImpl
All Implemented Interfaces:
Authz
Direct Known Subclasses:
AuthzSakai2Impl

public class AuthzSectionsImpl
extends Object
implements Authz

An implementation of Gradebook-specific authorization needs based on the shared Section Awareness API.


Constructor Summary
AuthzSectionsImpl()
           
 
Method Summary
 Map findMatchingEnrollmentsForItem(String gradebookUid, Long categoryId, int gbCategoryType, String optionalSearchString, String optionalSectionUid)
           
 Map findMatchingEnrollmentsForItemForUser(String userUid, String gradebookUid, Long categoryId, int gbCategoryType, String optionalSearchString, String optionalSectionUid)
           
 Map findMatchingEnrollmentsForViewableCourseGrade(String gradebookUid, int gbCategoryType, String optionalSearchString, String optionalSectionUid)
           
 Map findMatchingEnrollmentsForViewableItems(String gradebookUid, List allGbItems, String optionalSearchString, String optionalSectionUid)
           
 List findStudentSectionMemberships(String gradebookUid, String studentUid)
           
 List getAllSections(String gradebookUid)
           
 Authn getAuthn()
           
 GradebookPermissionService getGradebookPermissionService()
           
 String getGradeViewFunctionForUserForStudentForItem(String gradebookUid, Long itemId, String studentUid)
           
 SectionAwareness getSectionAwareness()
           
 List getStudentSectionMembershipNames(String gradebookUid, String studentUid)
           
 List getViewableSections(String gradebookUid)
           
 boolean isUserAbleToEditAssessments(String gradebookUid)
           
 boolean isUserAbleToGrade(String gradebookUid)
           
 boolean isUserAbleToGrade(String gradebookUid, String userUid)
           
 boolean isUserAbleToGradeAll(String gradebookUid)
           
 boolean isUserAbleToGradeAll(String gradebookUid, String userUid)
           
 boolean isUserAbleToGradeItemForStudent(String gradebookUid, Long itemId, String studentUid)
           
 boolean isUserAbleToViewItemForStudent(String gradebookUid, Long itemId, String studentUid)
           
 boolean isUserAbleToViewOwnGrades(String gradebookUid)
           
 boolean isUserHasGraderPermissions(Long gradebookId)
           
 boolean isUserHasGraderPermissions(Long gradebookId, String userUid)
           
 boolean isUserHasGraderPermissions(String gradebookUid)
           
 boolean isUserHasGraderPermissions(String gradebookUid, String userUid)
           
 void setAuthn(Authn authn)
           
 void setGradebookPermissionService(GradebookPermissionService gradebookPermissionService)
           
 void setSectionAwareness(SectionAwareness sectionAwareness)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthzSectionsImpl

public AuthzSectionsImpl()
Method Detail

isUserAbleToGrade

public boolean isUserAbleToGrade(String gradebookUid)
Specified by:
isUserAbleToGrade in interface Authz

isUserAbleToGrade

public boolean isUserAbleToGrade(String gradebookUid,
                                 String userUid)
Specified by:
isUserAbleToGrade in interface Authz

isUserAbleToGradeAll

public boolean isUserAbleToGradeAll(String gradebookUid)
Specified by:
isUserAbleToGradeAll in interface Authz

isUserAbleToGradeAll

public boolean isUserAbleToGradeAll(String gradebookUid,
                                    String userUid)
Specified by:
isUserAbleToGradeAll in interface Authz

isUserHasGraderPermissions

public boolean isUserHasGraderPermissions(String gradebookUid)
Specified by:
isUserHasGraderPermissions in interface Authz

isUserHasGraderPermissions

public boolean isUserHasGraderPermissions(Long gradebookId)
Specified by:
isUserHasGraderPermissions in interface Authz

isUserHasGraderPermissions

public boolean isUserHasGraderPermissions(String gradebookUid,
                                          String userUid)
Specified by:
isUserHasGraderPermissions in interface Authz

isUserHasGraderPermissions

public boolean isUserHasGraderPermissions(Long gradebookId,
                                          String userUid)
Specified by:
isUserHasGraderPermissions in interface Authz

isUserAbleToEditAssessments

public boolean isUserAbleToEditAssessments(String gradebookUid)
Specified by:
isUserAbleToEditAssessments in interface Authz

isUserAbleToViewOwnGrades

public boolean isUserAbleToViewOwnGrades(String gradebookUid)
Specified by:
isUserAbleToViewOwnGrades in interface Authz

getGradeViewFunctionForUserForStudentForItem

public String getGradeViewFunctionForUserForStudentForItem(String gradebookUid,
                                                           Long itemId,
                                                           String studentUid)
Specified by:
getGradeViewFunctionForUserForStudentForItem in interface Authz

isUserAbleToGradeItemForStudent

public boolean isUserAbleToGradeItemForStudent(String gradebookUid,
                                               Long itemId,
                                               String studentUid)
                                        throws IllegalArgumentException
Specified by:
isUserAbleToGradeItemForStudent in interface Authz
Throws:
IllegalArgumentException

isUserAbleToViewItemForStudent

public boolean isUserAbleToViewItemForStudent(String gradebookUid,
                                              Long itemId,
                                              String studentUid)
                                       throws IllegalArgumentException
Specified by:
isUserAbleToViewItemForStudent in interface Authz
Throws:
IllegalArgumentException

getViewableSections

public List getViewableSections(String gradebookUid)
Specified by:
getViewableSections in interface Authz

getAllSections

public List getAllSections(String gradebookUid)
Specified by:
getAllSections in interface Authz

findMatchingEnrollmentsForItem

public Map findMatchingEnrollmentsForItem(String gradebookUid,
                                          Long categoryId,
                                          int gbCategoryType,
                                          String optionalSearchString,
                                          String optionalSectionUid)
Specified by:
findMatchingEnrollmentsForItem in interface Authz

findMatchingEnrollmentsForItemForUser

public Map findMatchingEnrollmentsForItemForUser(String userUid,
                                                 String gradebookUid,
                                                 Long categoryId,
                                                 int gbCategoryType,
                                                 String optionalSearchString,
                                                 String optionalSectionUid)
Specified by:
findMatchingEnrollmentsForItemForUser in interface Authz

findMatchingEnrollmentsForViewableCourseGrade

public Map findMatchingEnrollmentsForViewableCourseGrade(String gradebookUid,
                                                         int gbCategoryType,
                                                         String optionalSearchString,
                                                         String optionalSectionUid)
Specified by:
findMatchingEnrollmentsForViewableCourseGrade in interface Authz

findMatchingEnrollmentsForViewableItems

public Map findMatchingEnrollmentsForViewableItems(String gradebookUid,
                                                   List allGbItems,
                                                   String optionalSearchString,
                                                   String optionalSectionUid)
Specified by:
findMatchingEnrollmentsForViewableItems in interface Authz

findStudentSectionMemberships

public List findStudentSectionMemberships(String gradebookUid,
                                          String studentUid)
Specified by:
findStudentSectionMemberships in interface Authz

getStudentSectionMembershipNames

public List getStudentSectionMembershipNames(String gradebookUid,
                                             String studentUid)
Specified by:
getStudentSectionMembershipNames in interface Authz

getAuthn

public Authn getAuthn()

setAuthn

public void setAuthn(Authn authn)

getSectionAwareness

public SectionAwareness getSectionAwareness()

setSectionAwareness

public void setSectionAwareness(SectionAwareness sectionAwareness)

getGradebookPermissionService

public GradebookPermissionService getGradebookPermissionService()

setGradebookPermissionService

public void setGradebookPermissionService(GradebookPermissionService gradebookPermissionService)


Copyright © 2003-2013 Sakai Project. All Rights Reserved.