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