| 1 | |
package org.kuali.student.enrollment.class2.acal.service.decorators; |
| 2 | |
|
| 3 | |
import java.util.Date; |
| 4 | |
import java.util.List; |
| 5 | |
|
| 6 | |
|
| 7 | |
import org.kuali.rice.core.api.criteria.QueryByCriteria; |
| 8 | |
import org.kuali.rice.kim.api.permission.PermissionService; |
| 9 | |
|
| 10 | |
import org.kuali.student.enrollment.acal.dto.AcademicCalendarInfo; |
| 11 | |
import org.kuali.student.enrollment.acal.dto.HolidayCalendarInfo; |
| 12 | |
import org.kuali.student.enrollment.acal.dto.TermInfo; |
| 13 | |
import org.kuali.student.enrollment.acal.dto.HolidayInfo; |
| 14 | |
import org.kuali.student.enrollment.acal.dto.KeyDateInfo; |
| 15 | |
|
| 16 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
| 17 | |
import org.kuali.student.r2.common.dto.StatusInfo; |
| 18 | |
import org.kuali.student.r2.common.dto.ValidationResultInfo; |
| 19 | |
|
| 20 | |
import org.kuali.student.r2.common.exceptions.AlreadyExistsException; |
| 21 | |
import org.kuali.student.r2.common.exceptions.DataValidationErrorException; |
| 22 | |
import org.kuali.student.r2.common.exceptions.DoesNotExistException; |
| 23 | |
import org.kuali.student.r2.common.exceptions.InvalidParameterException; |
| 24 | |
import org.kuali.student.r2.common.exceptions.MissingParameterException; |
| 25 | |
import org.kuali.student.r2.common.exceptions.OperationFailedException; |
| 26 | |
import org.kuali.student.r2.common.exceptions.PermissionDeniedException; |
| 27 | |
import org.kuali.student.r2.common.exceptions.ReadOnlyException; |
| 28 | |
import org.kuali.student.r2.common.exceptions.VersionMismatchException; |
| 29 | |
|
| 30 | |
import org.kuali.student.r2.common.infc.HoldsPermissionService; |
| 31 | |
import org.kuali.student.r2.core.state.dto.StateInfo; |
| 32 | |
import org.kuali.student.r2.core.type.dto.TypeInfo; |
| 33 | |
|
| 34 | 0 | public class AcademicCalendarServiceAuthorizationDecorator |
| 35 | |
extends AcademicCalendarServiceDecorator |
| 36 | |
implements HoldsPermissionService { |
| 37 | |
|
| 38 | |
public static final String ENRLLMENT_NAMESPACE = "KS-ENROLL"; |
| 39 | |
public static final String SERVICE_NAME = "AcademicCalendarService."; |
| 40 | |
|
| 41 | |
private PermissionService permissionService; |
| 42 | |
|
| 43 | |
@Override |
| 44 | |
public PermissionService getPermissionService() { |
| 45 | 0 | return permissionService; |
| 46 | |
} |
| 47 | |
|
| 48 | |
@Override |
| 49 | |
public void setPermissionService(PermissionService permissionService) { |
| 50 | 0 | this.permissionService = permissionService; |
| 51 | 0 | } |
| 52 | |
|
| 53 | |
@Override |
| 54 | |
public TypeInfo getAcademicCalendarType(String academicCalendarTypeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 55 | |
OperationFailedException, PermissionDeniedException { |
| 56 | 0 | if (null == context) { |
| 57 | 0 | throw new MissingParameterException(); |
| 58 | |
} |
| 59 | |
|
| 60 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getAcademicCalendarType", null)) { |
| 61 | 0 | return getNextDecorator().getAcademicCalendarType(academicCalendarTypeKey, context); |
| 62 | |
} else { |
| 63 | 0 | throw new PermissionDeniedException (); |
| 64 | |
} |
| 65 | |
} |
| 66 | |
|
| 67 | |
@Override |
| 68 | |
public List<TypeInfo> getAcademicCalendarTypes(ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 69 | 0 | if (null == context) { |
| 70 | 0 | throw new MissingParameterException(); |
| 71 | |
} |
| 72 | |
|
| 73 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getAcademicCalendarTypes", null)) { |
| 74 | 0 | return getNextDecorator().getAcademicCalendarTypes(context); |
| 75 | |
} else { |
| 76 | 0 | throw new PermissionDeniedException (); |
| 77 | |
} |
| 78 | |
} |
| 79 | |
|
| 80 | |
@Override |
| 81 | |
public StateInfo getAcademicCalendarState(String academicCalendarStateKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 82 | |
OperationFailedException, PermissionDeniedException { |
| 83 | 0 | if (null == context) { |
| 84 | 0 | throw new MissingParameterException(); |
| 85 | |
} |
| 86 | |
|
| 87 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getAcademicCalendarState", null)) { |
| 88 | 0 | return getNextDecorator().getAcademicCalendarState(academicCalendarStateKey, context); |
| 89 | |
} else { |
| 90 | 0 | throw new PermissionDeniedException (); |
| 91 | |
} |
| 92 | |
} |
| 93 | |
|
| 94 | |
@Override |
| 95 | |
public List<StateInfo> getAcademicCalendarStates(ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 96 | 0 | if (null == context) { |
| 97 | 0 | throw new MissingParameterException(); |
| 98 | |
} |
| 99 | |
|
| 100 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getAcademicCalendarStates", null)) { |
| 101 | 0 | return getNextDecorator().getAcademicCalendarStates(context); |
| 102 | |
} else { |
| 103 | 0 | throw new PermissionDeniedException (); |
| 104 | |
} |
| 105 | |
} |
| 106 | |
|
| 107 | |
@Override |
| 108 | |
public AcademicCalendarInfo getAcademicCalendar(String academicCalendarKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 109 | |
OperationFailedException, PermissionDeniedException { |
| 110 | 0 | if (null == context) { |
| 111 | 0 | throw new MissingParameterException(); |
| 112 | |
} |
| 113 | |
|
| 114 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getAcademicCalendar", null)) { |
| 115 | 0 | return getNextDecorator().getAcademicCalendar(academicCalendarKey, context); |
| 116 | |
} else { |
| 117 | 0 | throw new PermissionDeniedException(); |
| 118 | |
} |
| 119 | |
} |
| 120 | |
|
| 121 | |
@Override |
| 122 | |
public List<AcademicCalendarInfo> getAcademicCalendarsByIds(List<String> academicCalendarKeyList, ContextInfo context) throws DoesNotExistException, InvalidParameterException, |
| 123 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 124 | 0 | if (null == context) { |
| 125 | 0 | throw new MissingParameterException(); |
| 126 | |
} |
| 127 | |
|
| 128 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getAcademicCalendarsByKeyList", null)) { |
| 129 | 0 | return getNextDecorator().getAcademicCalendarsByIds(academicCalendarKeyList, context); |
| 130 | |
} else { |
| 131 | 0 | throw new PermissionDeniedException(); |
| 132 | |
} |
| 133 | |
} |
| 134 | |
|
| 135 | |
@Override |
| 136 | |
public List<String> getAcademicCalendarIdsByType(String academicCalendarTypeKey, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 137 | |
PermissionDeniedException { |
| 138 | 0 | if (null == context) { |
| 139 | 0 | throw new MissingParameterException(); |
| 140 | |
} |
| 141 | |
|
| 142 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getAcademicCalendarIdsByType", null)) { |
| 143 | 0 | return getNextDecorator().getAcademicCalendarIdsByType(academicCalendarTypeKey, context); |
| 144 | |
} else { |
| 145 | 0 | throw new PermissionDeniedException(); |
| 146 | |
} |
| 147 | |
} |
| 148 | |
|
| 149 | |
@Override |
| 150 | |
public List<AcademicCalendarInfo> getAcademicCalendarsByStartYear(Integer year, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 151 | |
PermissionDeniedException { |
| 152 | 0 | if (null == context) { |
| 153 | 0 | throw new MissingParameterException(); |
| 154 | |
} |
| 155 | |
|
| 156 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getAcademicCalendarsByStartYear", null)) { |
| 157 | 0 | return getNextDecorator().getAcademicCalendarsByStartYear(year, context); |
| 158 | |
} else { |
| 159 | 0 | throw new PermissionDeniedException(); |
| 160 | |
} |
| 161 | |
} |
| 162 | |
|
| 163 | |
@Override |
| 164 | |
public List<String> searchForAcademicCalendarIds(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 165 | |
PermissionDeniedException { |
| 166 | 0 | if (null == context) { |
| 167 | 0 | throw new MissingParameterException(); |
| 168 | |
} |
| 169 | |
|
| 170 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "searchForAcademicCalendarIds", null)) { |
| 171 | 0 | return getNextDecorator().searchForAcademicCalendarIds(criteria, context); |
| 172 | |
} else { |
| 173 | 0 | throw new PermissionDeniedException(); |
| 174 | |
} |
| 175 | |
} |
| 176 | |
|
| 177 | |
@Override |
| 178 | |
public List<AcademicCalendarInfo> searchForAcademicCalendars(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 179 | |
PermissionDeniedException { |
| 180 | 0 | if (null == context) { |
| 181 | 0 | throw new MissingParameterException(); |
| 182 | |
} |
| 183 | |
|
| 184 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "searchForAcademicCalendars", null)) { |
| 185 | 0 | return getNextDecorator().searchForAcademicCalendars(criteria, context); |
| 186 | |
} else { |
| 187 | 0 | throw new PermissionDeniedException(); |
| 188 | |
} |
| 189 | |
} |
| 190 | |
|
| 191 | |
@Override |
| 192 | |
public AcademicCalendarInfo createAcademicCalendar(String academicCalendarTypeKey, AcademicCalendarInfo academicCalendarInfo, ContextInfo contextInfo) throws DataValidationErrorException, |
| 193 | |
DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
| 194 | 0 | if (null == contextInfo) { |
| 195 | 0 | throw new MissingParameterException(); |
| 196 | |
} |
| 197 | |
|
| 198 | 0 | if (permissionService.isAuthorized(contextInfo.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "createAcademicCalendar", null)) { |
| 199 | 0 | return getNextDecorator().createAcademicCalendar(academicCalendarTypeKey, academicCalendarInfo, contextInfo); |
| 200 | |
} else { |
| 201 | 0 | throw new PermissionDeniedException(); |
| 202 | |
} |
| 203 | |
} |
| 204 | |
|
| 205 | |
@Override |
| 206 | |
public AcademicCalendarInfo updateAcademicCalendar(String academicCalendarId, AcademicCalendarInfo academicCalendarInfo, ContextInfo context) throws DataValidationErrorException, |
| 207 | |
DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, ReadOnlyException { |
| 208 | |
|
| 209 | 0 | if (null == context) { |
| 210 | 0 | throw new MissingParameterException(); |
| 211 | |
} |
| 212 | |
|
| 213 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "updateAcademicCalendar", null)) { |
| 214 | 0 | return getNextDecorator().updateAcademicCalendar(academicCalendarId, academicCalendarInfo, context); |
| 215 | |
} else { |
| 216 | 0 | throw new PermissionDeniedException(); |
| 217 | |
} |
| 218 | |
} |
| 219 | |
|
| 220 | |
@Override |
| 221 | |
public StatusInfo deleteAcademicCalendar(String academicCalendarKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 222 | |
OperationFailedException, PermissionDeniedException { |
| 223 | 0 | if (null == context) { |
| 224 | 0 | throw new MissingParameterException(); |
| 225 | |
} |
| 226 | |
|
| 227 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "deleteAcademicCalendar", null)) { |
| 228 | 0 | return getNextDecorator().deleteAcademicCalendar(academicCalendarKey, context); |
| 229 | |
} else { |
| 230 | 0 | throw new PermissionDeniedException(); |
| 231 | |
} |
| 232 | |
} |
| 233 | |
|
| 234 | |
@Override |
| 235 | |
public AcademicCalendarInfo copyAcademicCalendar(String academicCalendarId, Date startDate, Date endDate, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, |
| 236 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 237 | |
|
| 238 | 0 | if (null == contextInfo) { |
| 239 | 0 | throw new MissingParameterException(); |
| 240 | |
} |
| 241 | |
|
| 242 | 0 | if (permissionService.isAuthorized(contextInfo.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "copyAcademicCalendar", null)) { |
| 243 | 0 | return getNextDecorator().copyAcademicCalendar(academicCalendarId, startDate, endDate, contextInfo); |
| 244 | |
} else { |
| 245 | 0 | throw new PermissionDeniedException(); |
| 246 | |
} |
| 247 | |
} |
| 248 | |
|
| 249 | |
@Override |
| 250 | |
public String getAcademicCalendarData(String academicCalendarKey, String calendarDataFormatTypeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, |
| 251 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 252 | 0 | if (null == context) { |
| 253 | 0 | throw new MissingParameterException(); |
| 254 | |
} |
| 255 | |
|
| 256 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getAcademicCalendarData", null)) { |
| 257 | 0 | return getNextDecorator().getAcademicCalendarData(academicCalendarKey, calendarDataFormatTypeKey, context); |
| 258 | |
} else { |
| 259 | 0 | throw new PermissionDeniedException(); |
| 260 | |
} |
| 261 | |
} |
| 262 | |
|
| 263 | |
@Override |
| 264 | |
public TypeInfo getHolidayCalendarType(String holidayCalendarTypeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 265 | |
OperationFailedException, PermissionDeniedException { |
| 266 | 0 | if (null == context) { |
| 267 | 0 | throw new MissingParameterException(); |
| 268 | |
} |
| 269 | |
|
| 270 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getHolidayCalendarType", null)) { |
| 271 | 0 | return getNextDecorator().getHolidayCalendarType(holidayCalendarTypeKey, context); |
| 272 | |
} else { |
| 273 | 0 | throw new PermissionDeniedException(); |
| 274 | |
} |
| 275 | |
} |
| 276 | |
|
| 277 | |
@Override |
| 278 | |
public List<TypeInfo> getHolidayCalendarTypes(ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 279 | 0 | if (null == context) { |
| 280 | 0 | throw new MissingParameterException(); |
| 281 | |
} |
| 282 | |
|
| 283 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getHolidayCalendarTypes", null)) { |
| 284 | 0 | return getNextDecorator().getHolidayCalendarTypes(context); |
| 285 | |
} else { |
| 286 | 0 | throw new PermissionDeniedException(); |
| 287 | |
} |
| 288 | |
} |
| 289 | |
|
| 290 | |
@Override |
| 291 | |
public StateInfo getHolidayCalendarState(String holidayCalendarStateKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 292 | |
OperationFailedException, PermissionDeniedException { |
| 293 | 0 | if (null == context) { |
| 294 | 0 | throw new MissingParameterException(); |
| 295 | |
} |
| 296 | |
|
| 297 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getHolidayCalendarState", null)) { |
| 298 | 0 | return getNextDecorator().getHolidayCalendarState(holidayCalendarStateKey, context); |
| 299 | |
} else { |
| 300 | 0 | throw new PermissionDeniedException (); |
| 301 | |
} |
| 302 | |
} |
| 303 | |
|
| 304 | |
@Override |
| 305 | |
public List<StateInfo> getHolidayCalendarStates(ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 306 | 0 | if (null == context) { |
| 307 | 0 | throw new MissingParameterException(); |
| 308 | |
} |
| 309 | |
|
| 310 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getHolidayCalendarStates", null)) { |
| 311 | 0 | return getNextDecorator().getHolidayCalendarStates(context); |
| 312 | |
} else { |
| 313 | 0 | throw new PermissionDeniedException (); |
| 314 | |
} |
| 315 | |
} |
| 316 | |
|
| 317 | |
@Override |
| 318 | |
public HolidayCalendarInfo getHolidayCalendar(String holidayCalendarId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 319 | |
OperationFailedException, PermissionDeniedException { |
| 320 | 0 | if (null == context) { |
| 321 | 0 | throw new MissingParameterException(); |
| 322 | |
} |
| 323 | |
|
| 324 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getHolidayCalendar", null)) { |
| 325 | 0 | return getNextDecorator().getHolidayCalendar(holidayCalendarId, context); |
| 326 | |
} else { |
| 327 | 0 | throw new PermissionDeniedException(); |
| 328 | |
} |
| 329 | |
} |
| 330 | |
|
| 331 | |
@Override |
| 332 | |
public List<HolidayCalendarInfo> getHolidayCalendarsByIds(List<String> holidayCalendarIds, ContextInfo context) throws DoesNotExistException, InvalidParameterException, |
| 333 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 334 | 0 | if (null == context) { |
| 335 | 0 | throw new MissingParameterException(); |
| 336 | |
} |
| 337 | |
|
| 338 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getHolidayCalendarsByKeyList", null)) { |
| 339 | 0 | return getNextDecorator().getHolidayCalendarsByIds(holidayCalendarIds, context); |
| 340 | |
} else { |
| 341 | 0 | throw new PermissionDeniedException(); |
| 342 | |
} |
| 343 | |
} |
| 344 | |
|
| 345 | |
@Override |
| 346 | |
public List<String> getHolidayCalendarIdsByType(String holidayCalendarTypeKey, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 347 | |
PermissionDeniedException { |
| 348 | 0 | if (null == context) { |
| 349 | 0 | throw new MissingParameterException(); |
| 350 | |
} |
| 351 | |
|
| 352 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getHolidayCalendarIdsByType", null)) { |
| 353 | 0 | return getNextDecorator().getHolidayCalendarIdsByType(holidayCalendarTypeKey, context); |
| 354 | |
} else { |
| 355 | 0 | throw new PermissionDeniedException(); |
| 356 | |
} |
| 357 | |
} |
| 358 | |
|
| 359 | |
@Override |
| 360 | |
public List<HolidayCalendarInfo> getHolidayCalendarsByStartYear(Integer year, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 361 | |
PermissionDeniedException { |
| 362 | 0 | if (null == context) { |
| 363 | 0 | throw new MissingParameterException(); |
| 364 | |
} |
| 365 | |
|
| 366 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getHolidayCalendarsByStartYear", null)) { |
| 367 | 0 | return getNextDecorator().getHolidayCalendarsByStartYear(year, context); |
| 368 | |
} else { |
| 369 | 0 | throw new PermissionDeniedException(); |
| 370 | |
} |
| 371 | |
} |
| 372 | |
|
| 373 | |
@Override |
| 374 | |
public List<String> searchForHolidayCalendarIds(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 375 | |
PermissionDeniedException { |
| 376 | 0 | if (null == context) { |
| 377 | 0 | throw new MissingParameterException(); |
| 378 | |
} |
| 379 | |
|
| 380 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "searchForHolidayCalendarIds", null)) { |
| 381 | 0 | return getNextDecorator().searchForHolidayCalendarIds(criteria, context); |
| 382 | |
} else { |
| 383 | 0 | throw new PermissionDeniedException(); |
| 384 | |
} |
| 385 | |
} |
| 386 | |
|
| 387 | |
@Override |
| 388 | |
public List<HolidayCalendarInfo> searchForHolidayCalendars(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 389 | |
PermissionDeniedException { |
| 390 | 0 | if (null == context) { |
| 391 | 0 | throw new MissingParameterException(); |
| 392 | |
} |
| 393 | |
|
| 394 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "searchForHolidayCalendars", null)) { |
| 395 | 0 | return getNextDecorator().searchForHolidayCalendars(criteria, context); |
| 396 | |
} else { |
| 397 | 0 | throw new PermissionDeniedException(); |
| 398 | |
} |
| 399 | |
} |
| 400 | |
|
| 401 | |
@Override |
| 402 | |
public List<ValidationResultInfo> validateHolidayCalendar(String validationTypeKey, String holidayCalendarTypeKey, HolidayCalendarInfo holidayCalendarInfo, ContextInfo contextInfo) |
| 403 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 404 | 0 | if (null == contextInfo) { |
| 405 | 0 | throw new MissingParameterException(); |
| 406 | |
} |
| 407 | |
|
| 408 | 0 | if (permissionService.isAuthorized(contextInfo.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "validateHolidayCalendar", null)) { |
| 409 | 0 | return getNextDecorator().validateHolidayCalendar(validationTypeKey, holidayCalendarTypeKey, holidayCalendarInfo, contextInfo); |
| 410 | |
} else { |
| 411 | 0 | throw new PermissionDeniedException (); |
| 412 | |
} |
| 413 | |
} |
| 414 | |
|
| 415 | |
@Override |
| 416 | |
public HolidayCalendarInfo createHolidayCalendar(String holidayCalendarTypeKey, HolidayCalendarInfo holidayCalendarInfo, ContextInfo context) throws DataValidationErrorException, |
| 417 | |
DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
| 418 | 0 | if (null == context) { |
| 419 | 0 | throw new MissingParameterException(); |
| 420 | |
} |
| 421 | |
|
| 422 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "createHolidayCalendar", null)) { |
| 423 | 0 | return getNextDecorator().createHolidayCalendar(holidayCalendarTypeKey, holidayCalendarInfo, context); |
| 424 | |
} else { |
| 425 | 0 | throw new PermissionDeniedException(); |
| 426 | |
} |
| 427 | |
} |
| 428 | |
|
| 429 | |
@Override |
| 430 | |
public HolidayCalendarInfo updateHolidayCalendar(String holidayCalendarTypeKey, HolidayCalendarInfo holidayCalendarInfo, ContextInfo context) throws DataValidationErrorException, |
| 431 | |
DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, ReadOnlyException { |
| 432 | 0 | if (null == context) { |
| 433 | 0 | throw new MissingParameterException(); |
| 434 | |
} |
| 435 | |
|
| 436 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "updateHolidayCalendar", null)) { |
| 437 | 0 | return getNextDecorator().updateHolidayCalendar(holidayCalendarTypeKey, holidayCalendarInfo, context); |
| 438 | |
} else { |
| 439 | 0 | throw new PermissionDeniedException(); |
| 440 | |
} |
| 441 | |
} |
| 442 | |
|
| 443 | |
@Override |
| 444 | |
public StatusInfo deleteHolidayCalendar(String holidayCalendarId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 445 | |
OperationFailedException, PermissionDeniedException { |
| 446 | 0 | if (null == context) { |
| 447 | 0 | throw new MissingParameterException(); |
| 448 | |
} |
| 449 | |
|
| 450 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "deleteHolidayCalendar", null)) { |
| 451 | 0 | return getNextDecorator().deleteHolidayCalendar(holidayCalendarId, context); |
| 452 | |
} else { |
| 453 | 0 | throw new PermissionDeniedException(); |
| 454 | |
} |
| 455 | |
} |
| 456 | |
|
| 457 | |
@Override |
| 458 | |
public TypeInfo getTermType(String termTypeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 459 | |
|
| 460 | 0 | if (null == context) { |
| 461 | 0 | throw new MissingParameterException(); |
| 462 | |
} |
| 463 | |
|
| 464 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getTermType", null)) { |
| 465 | 0 | return getNextDecorator().getTermType(termTypeKey, context); |
| 466 | |
} else { |
| 467 | 0 | throw new PermissionDeniedException (); |
| 468 | |
} |
| 469 | |
} |
| 470 | |
|
| 471 | |
@Override |
| 472 | |
public List<TypeInfo> getTermTypes(ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 473 | |
|
| 474 | 0 | if (null == context) { |
| 475 | 0 | throw new MissingParameterException(); |
| 476 | |
} |
| 477 | |
|
| 478 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getTermTypes", null)) { |
| 479 | 0 | return getNextDecorator().getTermTypes(context); |
| 480 | |
} else { |
| 481 | 0 | throw new PermissionDeniedException (); |
| 482 | |
} |
| 483 | |
} |
| 484 | |
|
| 485 | |
@Override |
| 486 | |
public List<TypeInfo> getTermTypesForAcademicCalendarType(String academicCalendarTypeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 487 | |
OperationFailedException, PermissionDeniedException { |
| 488 | |
|
| 489 | 0 | if (null == context) { |
| 490 | 0 | throw new MissingParameterException(); |
| 491 | |
} |
| 492 | |
|
| 493 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getTermTypesForAcademicCalendarType", null)) { |
| 494 | 0 | return getNextDecorator().getTermTypesForAcademicCalendarType(academicCalendarTypeKey, context); |
| 495 | |
} else { |
| 496 | 0 | throw new PermissionDeniedException (); |
| 497 | |
} |
| 498 | |
} |
| 499 | |
|
| 500 | |
@Override |
| 501 | |
public List<TypeInfo> getTermTypesForTermType(String termTypeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, |
| 502 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 503 | |
|
| 504 | 0 | if (null == context) { |
| 505 | 0 | throw new MissingParameterException(); |
| 506 | |
} |
| 507 | |
|
| 508 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getTermTypesForTermType", null)) { |
| 509 | 0 | return getNextDecorator().getTermTypesForTermType(termTypeKey, context); |
| 510 | |
} else { |
| 511 | 0 | throw new PermissionDeniedException (); |
| 512 | |
} |
| 513 | |
} |
| 514 | |
|
| 515 | |
@Override |
| 516 | |
public StateInfo getTermState(String termStateKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, |
| 517 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 518 | |
|
| 519 | 0 | if (null == context) { |
| 520 | 0 | throw new MissingParameterException(); |
| 521 | |
} |
| 522 | |
|
| 523 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getTermState", null)) { |
| 524 | 0 | return getNextDecorator().getTermState(termStateKey, context); |
| 525 | |
} else { |
| 526 | 0 | throw new PermissionDeniedException (); |
| 527 | |
} |
| 528 | |
} |
| 529 | |
|
| 530 | |
@Override |
| 531 | |
public List<StateInfo> getTermStates(ContextInfo context) throws InvalidParameterException, |
| 532 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 533 | 0 | if (null == context) { |
| 534 | 0 | throw new MissingParameterException(); |
| 535 | |
} |
| 536 | |
|
| 537 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getTermStates", null)) { |
| 538 | 0 | return getNextDecorator().getTermStates(context); |
| 539 | |
} else { |
| 540 | 0 | throw new PermissionDeniedException (); |
| 541 | |
} |
| 542 | |
} |
| 543 | |
|
| 544 | |
@Override |
| 545 | |
public TermInfo getTerm(String termId, ContextInfo context) throws DoesNotExistException, |
| 546 | |
InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 547 | 0 | if (null == context) { |
| 548 | 0 | throw new MissingParameterException(); |
| 549 | |
} |
| 550 | |
|
| 551 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getTerm", null)) { |
| 552 | 0 | return getNextDecorator().getTerm(termId, context); |
| 553 | |
} else { |
| 554 | 0 | throw new PermissionDeniedException(); |
| 555 | |
} |
| 556 | |
} |
| 557 | |
|
| 558 | |
@Override |
| 559 | |
public List<TermInfo> getTermsByIds(List<String> termIds, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 560 | |
PermissionDeniedException { |
| 561 | |
|
| 562 | 0 | if (null == context) { |
| 563 | 0 | throw new MissingParameterException(); |
| 564 | |
} |
| 565 | |
|
| 566 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getTermsByKeyList", null)) { |
| 567 | 0 | return getNextDecorator().getTermsByIds(termIds, context); |
| 568 | |
} else { |
| 569 | 0 | throw new PermissionDeniedException(); |
| 570 | |
} |
| 571 | |
} |
| 572 | |
|
| 573 | |
@Override |
| 574 | |
public List<String> getTermIdsByType(String termTypeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 575 | 0 | if (null == context) { |
| 576 | 0 | throw new MissingParameterException(); |
| 577 | |
} |
| 578 | |
|
| 579 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getTermIdsByType", null)) { |
| 580 | 0 | return getNextDecorator().getTermIdsByType(termTypeKey, context); |
| 581 | |
} else { |
| 582 | 0 | throw new PermissionDeniedException(); |
| 583 | |
} |
| 584 | |
} |
| 585 | |
|
| 586 | |
@Override |
| 587 | |
public List<TermInfo> getTermsForAcademicCalendar(String academicCalendarKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 588 | |
OperationFailedException, PermissionDeniedException { |
| 589 | |
|
| 590 | 0 | if (null == context) { |
| 591 | 0 | throw new MissingParameterException(); |
| 592 | |
} |
| 593 | |
|
| 594 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getTermsForAcademicCalendar", null)) { |
| 595 | 0 | return getNextDecorator().getTermsForAcademicCalendar(academicCalendarKey, context); |
| 596 | |
} else { |
| 597 | 0 | throw new PermissionDeniedException(); |
| 598 | |
} |
| 599 | |
} |
| 600 | |
|
| 601 | |
@Override |
| 602 | |
public List<TermInfo> getCurrentTerms(String processKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 603 | |
PermissionDeniedException { |
| 604 | |
|
| 605 | 0 | if (null == context) { |
| 606 | 0 | throw new MissingParameterException(); |
| 607 | |
} |
| 608 | |
|
| 609 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getCurrentTerms", null)) { |
| 610 | 0 | return getNextDecorator().getCurrentTerms(processKey, context); |
| 611 | |
} else { |
| 612 | 0 | throw new PermissionDeniedException(); |
| 613 | |
} |
| 614 | |
} |
| 615 | |
|
| 616 | |
@Override |
| 617 | |
public List<TermInfo> getIncludedTermsInTerm(String termId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 618 | |
PermissionDeniedException { |
| 619 | |
|
| 620 | 0 | if (null == context) { |
| 621 | 0 | throw new MissingParameterException(); |
| 622 | |
} |
| 623 | |
|
| 624 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getIncludedTermsInTerm", null)) { |
| 625 | 0 | return getNextDecorator().getIncludedTermsInTerm(termId, context); |
| 626 | |
} else { |
| 627 | 0 | throw new PermissionDeniedException(); |
| 628 | |
} |
| 629 | |
} |
| 630 | |
|
| 631 | |
@Override |
| 632 | |
public List<TermInfo> getContainingTerms(String termId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 633 | |
PermissionDeniedException { |
| 634 | 0 | if (null == context) { |
| 635 | 0 | throw new MissingParameterException(); |
| 636 | |
} |
| 637 | |
|
| 638 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getContainingTerms", null)) { |
| 639 | 0 | return getNextDecorator().getContainingTerms(termId, context); |
| 640 | |
} else { |
| 641 | 0 | throw new PermissionDeniedException(); |
| 642 | |
} |
| 643 | |
} |
| 644 | |
|
| 645 | |
@Override |
| 646 | |
public List<String> searchForTermIds(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 647 | |
PermissionDeniedException { |
| 648 | 0 | if (null == context) { |
| 649 | 0 | throw new MissingParameterException(); |
| 650 | |
} |
| 651 | |
|
| 652 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "searchForTermIds", null)) { |
| 653 | 0 | return getNextDecorator().searchForTermIds(criteria, context); |
| 654 | |
} else { |
| 655 | 0 | throw new PermissionDeniedException(); |
| 656 | |
} |
| 657 | |
} |
| 658 | |
|
| 659 | |
@Override |
| 660 | |
public List<TermInfo> searchForTerms(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 661 | |
PermissionDeniedException { |
| 662 | 0 | if (null == context) { |
| 663 | 0 | throw new MissingParameterException(); |
| 664 | |
} |
| 665 | |
|
| 666 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "searchForTerms", null)) { |
| 667 | 0 | return getNextDecorator().searchForTerms(criteria, context); |
| 668 | |
} else { |
| 669 | 0 | throw new PermissionDeniedException(); |
| 670 | |
} |
| 671 | |
} |
| 672 | |
|
| 673 | |
@Override |
| 674 | |
public TermInfo createTerm(String termTypeKey, TermInfo termInfo, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, |
| 675 | |
MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
| 676 | 0 | if (null == context) { |
| 677 | 0 | throw new MissingParameterException(); |
| 678 | |
} |
| 679 | |
|
| 680 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "createTerm", null)) { |
| 681 | 0 | return getNextDecorator().createTerm(termTypeKey, termInfo, context); |
| 682 | |
} else { |
| 683 | 0 | throw new PermissionDeniedException(); |
| 684 | |
} |
| 685 | |
} |
| 686 | |
|
| 687 | |
@Override |
| 688 | |
public TermInfo updateTerm(String termId, TermInfo termInfo, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 689 | |
OperationFailedException, PermissionDeniedException, VersionMismatchException, ReadOnlyException { |
| 690 | 0 | if (null == context) { |
| 691 | 0 | throw new MissingParameterException(); |
| 692 | |
} |
| 693 | |
|
| 694 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "updateTerm", null)) { |
| 695 | 0 | return getNextDecorator().updateTerm(termId, termInfo, context); |
| 696 | |
} else { |
| 697 | 0 | throw new PermissionDeniedException(); |
| 698 | |
} |
| 699 | |
} |
| 700 | |
|
| 701 | |
@Override |
| 702 | |
public StatusInfo deleteTerm(String termId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 703 | |
PermissionDeniedException { |
| 704 | 0 | if (null == context) { |
| 705 | 0 | throw new MissingParameterException(); |
| 706 | |
} |
| 707 | |
|
| 708 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "deleteTerm", null)) { |
| 709 | 0 | return getNextDecorator().deleteTerm(termId, context); |
| 710 | |
} else { |
| 711 | 0 | throw new PermissionDeniedException(); |
| 712 | |
} |
| 713 | |
} |
| 714 | |
|
| 715 | |
@Override |
| 716 | |
public StatusInfo addTermToAcademicCalendar(String academicCalendarKey, String termId, ContextInfo context) throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, |
| 717 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 718 | 0 | if (null == context) { |
| 719 | 0 | throw new MissingParameterException(); |
| 720 | |
} |
| 721 | |
|
| 722 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "addTermToAcademicCalendar", null)) { |
| 723 | 0 | return getNextDecorator().addTermToAcademicCalendar(academicCalendarKey, termId, context); |
| 724 | |
} else { |
| 725 | 0 | throw new PermissionDeniedException(); |
| 726 | |
} |
| 727 | |
} |
| 728 | |
|
| 729 | |
@Override |
| 730 | |
public StatusInfo removeTermFromAcademicCalendar(String academicCalendarKey, String termId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, |
| 731 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 732 | 0 | if (null == context) { |
| 733 | 0 | throw new MissingParameterException(); |
| 734 | |
} |
| 735 | |
|
| 736 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "removeTermFromAcademicCalendar", null)) { |
| 737 | 0 | return getNextDecorator().removeTermFromAcademicCalendar(academicCalendarKey, termId, context); |
| 738 | |
} else { |
| 739 | 0 | throw new PermissionDeniedException(); |
| 740 | |
} |
| 741 | |
} |
| 742 | |
|
| 743 | |
@Override |
| 744 | |
public StatusInfo addTermToTerm(String termId, String includedTermId, ContextInfo context) throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, |
| 745 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 746 | 0 | if (null == context) { |
| 747 | 0 | throw new MissingParameterException(); |
| 748 | |
} |
| 749 | |
|
| 750 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "addTermToTerm", null)) { |
| 751 | 0 | return getNextDecorator().addTermToTerm(termId, includedTermId, context); |
| 752 | |
} else { |
| 753 | 0 | throw new PermissionDeniedException(); |
| 754 | |
} |
| 755 | |
} |
| 756 | |
|
| 757 | |
@Override |
| 758 | |
public StatusInfo removeTermFromTerm(String termId, String includedTermId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 759 | |
OperationFailedException, PermissionDeniedException { |
| 760 | 0 | if (null == context) { |
| 761 | 0 | throw new MissingParameterException(); |
| 762 | |
} |
| 763 | |
|
| 764 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "removeTermFromTerm", null)) { |
| 765 | 0 | return getNextDecorator().removeTermFromTerm(termId, includedTermId, context); |
| 766 | |
} else { |
| 767 | 0 | throw new PermissionDeniedException(); |
| 768 | |
} |
| 769 | |
} |
| 770 | |
|
| 771 | |
@Override |
| 772 | |
public TypeInfo getKeyDateType(String keyDateTypeKey, ContextInfo context) throws DoesNotExistException, |
| 773 | |
InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 774 | 0 | if (null == context) { |
| 775 | 0 | throw new MissingParameterException(); |
| 776 | |
} |
| 777 | |
|
| 778 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getKeyDateType", null)) { |
| 779 | 0 | return getNextDecorator().getKeyDateType(keyDateTypeKey, context); |
| 780 | |
} else { |
| 781 | 0 | throw new PermissionDeniedException (); |
| 782 | |
} |
| 783 | |
} |
| 784 | |
|
| 785 | |
@Override |
| 786 | |
public List<TypeInfo> getKeyDateTypesForTermType(String termTypeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 787 | |
OperationFailedException, PermissionDeniedException { |
| 788 | 0 | if (null == context) { |
| 789 | 0 | throw new MissingParameterException(); |
| 790 | |
} |
| 791 | |
|
| 792 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getKeyDateTypesForTermType", null)) { |
| 793 | 0 | return getNextDecorator().getKeyDateTypesForTermType(termTypeKey, context); |
| 794 | |
} else { |
| 795 | 0 | throw new PermissionDeniedException (); |
| 796 | |
} |
| 797 | |
} |
| 798 | |
|
| 799 | |
@Override |
| 800 | |
public KeyDateInfo getKeyDate(String keyDateId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 801 | |
PermissionDeniedException { |
| 802 | 0 | if (null == context) { |
| 803 | 0 | throw new MissingParameterException(); |
| 804 | |
} |
| 805 | |
|
| 806 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getKeyDate", null)) { |
| 807 | 0 | return getNextDecorator().getKeyDate(keyDateId, context); |
| 808 | |
} else { |
| 809 | 0 | throw new PermissionDeniedException(); |
| 810 | |
} |
| 811 | |
} |
| 812 | |
|
| 813 | |
@Override |
| 814 | |
public List<KeyDateInfo> getKeyDatesByIds(List<String> keyDateIds, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 815 | |
OperationFailedException, PermissionDeniedException { |
| 816 | 0 | if (null == context) { |
| 817 | 0 | throw new MissingParameterException(); |
| 818 | |
} |
| 819 | |
|
| 820 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getKeyDatesByKeyList", null)) { |
| 821 | 0 | return getNextDecorator().getKeyDatesByIds(keyDateIds, context); |
| 822 | |
} else { |
| 823 | 0 | throw new PermissionDeniedException(); |
| 824 | |
} |
| 825 | |
} |
| 826 | |
|
| 827 | |
@Override |
| 828 | |
public List<String> getKeyDateIdsByType(String keyDateTypeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 829 | |
PermissionDeniedException { |
| 830 | 0 | if (null == context) { |
| 831 | 0 | throw new MissingParameterException(); |
| 832 | |
} |
| 833 | |
|
| 834 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getKeyDateIdsByType", null)) { |
| 835 | 0 | return getNextDecorator().getKeyDateIdsByType(keyDateTypeKey, context); |
| 836 | |
} else { |
| 837 | 0 | throw new PermissionDeniedException(); |
| 838 | |
} |
| 839 | |
} |
| 840 | |
|
| 841 | |
@Override |
| 842 | |
public List<KeyDateInfo> getKeyDatesForTerm(String termId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 843 | |
PermissionDeniedException { |
| 844 | 0 | if (null == context) { |
| 845 | 0 | throw new MissingParameterException(); |
| 846 | |
} |
| 847 | |
|
| 848 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getKeyDatesForTerm", null)) { |
| 849 | 0 | return getNextDecorator().getKeyDatesForTerm(termId, context); |
| 850 | |
} else { |
| 851 | 0 | throw new PermissionDeniedException(); |
| 852 | |
} |
| 853 | |
} |
| 854 | |
|
| 855 | |
@Override |
| 856 | |
public List<KeyDateInfo> getKeyDatesForTermByDate(String termId, Date startDate, Date endDate, ContextInfo context) throws DoesNotExistException, InvalidParameterException, |
| 857 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 858 | 0 | if (null == context) { |
| 859 | 0 | throw new MissingParameterException(); |
| 860 | |
} |
| 861 | |
|
| 862 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getKeyDatesForTermByDate", null)) { |
| 863 | 0 | return getNextDecorator().getKeyDatesForTermByDate(termId, startDate, endDate, context); |
| 864 | |
} else { |
| 865 | 0 | throw new PermissionDeniedException(); |
| 866 | |
} |
| 867 | |
} |
| 868 | |
|
| 869 | |
@Override |
| 870 | |
public List<String> searchForKeyDateIds(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 871 | |
PermissionDeniedException { |
| 872 | 0 | if (null == context) { |
| 873 | 0 | throw new MissingParameterException(); |
| 874 | |
} |
| 875 | |
|
| 876 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "searchForKeyDateIds", null)) { |
| 877 | 0 | return getNextDecorator().searchForKeyDateIds(criteria, context); |
| 878 | |
} else { |
| 879 | 0 | throw new PermissionDeniedException(); |
| 880 | |
} |
| 881 | |
} |
| 882 | |
|
| 883 | |
@Override |
| 884 | |
public List<KeyDateInfo> searchForKeyDates(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 885 | |
PermissionDeniedException { |
| 886 | 0 | if (null == context) { |
| 887 | 0 | throw new MissingParameterException(); |
| 888 | |
} |
| 889 | |
|
| 890 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "searchForKeyDates", null)) { |
| 891 | 0 | return getNextDecorator().searchForKeyDates(criteria, context); |
| 892 | |
} else { |
| 893 | 0 | throw new PermissionDeniedException(); |
| 894 | |
} |
| 895 | |
} |
| 896 | |
|
| 897 | |
@Override |
| 898 | |
public List<ValidationResultInfo> validateKeyDate(String validationTypeKey, String termId, String keyDateTypeKey, KeyDateInfo keyDateInfo, ContextInfo contextInfo) throws DoesNotExistException, |
| 899 | |
InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 900 | 0 | if (null == contextInfo) { |
| 901 | 0 | throw new MissingParameterException(); |
| 902 | |
} |
| 903 | |
|
| 904 | 0 | if (permissionService.isAuthorized(contextInfo.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "validateKeyDate", null)) { |
| 905 | 0 | return getNextDecorator().validateKeyDate(validationTypeKey, termId, keyDateTypeKey, keyDateInfo, contextInfo); |
| 906 | |
} else { |
| 907 | 0 | throw new PermissionDeniedException (); |
| 908 | |
} |
| 909 | |
} |
| 910 | |
|
| 911 | |
@Override |
| 912 | |
public KeyDateInfo updateKeyDate(String keyDateId, KeyDateInfo keyDateInfo, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, |
| 913 | |
MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, ReadOnlyException { |
| 914 | 0 | if (null == context) { |
| 915 | 0 | throw new MissingParameterException(); |
| 916 | |
} |
| 917 | |
|
| 918 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "updateKeyDate", null)) { |
| 919 | 0 | return getNextDecorator().updateKeyDate(keyDateId, keyDateInfo, context); |
| 920 | |
} else { |
| 921 | 0 | throw new PermissionDeniedException(); |
| 922 | |
} |
| 923 | |
} |
| 924 | |
|
| 925 | |
@Override |
| 926 | |
public StatusInfo deleteKeyDate(String keyDateId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 927 | |
PermissionDeniedException { |
| 928 | 0 | if (null == context) { |
| 929 | 0 | throw new MissingParameterException(); |
| 930 | |
} |
| 931 | |
|
| 932 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "deleteKeyDate", null)) { |
| 933 | 0 | return getNextDecorator().deleteKeyDate(keyDateId, context); |
| 934 | |
} else { |
| 935 | 0 | throw new PermissionDeniedException(); |
| 936 | |
} |
| 937 | |
} |
| 938 | |
|
| 939 | |
@Override |
| 940 | |
public TypeInfo getHolidayType(String holidayTypeKey, ContextInfo context) throws DoesNotExistException, |
| 941 | |
InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 942 | 0 | if (null == context) { |
| 943 | 0 | throw new MissingParameterException(); |
| 944 | |
} |
| 945 | |
|
| 946 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getHolidayType", null)) { |
| 947 | 0 | return getNextDecorator().getHolidayType(holidayTypeKey, context); |
| 948 | |
} else { |
| 949 | 0 | throw new PermissionDeniedException (); |
| 950 | |
} |
| 951 | |
} |
| 952 | |
|
| 953 | |
@Override |
| 954 | |
public List<String> searchForHolidayIds(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 955 | |
PermissionDeniedException { |
| 956 | 0 | if (null == context) { |
| 957 | 0 | throw new MissingParameterException(); |
| 958 | |
} |
| 959 | |
|
| 960 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "searchForHolidayKeys", null)) { |
| 961 | 0 | return getNextDecorator().searchForHolidayIds(criteria, context); |
| 962 | |
} else { |
| 963 | 0 | throw new PermissionDeniedException(); |
| 964 | |
} |
| 965 | |
} |
| 966 | |
|
| 967 | |
@Override |
| 968 | |
public List<HolidayInfo> searchForHolidays(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
| 969 | |
PermissionDeniedException { |
| 970 | 0 | if (null == context) { |
| 971 | 0 | throw new MissingParameterException(); |
| 972 | |
} |
| 973 | |
|
| 974 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "searchForHolidays", null)) { |
| 975 | 0 | return getNextDecorator().searchForHolidays(criteria, context); |
| 976 | |
} else { |
| 977 | 0 | throw new PermissionDeniedException(); |
| 978 | |
} |
| 979 | |
} |
| 980 | |
|
| 981 | |
@Override |
| 982 | |
public List<ValidationResultInfo> validateHoliday(String validationTypeKey, String holidayCalendarId, String holidayTypeKey, HolidayInfo holidayInfo, ContextInfo contextInfo) |
| 983 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 984 | 0 | if (null == contextInfo) { |
| 985 | 0 | throw new MissingParameterException(); |
| 986 | |
} |
| 987 | |
|
| 988 | 0 | if (permissionService.isAuthorized(contextInfo.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "validateHoliday", null)) { |
| 989 | 0 | return getNextDecorator().validateHoliday(validationTypeKey, holidayCalendarId, holidayTypeKey, holidayInfo, contextInfo); |
| 990 | |
} else { |
| 991 | 0 | throw new PermissionDeniedException (); |
| 992 | |
} |
| 993 | |
} |
| 994 | |
|
| 995 | |
@Override |
| 996 | |
public HolidayInfo updateHoliday(String holidayId, HolidayInfo holidayInfo, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, |
| 997 | |
MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, ReadOnlyException { |
| 998 | 0 | if (null == context) { |
| 999 | 0 | throw new MissingParameterException(); |
| 1000 | |
} |
| 1001 | |
|
| 1002 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "updateHoliday", null)) { |
| 1003 | 0 | return getNextDecorator().updateHoliday(holidayId, holidayInfo, context); |
| 1004 | |
} else { |
| 1005 | 0 | throw new PermissionDeniedException(); |
| 1006 | |
} |
| 1007 | |
} |
| 1008 | |
|
| 1009 | |
@Override |
| 1010 | |
public StatusInfo deleteHoliday(String holidayId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 1011 | |
PermissionDeniedException { |
| 1012 | 0 | if (null == context) { |
| 1013 | 0 | throw new MissingParameterException(); |
| 1014 | |
} |
| 1015 | |
|
| 1016 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "deleteHoliday", null)) { |
| 1017 | 0 | return getNextDecorator().deleteHoliday(holidayId, context); |
| 1018 | |
} else { |
| 1019 | 0 | throw new PermissionDeniedException(); |
| 1020 | |
} |
| 1021 | |
} |
| 1022 | |
|
| 1023 | |
@Override |
| 1024 | |
public Integer getInstructionalDaysForTerm(String termId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
| 1025 | |
PermissionDeniedException { |
| 1026 | 0 | if (null == context) { |
| 1027 | 0 | throw new MissingParameterException(); |
| 1028 | |
} |
| 1029 | |
|
| 1030 | 0 | if (permissionService.isAuthorized(context.getPrincipalId(), ENRLLMENT_NAMESPACE, SERVICE_NAME + "getInstructionalDaysForTerm", null)) { |
| 1031 | 0 | return getNextDecorator().getInstructionalDaysForTerm(termId, context); |
| 1032 | |
} else { |
| 1033 | 0 | throw new PermissionDeniedException(); |
| 1034 | |
} |
| 1035 | |
} |
| 1036 | |
|
| 1037 | |
} |