| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.student.enrollment.classI.hold.service; |
| 17 | |
|
| 18 | |
import java.util.List; |
| 19 | |
|
| 20 | |
import org.kuali.student.enrollment.classI.hold.dto.HoldInfo; |
| 21 | |
import org.kuali.student.enrollment.classI.hold.dto.IssueInfo; |
| 22 | |
import org.kuali.student.enrollment.classI.hold.dto.RestrictionInfo; |
| 23 | |
|
| 24 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
| 25 | |
import org.kuali.student.r2.common.dto.StatusInfo; |
| 26 | |
import org.kuali.student.r2.common.dto.TypeInfo; |
| 27 | |
import org.kuali.student.r2.common.dto.TypeTypeRelationInfo; |
| 28 | |
import org.kuali.student.r2.common.dto.StateInfo; |
| 29 | |
import org.kuali.student.r2.common.dto.ValidationResultInfo; |
| 30 | |
import org.kuali.student.r2.common.datadictionary.dto.DictionaryEntryInfo; |
| 31 | |
|
| 32 | |
import org.kuali.student.r2.common.exceptions.AlreadyExistsException; |
| 33 | |
import org.kuali.student.r2.common.exceptions.DataValidationErrorException; |
| 34 | |
import org.kuali.student.r2.common.exceptions.DoesNotExistException; |
| 35 | |
import org.kuali.student.r2.common.exceptions.InvalidParameterException; |
| 36 | |
import org.kuali.student.r2.common.exceptions.MissingParameterException; |
| 37 | |
import org.kuali.student.r2.common.exceptions.OperationFailedException; |
| 38 | |
import org.kuali.student.r2.common.exceptions.PermissionDeniedException; |
| 39 | |
import org.kuali.student.r2.common.exceptions.VersionMismatchException; |
| 40 | |
|
| 41 | |
|
| 42 | 0 | public class HoldServiceDecorator implements HoldService { |
| 43 | |
|
| 44 | |
private HoldService service; |
| 45 | |
|
| 46 | |
public HoldService getHoldService() { |
| 47 | 0 | return service; |
| 48 | |
} |
| 49 | |
|
| 50 | |
public void setService(HoldService service) { |
| 51 | 0 | this.service = service; |
| 52 | 0 | } |
| 53 | |
|
| 54 | |
@Override |
| 55 | |
public Boolean isPersonRestricted(String restrictionKey, String personId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 56 | 0 | return getHoldService().isPersonRestricted(restrictionKey, personId, context); |
| 57 | |
} |
| 58 | |
|
| 59 | |
@Override |
| 60 | |
public List<String> getRestrictedPersons(String restrictionKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 61 | 0 | return getHoldService().getRestrictedPersons(restrictionKey, context); |
| 62 | |
} |
| 63 | |
|
| 64 | |
@Override |
| 65 | |
public List<HoldInfo> getHoldsByRestrictionForPerson(String restrictionKey, String personId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 66 | 0 | return getHoldService().getHoldsByRestrictionForPerson(restrictionKey, personId, context); |
| 67 | |
} |
| 68 | |
|
| 69 | |
@Override |
| 70 | |
public List<HoldInfo> getActiveHoldsByRestrictionForPerson(String restrictionKey, String personId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 71 | 0 | return getHoldService().getActiveHoldsByRestrictionForPerson(restrictionKey, personId, context); |
| 72 | |
} |
| 73 | |
|
| 74 | |
@Override |
| 75 | |
public List<String> getDataDictionaryEntryKeys(ContextInfo context) throws OperationFailedException, MissingParameterException, PermissionDeniedException { |
| 76 | 0 | return getHoldService().getDataDictionaryEntryKeys(context); |
| 77 | |
} |
| 78 | |
|
| 79 | |
@Override |
| 80 | |
public DictionaryEntryInfo getDataDictionaryEntry(String entryKey, ContextInfo context) throws OperationFailedException, MissingParameterException, PermissionDeniedException, DoesNotExistException { |
| 81 | 0 | return getHoldService().getDataDictionaryEntry(entryKey, context); |
| 82 | |
} |
| 83 | |
|
| 84 | |
@Override |
| 85 | |
public List<TypeTypeRelationInfo> getTypeRelationsByOwnerType(String ownerTypeKey, String relationTypeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 86 | 0 | return getHoldService().getTypeRelationsByOwnerType(ownerTypeKey, relationTypeKey, context); |
| 87 | |
} |
| 88 | |
|
| 89 | |
@Override |
| 90 | |
public TypeInfo getType(String typeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 91 | 0 | return getHoldService().getType(typeKey, context); |
| 92 | |
} |
| 93 | |
|
| 94 | |
@Override |
| 95 | |
public List<TypeInfo> getTypesByRefObjectURI(String refObjectURI, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 96 | 0 | return getHoldService().getTypesByRefObjectURI(refObjectURI, context); |
| 97 | |
} |
| 98 | |
|
| 99 | |
@Override |
| 100 | |
public List<TypeInfo> getAllowedTypesForType(String ownerTypeKey, String relatedRefObjectURI, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 101 | 0 | return getHoldService().getAllowedTypesForType(ownerTypeKey, relatedRefObjectURI, context); |
| 102 | |
} |
| 103 | |
|
| 104 | |
@Override |
| 105 | |
public List<String> getProcessKeys(String typeKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 106 | 0 | return getHoldService().getProcessKeys(typeKey, context); |
| 107 | |
} |
| 108 | |
|
| 109 | |
@Override |
| 110 | |
public StateInfo getState(String processKey, String stateKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 111 | 0 | return getHoldService().getState(processKey, stateKey, context); |
| 112 | |
} |
| 113 | |
|
| 114 | |
@Override |
| 115 | |
public List<StateInfo> getStatesByProcess(String processKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 116 | 0 | return getHoldService().getStatesByProcess(processKey, context); |
| 117 | |
} |
| 118 | |
|
| 119 | |
@Override |
| 120 | |
public List<StateInfo> getInitialValidStates(String processKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 121 | 0 | return getHoldService().getInitialValidStates(processKey, context); |
| 122 | |
} |
| 123 | |
|
| 124 | |
@Override |
| 125 | |
public StateInfo getNextHappyState(String processKey, String currentStateKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 126 | 0 | return getHoldService().getNextHappyState(processKey, currentStateKey, context); |
| 127 | |
} |
| 128 | |
|
| 129 | |
@Override |
| 130 | |
public HoldInfo getHold(String holdId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 131 | 0 | return getHoldService().getHold(holdId, context); |
| 132 | |
} |
| 133 | |
|
| 134 | |
@Override |
| 135 | |
public List<HoldInfo> getHoldsByIdList(List<String> holdIdList, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 136 | 0 | return getHoldService().getHoldsByIdList(holdIdList, context); |
| 137 | |
} |
| 138 | |
|
| 139 | |
@Override |
| 140 | |
public List<HoldInfo> getHoldsByIssue(String issueId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 141 | 0 | return getHoldService().getHoldsByIssue(issueId, context); |
| 142 | |
} |
| 143 | |
|
| 144 | |
@Override |
| 145 | |
public List<HoldInfo> getHoldsForPerson(String personId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 146 | 0 | return getHoldService().getHoldsForPerson(personId, context); |
| 147 | |
} |
| 148 | |
|
| 149 | |
@Override |
| 150 | |
public List<HoldInfo> getActiveHoldsForPerson(String personId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 151 | 0 | return getHoldService().getActiveHoldsForPerson(personId, context); |
| 152 | |
} |
| 153 | |
|
| 154 | |
@Override |
| 155 | |
public List<HoldInfo> getHoldsByIssueForPerson(String issueId, String personId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 156 | 0 | return getHoldService().getHoldsByIssueForPerson(issueId, personId, context); |
| 157 | |
} |
| 158 | |
|
| 159 | |
@Override |
| 160 | |
public List<HoldInfo> getActiveHoldsByIssueForPerson(String issueId, String personId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 161 | 0 | return getHoldService().getActiveHoldsByIssueForPerson(issueId, personId, context); |
| 162 | |
} |
| 163 | |
|
| 164 | |
@Override |
| 165 | |
public List<ValidationResultInfo> validateHold(String validationTypeKey, HoldInfo holdInfo, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 166 | 0 | return getHoldService().validateHold(validationTypeKey, holdInfo, context); |
| 167 | |
} |
| 168 | |
|
| 169 | |
@Override |
| 170 | |
public HoldInfo createHold(HoldInfo holdInfo, ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 171 | 0 | return getHoldService().createHold(holdInfo, context); |
| 172 | |
} |
| 173 | |
|
| 174 | |
@Override |
| 175 | |
public HoldInfo updateHold(String holdId, HoldInfo holdInfo, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException { |
| 176 | 0 | return getHoldService().updateHold(holdId, holdInfo, context); |
| 177 | |
} |
| 178 | |
|
| 179 | |
@Override |
| 180 | |
public HoldInfo releaseHold(String holdId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 181 | 0 | return getHoldService().releaseHold(holdId, context); |
| 182 | |
} |
| 183 | |
|
| 184 | |
@Override |
| 185 | |
public StatusInfo deleteHold(String holdId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 186 | 0 | return getHoldService().deleteHold(holdId, context); |
| 187 | |
} |
| 188 | |
|
| 189 | |
@Override |
| 190 | |
public IssueInfo getIssue(String issueId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 191 | 0 | return getHoldService().getIssue(issueId, context); |
| 192 | |
} |
| 193 | |
|
| 194 | |
@Override |
| 195 | |
public List<IssueInfo> getIssuesByIdList(List<String> issueIdList, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 196 | 0 | return getHoldService().getIssuesByIdList(issueIdList, context); |
| 197 | |
} |
| 198 | |
|
| 199 | |
@Override |
| 200 | |
public List<String> getIssueIdsByType(String issueTypeKey, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 201 | 0 | return getHoldService().getIssueIdsByType(issueTypeKey, context); |
| 202 | |
} |
| 203 | |
|
| 204 | |
@Override |
| 205 | |
public List<IssueInfo> getIssuesByOrg(String organizationId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 206 | 0 | return getHoldService().getIssuesByOrg(organizationId, context); |
| 207 | |
} |
| 208 | |
|
| 209 | |
@Override |
| 210 | |
public List<IssueInfo> getIssuesByRestriction(String restrictionKey, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 211 | 0 | return getHoldService().getIssuesByRestriction(restrictionKey, context); |
| 212 | |
} |
| 213 | |
|
| 214 | |
@Override |
| 215 | |
public StatusInfo addIssueToRestriction(String restrictionKey, String issueId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 216 | 0 | return getHoldService().addIssueToRestriction(restrictionKey, issueId, context); |
| 217 | |
} |
| 218 | |
|
| 219 | |
@Override |
| 220 | |
public StatusInfo removeIssueFromRestriction(String restrictionKey, String issueId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 221 | 0 | return getHoldService().removeIssueFromRestriction(restrictionKey, issueId, context); |
| 222 | |
} |
| 223 | |
|
| 224 | |
@Override |
| 225 | |
public List<ValidationResultInfo> validateIssue(String validationTypeKey, IssueInfo issueInfo, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 226 | 0 | return getHoldService().validateIssue(validationTypeKey, issueInfo, context); |
| 227 | |
} |
| 228 | |
|
| 229 | |
@Override |
| 230 | |
public IssueInfo createIssue(IssueInfo issueInfo, ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 231 | 0 | return getHoldService().createIssue(issueInfo, context); |
| 232 | |
} |
| 233 | |
|
| 234 | |
@Override |
| 235 | |
public IssueInfo updateIssue(String issueId, IssueInfo issueInfo, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException { |
| 236 | 0 | return getHoldService().updateIssue(issueId, issueInfo, context); |
| 237 | |
} |
| 238 | |
|
| 239 | |
@Override |
| 240 | |
public StatusInfo deleteIssue(String issueId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 241 | 0 | return getHoldService().deleteIssue(issueId, context); |
| 242 | |
} |
| 243 | |
|
| 244 | |
@Override |
| 245 | |
public RestrictionInfo getRestriction(String restrictionKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 246 | 0 | return getHoldService().getRestriction(restrictionKey, context); |
| 247 | |
} |
| 248 | |
|
| 249 | |
@Override |
| 250 | |
public List<RestrictionInfo> getRestrictionsByKeyList(List<String> restrictionKeyList, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 251 | 0 | return getHoldService().getRestrictionsByKeyList(restrictionKeyList, context); |
| 252 | |
} |
| 253 | |
|
| 254 | |
@Override |
| 255 | |
public List<String> getRestrictionKeysByType(String restrictionTypeKey, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 256 | 0 | return getHoldService().getRestrictionKeysByType(restrictionTypeKey, context); |
| 257 | |
} |
| 258 | |
|
| 259 | |
@Override |
| 260 | |
public List<ValidationResultInfo> validateRestriction(String validationTypeKey, RestrictionInfo restrictionInfo, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
| 261 | 0 | return getHoldService().validateRestriction(validationTypeKey, restrictionInfo, context); |
| 262 | |
} |
| 263 | |
|
| 264 | |
@Override |
| 265 | |
public RestrictionInfo createRestriction(String restrictionKey, RestrictionInfo restrictionInfo, ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 266 | 0 | return getHoldService().createRestriction(restrictionKey, restrictionInfo, context); |
| 267 | |
} |
| 268 | |
|
| 269 | |
@Override |
| 270 | |
public RestrictionInfo updateRestriction(String restrictionKey, RestrictionInfo restrictionInfo, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException { |
| 271 | 0 | return getHoldService().updateRestriction(restrictionKey, restrictionInfo, context); |
| 272 | |
} |
| 273 | |
|
| 274 | |
@Override |
| 275 | |
public StatusInfo deleteRestriction(String restrictionKey, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 276 | 0 | return getHoldService().deleteRestriction(restrictionKey, context); |
| 277 | |
} |
| 278 | |
} |