| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.student.enrollment.lpr.service.adapter.cleanup; |
| 17 | |
|
| 18 | |
import org.kuali.student.common.exceptions.InvalidParameterException; |
| 19 | |
import org.kuali.student.common.exceptions.VersionMismatchException; |
| 20 | |
import org.kuali.student.common.exceptions.MissingParameterException; |
| 21 | |
import org.kuali.student.common.exceptions.OperationFailedException; |
| 22 | |
import org.kuali.student.common.exceptions.DataValidationErrorException; |
| 23 | |
import org.kuali.student.common.exceptions.PermissionDeniedException; |
| 24 | |
import org.kuali.student.common.exceptions.DisabledIdentifierException; |
| 25 | |
import org.kuali.student.common.exceptions.AlreadyExistsException; |
| 26 | |
import org.kuali.student.common.exceptions.DoesNotExistException; |
| 27 | |
import org.kuali.student.common.exceptions.ReadOnlyException; |
| 28 | |
import org.kuali.student.common.exceptions.*; |
| 29 | |
|
| 30 | |
import java.util.List; |
| 31 | |
import org.kuali.student.common.dto.ContextInfo; |
| 32 | |
import org.kuali.student.common.dto.StatusInfo; |
| 33 | |
import org.kuali.student.enrollment.lpr.dto.LuiPersonRelationInfo; |
| 34 | |
import org.kuali.student.enrollment.lpr.mock.LuiPersonRelationServiceAdapter; |
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
|
| 40 | |
|
| 41 | |
|
| 42 | |
|
| 43 | |
|
| 44 | 0 | public class LuiPersonRelationRuntimeExceptionCatcherAdapter |
| 45 | |
extends LuiPersonRelationServiceAdapter { |
| 46 | |
|
| 47 | |
@Override |
| 48 | |
public String createLuiPersonRelation(String personId, String luiId, |
| 49 | |
String luiPersonRelationType, |
| 50 | |
LuiPersonRelationInfo luiPersonRelationInfo, |
| 51 | |
ContextInfo context) |
| 52 | |
throws DataValidationErrorException, |
| 53 | |
AlreadyExistsException, |
| 54 | |
DoesNotExistException, |
| 55 | |
DisabledIdentifierException, |
| 56 | |
ReadOnlyException, |
| 57 | |
InvalidParameterException, |
| 58 | |
MissingParameterException, |
| 59 | |
OperationFailedException, |
| 60 | |
PermissionDeniedException { |
| 61 | |
try { |
| 62 | 0 | return (getLprService().createLuiPersonRelation(personId, luiId, |
| 63 | |
luiPersonRelationType, |
| 64 | |
luiPersonRelationInfo, |
| 65 | |
context)); |
| 66 | 0 | } catch (RuntimeException ex) { |
| 67 | 0 | throw new OperationFailedException("Got RuntimeException", ex); |
| 68 | |
} |
| 69 | |
} |
| 70 | |
|
| 71 | |
@Override |
| 72 | |
public List<String> createBulkRelationshipsForPerson(String personId, |
| 73 | |
List<String> luiIdList, |
| 74 | |
String relationState, |
| 75 | |
String luiPersonRelationType, |
| 76 | |
LuiPersonRelationInfo luiPersonRelationInfo, |
| 77 | |
ContextInfo context) |
| 78 | |
throws DataValidationErrorException, |
| 79 | |
AlreadyExistsException, |
| 80 | |
DoesNotExistException, |
| 81 | |
DisabledIdentifierException, |
| 82 | |
ReadOnlyException, |
| 83 | |
InvalidParameterException, |
| 84 | |
MissingParameterException, |
| 85 | |
OperationFailedException, |
| 86 | |
PermissionDeniedException { |
| 87 | |
|
| 88 | |
try { |
| 89 | 0 | return (getLprService().createBulkRelationshipsForPerson(personId, luiIdList, |
| 90 | |
relationState, |
| 91 | |
luiPersonRelationType, |
| 92 | |
luiPersonRelationInfo, |
| 93 | |
context)); |
| 94 | 0 | } catch (RuntimeException ex) { |
| 95 | 0 | throw new OperationFailedException("Got RuntimeException", ex); |
| 96 | |
} |
| 97 | |
} |
| 98 | |
|
| 99 | |
@Override |
| 100 | |
public LuiPersonRelationInfo updateLuiPersonRelation( |
| 101 | |
String luiPersonRelationId, LuiPersonRelationInfo luiPersonRelationInfo, |
| 102 | |
ContextInfo context) |
| 103 | |
throws DataValidationErrorException, |
| 104 | |
DoesNotExistException, |
| 105 | |
InvalidParameterException, |
| 106 | |
MissingParameterException, |
| 107 | |
ReadOnlyException, |
| 108 | |
OperationFailedException, |
| 109 | |
PermissionDeniedException, |
| 110 | |
VersionMismatchException { |
| 111 | |
try { |
| 112 | 0 | return (getLprService().updateLuiPersonRelation(luiPersonRelationId, |
| 113 | |
luiPersonRelationInfo, |
| 114 | |
context)); |
| 115 | 0 | } catch (RuntimeException ex) { |
| 116 | 0 | throw new OperationFailedException("Got RuntimeException", ex); |
| 117 | |
} |
| 118 | |
} |
| 119 | |
|
| 120 | |
@Override |
| 121 | |
public StatusInfo deleteLuiPersonRelation(String luiPersonRelationId, |
| 122 | |
ContextInfo context) throws |
| 123 | |
DoesNotExistException, InvalidParameterException, MissingParameterException, |
| 124 | |
OperationFailedException, |
| 125 | |
PermissionDeniedException { |
| 126 | |
try { |
| 127 | 0 | return (getLprService().deleteLuiPersonRelation(luiPersonRelationId, context)); |
| 128 | 0 | } catch (RuntimeException ex) { |
| 129 | 0 | throw new OperationFailedException("Got RuntimeException", ex); |
| 130 | |
} |
| 131 | |
} |
| 132 | |
} |