1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
package org.kuali.student.r2.core.hold.service; |
16 | |
|
17 | |
import java.util.List; |
18 | |
|
19 | |
import org.kuali.rice.core.api.criteria.QueryByCriteria; |
20 | |
|
21 | |
import org.kuali.student.r2.core.hold.dto.HoldInfo; |
22 | |
import org.kuali.student.r2.core.hold.dto.IssueInfo; |
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.ValidationResultInfo; |
27 | |
|
28 | |
import org.kuali.student.r2.common.exceptions.AlreadyExistsException; |
29 | |
import org.kuali.student.r2.common.exceptions.DataValidationErrorException; |
30 | |
import org.kuali.student.r2.common.exceptions.DoesNotExistException; |
31 | |
import org.kuali.student.r2.common.exceptions.InvalidParameterException; |
32 | |
import org.kuali.student.r2.common.exceptions.MissingParameterException; |
33 | |
import org.kuali.student.r2.common.exceptions.OperationFailedException; |
34 | |
import org.kuali.student.r2.common.exceptions.PermissionDeniedException; |
35 | |
import org.kuali.student.r2.common.exceptions.ReadOnlyException; |
36 | |
import org.kuali.student.r2.common.exceptions.VersionMismatchException; |
37 | |
|
38 | 0 | public class HoldServiceDecorator |
39 | |
implements HoldService { |
40 | |
|
41 | |
private HoldService nextDecorator; |
42 | |
|
43 | |
public HoldService getNextDecorator() |
44 | |
throws OperationFailedException { |
45 | |
|
46 | 0 | if (null == nextDecorator) { |
47 | 0 | throw new OperationFailedException("Misconfigured application: nextDecorator is null"); |
48 | |
} |
49 | |
|
50 | 0 | return nextDecorator; |
51 | |
} |
52 | |
|
53 | |
public void setNextDecorator(HoldService nextDecorator) { |
54 | 0 | this.nextDecorator = nextDecorator; |
55 | 0 | } |
56 | |
|
57 | |
@Override |
58 | |
public HoldInfo getHold(String holdId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
59 | 0 | return getNextDecorator().getHold(holdId, contextInfo); |
60 | |
} |
61 | |
|
62 | |
@Override |
63 | |
public List<HoldInfo> getHoldsByIds(List<String> holdIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
64 | 0 | return getNextDecorator().getHoldsByIds(holdIds, contextInfo); |
65 | |
} |
66 | |
|
67 | |
@Override |
68 | |
public List<String> getHoldIdsByType(String holdTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
69 | 0 | return getNextDecorator().getHoldIdsByType(holdTypeKey, contextInfo); |
70 | |
} |
71 | |
|
72 | |
@Override |
73 | |
public List<HoldInfo> getHoldsByIssue(String issueId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
74 | 0 | return getNextDecorator().getHoldsByIssue(issueId, contextInfo); |
75 | |
} |
76 | |
|
77 | |
@Override |
78 | |
public List<HoldInfo> getHoldsByPerson(String personId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
79 | 0 | return getNextDecorator().getHoldsByPerson(personId, contextInfo); |
80 | |
} |
81 | |
|
82 | |
@Override |
83 | |
public List<HoldInfo> getActiveHoldsByPerson(String personId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
84 | 0 | return getNextDecorator().getActiveHoldsByPerson(personId, contextInfo); |
85 | |
} |
86 | |
|
87 | |
@Override |
88 | |
public List<HoldInfo> getHoldsByIssueAndPerson(String issueId, String personId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
89 | 0 | return getNextDecorator().getHoldsByIssueAndPerson(issueId, personId, contextInfo); |
90 | |
} |
91 | |
|
92 | |
@Override |
93 | |
public List<HoldInfo> getActiveHoldsByIssueAndPerson(String issueId, String personId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
94 | 0 | return getNextDecorator().getActiveHoldsByIssueAndPerson(issueId, personId, contextInfo); |
95 | |
} |
96 | |
|
97 | |
@Override |
98 | |
public List<String> searchForHoldIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
99 | 0 | return getNextDecorator().searchForHoldIds(criteria, contextInfo); |
100 | |
} |
101 | |
|
102 | |
@Override |
103 | |
public List<HoldInfo> searchForHolds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
104 | 0 | return getNextDecorator().searchForHolds(criteria, contextInfo); |
105 | |
} |
106 | |
|
107 | |
@Override |
108 | |
public List<ValidationResultInfo> validateHold(String validationTypeKey, HoldInfo holdInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
109 | 0 | return getNextDecorator().validateHold(validationTypeKey, holdInfo, contextInfo); |
110 | |
} |
111 | |
|
112 | |
@Override |
113 | |
public HoldInfo createHold(String personId, |
114 | |
String issueId, |
115 | |
String holdTypeKey, |
116 | |
HoldInfo holdInfo, |
117 | |
ContextInfo contextInfo) |
118 | |
throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, |
119 | |
MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
120 | 0 | return getNextDecorator().createHold(personId, issueId, holdTypeKey, holdInfo, contextInfo); |
121 | |
} |
122 | |
|
123 | |
@Override |
124 | |
public HoldInfo updateHold(String holdId, HoldInfo holdInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
125 | 0 | return getNextDecorator().updateHold(holdId, holdInfo, contextInfo); |
126 | |
} |
127 | |
|
128 | |
@Override |
129 | |
public HoldInfo releaseHold(String holdId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
130 | 0 | return getNextDecorator().releaseHold(holdId, contextInfo); |
131 | |
} |
132 | |
|
133 | |
@Override |
134 | |
public StatusInfo deleteHold(String holdId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
135 | 0 | return getNextDecorator().deleteHold(holdId, contextInfo); |
136 | |
} |
137 | |
|
138 | |
@Override |
139 | |
public IssueInfo getIssue(String issueId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
140 | 0 | return getNextDecorator().getIssue(issueId, contextInfo); |
141 | |
} |
142 | |
|
143 | |
@Override |
144 | |
public List<IssueInfo> getIssuesByIds(List<String> issueIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
145 | 0 | return getNextDecorator().getIssuesByIds(issueIds, contextInfo); |
146 | |
} |
147 | |
|
148 | |
@Override |
149 | |
public List<String> getIssueIdsByType(String issueTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
150 | 0 | return getNextDecorator().getIssueIdsByType(issueTypeKey, contextInfo); |
151 | |
} |
152 | |
|
153 | |
@Override |
154 | |
public List<IssueInfo> getIssuesByOrg(String organizationId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
155 | 0 | return getNextDecorator().getIssuesByOrg(organizationId, contextInfo); |
156 | |
} |
157 | |
|
158 | |
@Override |
159 | |
public List<String> searchForIssueIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
160 | 0 | return getNextDecorator().searchForIssueIds(criteria, contextInfo); |
161 | |
} |
162 | |
|
163 | |
@Override |
164 | |
public List<IssueInfo> searchForIssues(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
165 | 0 | return getNextDecorator().searchForIssues(criteria, contextInfo); |
166 | |
} |
167 | |
|
168 | |
@Override |
169 | |
public List<ValidationResultInfo> validateIssue(String validationTypeKey, IssueInfo issueInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException { |
170 | 0 | return getNextDecorator().validateIssue(validationTypeKey, issueInfo, contextInfo); |
171 | |
} |
172 | |
|
173 | |
@Override |
174 | |
public IssueInfo createIssue(String issueTypeKey, IssueInfo issueInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
175 | 0 | return getNextDecorator().createIssue(issueTypeKey, issueInfo, contextInfo); |
176 | |
} |
177 | |
|
178 | |
@Override |
179 | |
public IssueInfo updateIssue(String issueId, IssueInfo issueInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
180 | 0 | return getNextDecorator().updateIssue(issueId, issueInfo, contextInfo); |
181 | |
} |
182 | |
|
183 | |
@Override |
184 | |
public StatusInfo deleteIssue(String issueId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
185 | 0 | return getNextDecorator().deleteIssue(issueId, contextInfo); |
186 | |
} |
187 | |
} |