| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.student.enrollment.class2.grading.service.decorators; |
| 17 | |
|
| 18 | |
import java.util.List; |
| 19 | |
|
| 20 | |
|
| 21 | |
import org.kuali.rice.kim.api.permission.PermissionService; |
| 22 | |
import org.kuali.student.enrollment.grading.dto.GradeRosterEntryInfo; |
| 23 | |
import org.kuali.student.enrollment.grading.dto.GradeRosterInfo; |
| 24 | |
import org.kuali.student.enrollment.grading.dto.GradeValuesGroupInfo; |
| 25 | |
import org.kuali.student.enrollment.grading.service.GradingServiceDecorator; |
| 26 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
| 27 | |
import org.kuali.student.r2.common.dto.StatusInfo; |
| 28 | |
import org.kuali.student.r2.common.dto.ValidationResultInfo; |
| 29 | |
import org.kuali.student.r2.common.exceptions.AlreadyExistsException; |
| 30 | |
import org.kuali.student.r2.common.exceptions.DataValidationErrorException; |
| 31 | |
import org.kuali.student.r2.common.exceptions.DoesNotExistException; |
| 32 | |
import org.kuali.student.r2.common.exceptions.InvalidParameterException; |
| 33 | |
import org.kuali.student.r2.common.exceptions.MissingParameterException; |
| 34 | |
import org.kuali.student.r2.common.exceptions.OperationFailedException; |
| 35 | |
import org.kuali.student.r2.common.exceptions.PermissionDeniedException; |
| 36 | |
import org.kuali.student.r2.common.exceptions.VersionMismatchException; |
| 37 | |
import org.kuali.student.r2.common.infc.HoldsPermissionService; |
| 38 | |
import org.kuali.student.r2.core.type.dto.TypeInfo; |
| 39 | |
|
| 40 | |
|
| 41 | 0 | public class GradingServiceAuthorizationDecorator extends GradingServiceDecorator implements HoldsPermissionService{ |
| 42 | |
private PermissionService permissionService; |
| 43 | |
|
| 44 | |
@Override |
| 45 | |
public PermissionService getPermissionService() { |
| 46 | 0 | return permissionService; |
| 47 | |
} |
| 48 | |
|
| 49 | |
@Override |
| 50 | |
public void setPermissionService(PermissionService permissionService) { |
| 51 | 0 | this.permissionService = permissionService; |
| 52 | 0 | } |
| 53 | |
|
| 54 | |
@Override |
| 55 | |
public TypeInfo getGradeRosterType(String gradeRosterTypeKey, ContextInfo context) throws DoesNotExistException, |
| 56 | |
InvalidParameterException, MissingParameterException, OperationFailedException { |
| 57 | 0 | return getNextDecorator().getGradeRosterType(gradeRosterTypeKey, context); |
| 58 | |
} |
| 59 | |
|
| 60 | |
@Override |
| 61 | |
public GradeRosterInfo getGradeRoster(String gradeRosterId, ContextInfo context) throws DoesNotExistException, |
| 62 | |
InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 63 | 0 | return getNextDecorator().getGradeRoster(gradeRosterId, context); |
| 64 | |
} |
| 65 | |
|
| 66 | |
@Override |
| 67 | |
public List<GradeRosterInfo> getGradeRostersByGraderAndTerm(String graderId, String termId, ContextInfo context) |
| 68 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 69 | |
OperationFailedException, PermissionDeniedException { |
| 70 | 0 | return getNextDecorator().getGradeRostersByGraderAndTerm(graderId, termId, context); |
| 71 | |
} |
| 72 | |
|
| 73 | |
@Override |
| 74 | |
public List<GradeRosterInfo> getFinalGradeRostersForCourseOffering(String courseOfferingId, ContextInfo context) |
| 75 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 76 | |
OperationFailedException, PermissionDeniedException { |
| 77 | 0 | return getNextDecorator().getGradeRostersForActivityOffering(courseOfferingId, context); |
| 78 | |
} |
| 79 | |
|
| 80 | |
@Override |
| 81 | |
public List<GradeRosterInfo> getFinalGradeRostersForActivityOffering(String activityOfferingId, ContextInfo context) |
| 82 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 83 | |
OperationFailedException, PermissionDeniedException { |
| 84 | 0 | return getNextDecorator().getFinalGradeRostersForActivityOffering(activityOfferingId, context); |
| 85 | |
} |
| 86 | |
|
| 87 | |
@Override |
| 88 | |
public List<GradeRosterInfo> getGradeRostersForActivityOffering(String activityOfferingId, ContextInfo context) |
| 89 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 90 | |
OperationFailedException, PermissionDeniedException { |
| 91 | 0 | return getNextDecorator().getGradeRostersForActivityOffering(activityOfferingId, context); |
| 92 | |
} |
| 93 | |
|
| 94 | |
@Override |
| 95 | |
public GradeRosterInfo buildInterimGradeRosterByType(String courseOfferingId, List<String> activityOfferingIds, |
| 96 | |
String rosterTypeKey, ContextInfo context) throws AlreadyExistsException, InvalidParameterException, |
| 97 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 98 | 0 | return getNextDecorator().buildInterimGradeRosterByType(courseOfferingId, activityOfferingIds, |
| 99 | |
rosterTypeKey, context); |
| 100 | |
} |
| 101 | |
|
| 102 | |
@Override |
| 103 | |
public GradeRosterInfo updateInterimGradeRoster(GradeRosterInfo gradeRoster, ContextInfo context) |
| 104 | |
throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, |
| 105 | |
MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException { |
| 106 | 0 | return getNextDecorator().updateInterimGradeRoster(gradeRoster, context); |
| 107 | |
} |
| 108 | |
|
| 109 | |
@Override |
| 110 | |
public StatusInfo deleteInterimGradeRoster(String gradeRosterId, ContextInfo context) throws DoesNotExistException, |
| 111 | |
InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 112 | 0 | return getNextDecorator().deleteInterimGradeRoster(gradeRosterId, context); |
| 113 | |
} |
| 114 | |
|
| 115 | |
@Override |
| 116 | |
public GradeRosterInfo updateFinalGradeRosterState(String gradeRosterId, String stateKey, ContextInfo context) |
| 117 | |
throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, |
| 118 | |
MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException { |
| 119 | 0 | return getNextDecorator().updateFinalGradeRosterState(gradeRosterId, stateKey, context); |
| 120 | |
|
| 121 | |
} |
| 122 | |
|
| 123 | |
@Override |
| 124 | |
public List<ValidationResultInfo> validateGradeRoster(GradeRosterInfo gradeRoster, ContextInfo context) |
| 125 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 126 | |
OperationFailedException { |
| 127 | 0 | return getNextDecorator().validateGradeRoster(gradeRoster, context); |
| 128 | |
} |
| 129 | |
|
| 130 | |
@Override |
| 131 | |
public GradeRosterEntryInfo getGradeRosterEntry(String gradeRosterEntryId, ContextInfo context) |
| 132 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 133 | |
OperationFailedException, PermissionDeniedException { |
| 134 | 0 | return getNextDecorator().getGradeRosterEntry(gradeRosterEntryId, context); |
| 135 | |
} |
| 136 | |
|
| 137 | |
@Override |
| 138 | |
public List<GradeRosterEntryInfo> getGradeRosterEntriesByIds(List<String> gradeRosterEntryIds, |
| 139 | |
ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 140 | |
OperationFailedException, PermissionDeniedException { |
| 141 | 0 | return getNextDecorator().getGradeRosterEntriesByIds(gradeRosterEntryIds, context); |
| 142 | |
} |
| 143 | |
|
| 144 | |
@Override |
| 145 | |
public List<GradeRosterEntryInfo> getGradeRosterEntriesByRosterId(String gradeRosterId, ContextInfo context) |
| 146 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 147 | |
OperationFailedException, PermissionDeniedException { |
| 148 | 0 | return getNextDecorator().getGradeRosterEntriesByRosterId(gradeRosterId, context); |
| 149 | |
} |
| 150 | |
|
| 151 | |
@Override |
| 152 | |
public GradeRosterEntryInfo addEntrytoInterimRoster(GradeRosterEntryInfo gradeRosterEntry, String gradeRosterId, |
| 153 | |
ContextInfo context) throws AlreadyExistsException, InvalidParameterException, MissingParameterException, |
| 154 | |
OperationFailedException, PermissionDeniedException { |
| 155 | |
|
| 156 | 0 | return getNextDecorator().addEntrytoInterimRoster(gradeRosterEntry, gradeRosterId, context); |
| 157 | |
} |
| 158 | |
|
| 159 | |
@Override |
| 160 | |
public StatusInfo removeEntryFromInterimRoster(String gradeRosterEntryId, String gradeRosterId, ContextInfo context) |
| 161 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 162 | |
OperationFailedException, PermissionDeniedException { |
| 163 | 0 | return getNextDecorator().removeEntryFromInterimRoster(gradeRosterEntryId, gradeRosterId, context); |
| 164 | |
} |
| 165 | |
|
| 166 | |
@Override |
| 167 | |
public boolean updateGrade(String gradeRosterEntryId, String assignedGradeId, ContextInfo context) |
| 168 | |
throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, |
| 169 | |
MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException { |
| 170 | |
|
| 171 | 0 | return getNextDecorator().updateGrade(gradeRosterEntryId, assignedGradeId, context); |
| 172 | |
} |
| 173 | |
|
| 174 | |
@Override |
| 175 | |
public boolean updateCredit(String gradeRosterEntryId, String creditId, ContextInfo context) |
| 176 | |
throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, |
| 177 | |
MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException { |
| 178 | 0 | return getNextDecorator().updateCredit(gradeRosterEntryId, creditId, context); |
| 179 | |
} |
| 180 | |
|
| 181 | |
@Override |
| 182 | |
public List<GradeValuesGroupInfo> getGradeGroupsByKeyList( |
| 183 | |
List<String> gradeGroupKeyList, ContextInfo context) |
| 184 | |
throws DoesNotExistException, InvalidParameterException, |
| 185 | |
MissingParameterException, OperationFailedException, |
| 186 | |
PermissionDeniedException { |
| 187 | 0 | return getNextDecorator().getGradeGroupsByKeyList(gradeGroupKeyList, context); |
| 188 | |
} |
| 189 | |
|
| 190 | |
@Override |
| 191 | |
public boolean updateNumberGrade(String gradeRosterEntryId, |
| 192 | |
String numberGradeValue, ContextInfo context) |
| 193 | |
throws DataValidationErrorException, DoesNotExistException, |
| 194 | |
InvalidParameterException, MissingParameterException, |
| 195 | |
OperationFailedException, PermissionDeniedException, |
| 196 | |
VersionMismatchException { |
| 197 | 0 | return getNextDecorator().updateNumberGrade(gradeRosterEntryId, numberGradeValue, context); |
| 198 | |
} |
| 199 | |
|
| 200 | |
} |