| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
package org.kuali.student.enrollment.lpr.service; |
| 12 | |
|
| 13 | |
import java.util.List; |
| 14 | |
|
| 15 | |
import org.kuali.rice.core.api.criteria.QueryByCriteria; |
| 16 | |
import org.kuali.student.enrollment.lpr.dto.*; |
| 17 | |
import org.kuali.student.r2.common.dto.BulkStatusInfo; |
| 18 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
| 19 | |
import org.kuali.student.r2.common.dto.StatusInfo; |
| 20 | |
import org.kuali.student.r2.common.dto.ValidationResultInfo; |
| 21 | |
import org.kuali.student.r2.common.exceptions.AlreadyExistsException; |
| 22 | |
import org.kuali.student.r2.common.exceptions.DataValidationErrorException; |
| 23 | |
import org.kuali.student.r2.common.exceptions.DoesNotExistException; |
| 24 | |
import org.kuali.student.r2.common.exceptions.InvalidParameterException; |
| 25 | |
import org.kuali.student.r2.common.exceptions.MissingParameterException; |
| 26 | |
import org.kuali.student.r2.common.exceptions.OperationFailedException; |
| 27 | |
import org.kuali.student.r2.common.exceptions.PermissionDeniedException; |
| 28 | |
import org.kuali.student.r2.common.exceptions.ReadOnlyException; |
| 29 | |
import org.kuali.student.r2.common.exceptions.VersionMismatchException; |
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | 0 | public class LprServiceDecorator implements LprService { |
| 39 | |
|
| 40 | |
private LprService nextDecorator; |
| 41 | |
|
| 42 | |
public LprService getNextDecorator() throws OperationFailedException { |
| 43 | 0 | if (null == nextDecorator) { |
| 44 | 0 | throw new OperationFailedException("Misconfigured application: nextDecorator is null"); |
| 45 | |
} |
| 46 | 0 | return nextDecorator; |
| 47 | |
} |
| 48 | |
|
| 49 | |
public void setNextDecorator(LprService nextDecorator) { |
| 50 | 0 | this.nextDecorator = nextDecorator; |
| 51 | 0 | } |
| 52 | |
|
| 53 | |
@Override |
| 54 | |
public List<ValidationResultInfo> verifyLprTransaction(String lprTransactionId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 55 | 0 | return getNextDecorator().verifyLprTransaction(lprTransactionId, contextInfo); |
| 56 | |
} |
| 57 | |
|
| 58 | |
@Override |
| 59 | |
public List<ValidationResultInfo> validateLpr(String validationType, String luiId, String personId, String lprTypeKey, LprInfo lprInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 60 | 0 | return getNextDecorator().validateLpr(validationType, luiId, personId, lprTypeKey, lprInfo, contextInfo); |
| 61 | |
} |
| 62 | |
|
| 63 | |
@Override |
| 64 | |
public LprTransactionInfo updateLprTransaction(String lprTransactionId, LprTransactionInfo lprTransactionInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException { |
| 65 | 0 | return getNextDecorator().updateLprTransaction(lprTransactionId, lprTransactionInfo, contextInfo); |
| 66 | |
} |
| 67 | |
|
| 68 | |
@Override |
| 69 | |
public LprInfo updateLpr(String lprId, LprInfo lprInfo, ContextInfo contextInfo) throws DoesNotExistException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
| 70 | 0 | return getNextDecorator().updateLpr(lprId, lprInfo, contextInfo); |
| 71 | |
} |
| 72 | |
|
| 73 | |
@Override |
| 74 | |
public List<LprInfo> searchForLprs(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 75 | 0 | return getNextDecorator().searchForLprs(criteria, contextInfo); |
| 76 | |
} |
| 77 | |
|
| 78 | |
@Override |
| 79 | |
public List<LprTransactionInfo> searchForLprTransactions(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 80 | 0 | return getNextDecorator().searchForLprTransactions(criteria, contextInfo); |
| 81 | |
} |
| 82 | |
|
| 83 | |
@Override |
| 84 | |
public List<String> searchForLprTransactionIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 85 | 0 | return getNextDecorator().searchForLprTransactionIds(criteria, contextInfo); |
| 86 | |
} |
| 87 | |
|
| 88 | |
@Override |
| 89 | |
public List<String> searchForLprIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 90 | 0 | return getNextDecorator().searchForLprIds(criteria, contextInfo); |
| 91 | |
} |
| 92 | |
|
| 93 | |
@Override |
| 94 | |
public LprTransactionInfo processLprTransaction(String lprTransactionId, ContextInfo contextInfo) throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 95 | 0 | return getNextDecorator().processLprTransaction(lprTransactionId, contextInfo); |
| 96 | |
} |
| 97 | |
|
| 98 | |
@Override |
| 99 | |
public List<LprTransactionInfo> getUnsubmittedLprTransactionsByRequestingPersonAndAtp(String requestingPersonId, String atpId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 100 | 0 | return getNextDecorator().getUnsubmittedLprTransactionsByRequestingPersonAndAtp(requestingPersonId, atpId, contextInfo); |
| 101 | |
} |
| 102 | |
|
| 103 | |
@Override |
| 104 | |
public List<String> getPersonIdsByLuiAndTypeAndState(String luiId, String lprTypeKey, String relationState, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 105 | 0 | return getNextDecorator().getPersonIdsByLuiAndTypeAndState(luiId, lprTypeKey, relationState, contextInfo); |
| 106 | |
} |
| 107 | |
|
| 108 | |
@Override |
| 109 | |
public List<String> getLuiIdsByPersonAndTypeAndState(String personId, String lprTypeKey, String relationState, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 110 | 0 | return getNextDecorator().getLuiIdsByPersonAndTypeAndState(personId, lprTypeKey, relationState, contextInfo); |
| 111 | |
} |
| 112 | |
|
| 113 | |
@Override |
| 114 | |
public List<LprInfo> getLprsByPersonForAtpAndLuiType(String personId, String atpId, String luiTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 115 | 0 | return getNextDecorator().getLprsByPersonForAtpAndLuiType(personId, atpId, luiTypeKey, contextInfo); |
| 116 | |
} |
| 117 | |
|
| 118 | |
@Override |
| 119 | |
public List<LprInfo> getLprsByPersonForAtp(String personId, String atpId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 120 | 0 | return getNextDecorator().getLprsByPersonForAtp(personId, atpId, contextInfo); |
| 121 | |
} |
| 122 | |
|
| 123 | |
@Override |
| 124 | |
public List<LprInfo> getLprsByPersonAndTypeForAtp(String personId, String atpId, String lprTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 125 | 0 | return getNextDecorator().getLprsByPersonAndTypeForAtp(personId, atpId, lprTypeKey, contextInfo); |
| 126 | |
} |
| 127 | |
|
| 128 | |
@Override |
| 129 | |
public List<LprInfo> getLprsByPersonAndLuiType(String personId, String luiTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 130 | 0 | return getNextDecorator().getLprsByPersonAndLuiType(personId, luiTypeKey, contextInfo); |
| 131 | |
} |
| 132 | |
|
| 133 | |
@Override |
| 134 | |
public List<LprInfo> getLprsByPersonAndLui(String personId, String luiId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 135 | 0 | return getNextDecorator().getLprsByPersonAndLui(personId, luiId, contextInfo); |
| 136 | |
} |
| 137 | |
|
| 138 | |
@Override |
| 139 | |
public List<LprInfo> getLprsByPerson(String personId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 140 | 0 | return getNextDecorator().getLprsByPerson(personId, contextInfo); |
| 141 | |
} |
| 142 | |
|
| 143 | |
@Override |
| 144 | |
public List<LprInfo> getLprsByLuiAndType(String luiId, String lprTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 145 | 0 | return getNextDecorator().getLprsByLuiAndType(luiId, lprTypeKey, contextInfo); |
| 146 | |
} |
| 147 | |
|
| 148 | |
@Override |
| 149 | |
public List<LprInfo> getLprsByLui(String luiId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 150 | 0 | return getNextDecorator().getLprsByLui(luiId, contextInfo); |
| 151 | |
} |
| 152 | |
|
| 153 | |
@Override |
| 154 | |
public List<LprInfo> getLprsByIds(List<String> lprIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 155 | 0 | return getNextDecorator().getLprsByIds(lprIds, contextInfo); |
| 156 | |
} |
| 157 | |
|
| 158 | |
@Override |
| 159 | |
public List<LprTransactionItemInfo> getLprTransactionItemsByResultingLpr(String lprId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 160 | 0 | return getNextDecorator().getLprTransactionItemsByResultingLpr(lprId, contextInfo); |
| 161 | |
} |
| 162 | |
|
| 163 | |
@Override |
| 164 | |
public List<LprTransactionItemInfo> getLprTransactionItemsByPersonAndLui(String personId, String luiId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 165 | 0 | return getNextDecorator().getLprTransactionItemsByPersonAndLui(personId, luiId, contextInfo); |
| 166 | |
} |
| 167 | |
|
| 168 | |
@Override |
| 169 | |
public List<LprTransactionInfo> getLprTransactionsByIds(List<String> lprTransactionIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 170 | 0 | return getNextDecorator().getLprTransactionsByIds(lprTransactionIds, contextInfo); |
| 171 | |
} |
| 172 | |
|
| 173 | |
@Override |
| 174 | |
public List<LprTransactionItemInfo> getLprTransactionItemsByLui(String luiId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 175 | 0 | return getNextDecorator().getLprTransactionItemsByLui(luiId, contextInfo); |
| 176 | |
} |
| 177 | |
|
| 178 | |
@Override |
| 179 | |
public LprTransactionInfo getLprTransaction(String lprTransactionId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 180 | 0 | return getNextDecorator().getLprTransaction(lprTransactionId, contextInfo); |
| 181 | |
} |
| 182 | |
|
| 183 | |
@Override |
| 184 | |
public LprInfo getLpr(String lprId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 185 | 0 | return getNextDecorator().getLpr(lprId, contextInfo); |
| 186 | |
} |
| 187 | |
|
| 188 | |
@Override |
| 189 | |
public StatusInfo deleteLprTransaction(String lprTransactionId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 190 | 0 | return getNextDecorator().deleteLprTransaction(lprTransactionId, contextInfo); |
| 191 | |
} |
| 192 | |
|
| 193 | |
@Override |
| 194 | |
public StatusInfo deleteLpr(String lprId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 195 | 0 | return getNextDecorator().deleteLpr(lprId, contextInfo); |
| 196 | |
} |
| 197 | |
|
| 198 | |
@Override |
| 199 | |
public List<BulkStatusInfo> createLprsForPerson(String personId, String lprTypeKey, List<LprInfo> lprInfos, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
| 200 | 0 | return getNextDecorator().createLprsForPerson(personId, lprTypeKey, lprInfos, contextInfo); |
| 201 | |
} |
| 202 | |
|
| 203 | |
@Override |
| 204 | |
public List<BulkStatusInfo> createLprsForLui(String luiId, String lprTypeKey, List<LprInfo> lprInfos, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
| 205 | 0 | return getNextDecorator().createLprsForLui(luiId, lprTypeKey, lprInfos, contextInfo); |
| 206 | |
} |
| 207 | |
|
| 208 | |
@Override |
| 209 | |
public LprTransactionInfo createLprTransactionFromExisting(String lprTransactionId, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 210 | 0 | return getNextDecorator().createLprTransactionFromExisting(lprTransactionId, contextInfo); |
| 211 | |
} |
| 212 | |
|
| 213 | |
@Override |
| 214 | |
public LprTransactionInfo createLprTransaction(String lprTransactionType, LprTransactionInfo lprTransactionInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 215 | 0 | return getNextDecorator().createLprTransaction(lprTransactionType, lprTransactionInfo, contextInfo); |
| 216 | |
} |
| 217 | |
|
| 218 | |
@Override |
| 219 | |
public LprInfo createLpr(String personId, String luiId, String lprTypeKey, LprInfo lprInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
| 220 | 0 | return getNextDecorator().createLpr(personId, luiId, lprTypeKey, lprInfo, contextInfo); |
| 221 | |
} |
| 222 | |
} |