1 | |
package org.kuali.student.r2.core.process.service; |
2 | |
|
3 | |
import org.kuali.rice.core.api.criteria.QueryByCriteria; |
4 | |
import org.kuali.student.r2.common.datadictionary.dto.DictionaryEntryInfo; |
5 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
6 | |
import org.kuali.student.r2.common.dto.StatusInfo; |
7 | |
import org.kuali.student.r2.common.dto.ValidationResultInfo; |
8 | |
import org.kuali.student.r2.common.exceptions.AlreadyExistsException; |
9 | |
import org.kuali.student.r2.common.exceptions.DataValidationErrorException; |
10 | |
import org.kuali.student.r2.common.exceptions.DoesNotExistException; |
11 | |
import org.kuali.student.r2.common.exceptions.InvalidParameterException; |
12 | |
import org.kuali.student.r2.common.exceptions.MissingParameterException; |
13 | |
import org.kuali.student.r2.common.exceptions.OperationFailedException; |
14 | |
import org.kuali.student.r2.common.exceptions.PermissionDeniedException; |
15 | |
import org.kuali.student.r2.common.exceptions.ReadOnlyException; |
16 | |
import org.kuali.student.r2.common.exceptions.VersionMismatchException; |
17 | |
import org.kuali.student.r2.core.process.dto.CheckInfo; |
18 | |
import org.kuali.student.r2.core.process.dto.InstructionInfo; |
19 | |
import org.kuali.student.r2.core.process.dto.ProcessCategoryInfo; |
20 | |
import org.kuali.student.r2.core.process.dto.ProcessInfo; |
21 | |
|
22 | |
import java.util.List; |
23 | |
|
24 | 0 | public abstract class ProcessServiceDecorator implements ProcessService { |
25 | |
private ProcessService nextDecorator; |
26 | |
|
27 | |
public ProcessService getNextDecorator() throws OperationFailedException { |
28 | 0 | if (null == nextDecorator) { |
29 | 0 | throw new OperationFailedException("Misconfigured application: nextDecorator is null"); |
30 | |
} |
31 | 0 | return nextDecorator; |
32 | |
} |
33 | |
|
34 | |
public void setNextDecorator(ProcessService nextDecorator) { |
35 | 0 | this.nextDecorator = nextDecorator; |
36 | 0 | } |
37 | |
|
38 | |
@Override |
39 | |
public ProcessCategoryInfo getProcessCategory(String processCategoryId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
40 | 0 | return getNextDecorator().getProcessCategory(processCategoryId, contextInfo); |
41 | |
} |
42 | |
|
43 | |
@Override |
44 | |
public List<ProcessCategoryInfo> getProcessCategoriesByIds(List<String> processCategoryIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
45 | 0 | return getNextDecorator().getProcessCategoriesByIds(processCategoryIds, contextInfo); |
46 | |
} |
47 | |
|
48 | |
@Override |
49 | |
public List<String> getProcessCategoryIdsByType(String processTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
50 | 0 | return getNextDecorator().getProcessCategoryIdsByType(processTypeKey, contextInfo); |
51 | |
} |
52 | |
|
53 | |
@Override |
54 | |
public List<ProcessCategoryInfo> getProcessCategoriesForProcess(String processKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
55 | 0 | return getNextDecorator().getProcessCategoriesForProcess(processKey, contextInfo); |
56 | |
} |
57 | |
|
58 | |
@Override |
59 | |
public List<String> searchForProcessCategoryIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
60 | 0 | return getNextDecorator().searchForProcessCategoryIds(criteria, contextInfo); |
61 | |
} |
62 | |
|
63 | |
@Override |
64 | |
public List<ProcessCategoryInfo> searchForProcessCategories(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
65 | 0 | return getNextDecorator().searchForProcessCategories(criteria, contextInfo); |
66 | |
} |
67 | |
|
68 | |
@Override |
69 | |
public List<ValidationResultInfo> validateProcessCategory(String validationTypeKey, ProcessCategoryInfo processCategoryInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
70 | 0 | return getNextDecorator().validateProcessCategory(validationTypeKey, processCategoryInfo, contextInfo); |
71 | |
} |
72 | |
|
73 | |
@Override |
74 | |
public ProcessCategoryInfo createProcessCategory(ProcessCategoryInfo processCategoryInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
75 | 0 | return getNextDecorator().createProcessCategory(processCategoryInfo, contextInfo); |
76 | |
} |
77 | |
|
78 | |
@Override |
79 | |
public ProcessCategoryInfo updateProcessCategory(String processCategoryId, ProcessCategoryInfo processInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
80 | 0 | return getNextDecorator().updateProcessCategory(processCategoryId, processInfo, contextInfo); |
81 | |
} |
82 | |
|
83 | |
@Override |
84 | |
public StatusInfo deleteProcessCategory(String processCategoryId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
85 | 0 | return getNextDecorator().deleteProcessCategory(processCategoryId, contextInfo); |
86 | |
} |
87 | |
|
88 | |
@Override |
89 | |
public StatusInfo addProcessToProcessCategory(String processKey, String processCategoryId, ContextInfo contextInfo) throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
90 | 0 | return getNextDecorator().addProcessToProcessCategory(processKey, processCategoryId, contextInfo); |
91 | |
} |
92 | |
|
93 | |
@Override |
94 | |
public StatusInfo removeProcessFromProcessCategory(String processKey, String processCategoryId, ContextInfo contextInfo) throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
95 | 0 | return getNextDecorator().removeProcessFromProcessCategory(processKey, processCategoryId, contextInfo); |
96 | |
} |
97 | |
|
98 | |
@Override |
99 | |
public ProcessInfo getProcess(String processKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
100 | 0 | return getNextDecorator().getProcess(processKey, contextInfo); |
101 | |
} |
102 | |
|
103 | |
@Override |
104 | |
public List<ProcessInfo> getProcessesByKeys(List<String> processKeys, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
105 | 0 | return getNextDecorator().getProcessesByKeys(processKeys, contextInfo); |
106 | |
} |
107 | |
|
108 | |
@Override |
109 | |
public List<String> getProcessKeysByType(String processTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
110 | 0 | return getNextDecorator().getProcessKeysByType(processTypeKey, contextInfo); |
111 | |
} |
112 | |
|
113 | |
@Override |
114 | |
public List<ProcessInfo> getProcessesForProcessCategory(String processCategoryId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
115 | 0 | return getNextDecorator().getProcessesForProcessCategory(processCategoryId, contextInfo); |
116 | |
} |
117 | |
|
118 | |
@Override |
119 | |
public List<String> searchForProcessKeys(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
120 | 0 | return getNextDecorator().searchForProcessKeys(criteria, contextInfo); |
121 | |
} |
122 | |
|
123 | |
@Override |
124 | |
public List<ProcessInfo> searchForProcesss(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
125 | 0 | return getNextDecorator().searchForProcesss(criteria, contextInfo); |
126 | |
} |
127 | |
|
128 | |
@Override |
129 | |
public List<ValidationResultInfo> validateProcess(String validationTypeKey, ProcessInfo processInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
130 | 0 | return getNextDecorator().validateProcess(validationTypeKey, processInfo, contextInfo); |
131 | |
} |
132 | |
|
133 | |
@Override |
134 | |
public ProcessInfo createProcess(String processKey, ProcessInfo processInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
135 | 0 | return getNextDecorator().createProcess(processKey, processInfo, contextInfo); |
136 | |
} |
137 | |
|
138 | |
@Override |
139 | |
public ProcessInfo updateProcess(String processKey, ProcessInfo processInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
140 | 0 | return getNextDecorator().updateProcess(processKey, processInfo, contextInfo); |
141 | |
} |
142 | |
|
143 | |
@Override |
144 | |
public StatusInfo deleteProcess(String processKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
145 | 0 | return getNextDecorator().deleteProcess(processKey, contextInfo); |
146 | |
} |
147 | |
|
148 | |
@Override |
149 | |
public CheckInfo getCheck(String checkKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
150 | 0 | return getNextDecorator().getCheck(checkKey, contextInfo); |
151 | |
} |
152 | |
|
153 | |
@Override |
154 | |
public List<CheckInfo> getChecksByIds(List<String> checkKeys, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
155 | 0 | return getNextDecorator().getChecksByIds(checkKeys, contextInfo); |
156 | |
} |
157 | |
|
158 | |
@Override |
159 | |
public List<String> getCheckKeysByType(String checkTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
160 | 0 | return getNextDecorator().getCheckKeysByType(checkTypeKey, contextInfo); |
161 | |
} |
162 | |
|
163 | |
@Override |
164 | |
public List<String> searchForCheckKeys(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
165 | 0 | return getNextDecorator().searchForCheckKeys(criteria, contextInfo); |
166 | |
} |
167 | |
|
168 | |
@Override |
169 | |
public List<CheckInfo> searchForChecks(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
170 | 0 | return getNextDecorator().searchForChecks(criteria, contextInfo); |
171 | |
} |
172 | |
|
173 | |
@Override |
174 | |
public List<ValidationResultInfo> validateCheck(String validationTypeKey, CheckInfo checkInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
175 | 0 | return getNextDecorator().validateCheck(validationTypeKey, checkInfo, contextInfo); |
176 | |
} |
177 | |
|
178 | |
@Override |
179 | |
public CheckInfo createCheck(String checkKey, CheckInfo checkInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
180 | 0 | return getNextDecorator().createCheck(checkKey, checkInfo, contextInfo); |
181 | |
} |
182 | |
|
183 | |
@Override |
184 | |
public CheckInfo updateCheck(String checkKey, CheckInfo checkInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
185 | 0 | return getNextDecorator().updateCheck(checkKey, checkInfo, contextInfo); |
186 | |
} |
187 | |
|
188 | |
@Override |
189 | |
public StatusInfo deleteCheck(String checkKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
190 | 0 | return getNextDecorator().deleteCheck(checkKey, contextInfo); |
191 | |
} |
192 | |
|
193 | |
@Override |
194 | |
public InstructionInfo getInstruction(String instructionId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
195 | 0 | return getNextDecorator().getInstruction(instructionId, contextInfo); |
196 | |
} |
197 | |
|
198 | |
@Override |
199 | |
public List<InstructionInfo> getInstructionsByIds(List<String> instructionIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
200 | 0 | return getNextDecorator().getInstructionsByIds(instructionIds, contextInfo); |
201 | |
} |
202 | |
|
203 | |
@Override |
204 | |
public List<String> getInstructionIdsByType(String instructionTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
205 | 0 | return getNextDecorator().getInstructionIdsByType(instructionTypeKey, contextInfo); |
206 | |
} |
207 | |
|
208 | |
@Override |
209 | |
public List<InstructionInfo> getInstructionsByProcess(String processKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
210 | 0 | return getNextDecorator().getInstructionsByProcess(processKey, contextInfo); |
211 | |
} |
212 | |
|
213 | |
@Override |
214 | |
public List<InstructionInfo> getInstructionsByCheck(String checkKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
215 | 0 | return getNextDecorator().getInstructionsByCheck(checkKey, contextInfo); |
216 | |
} |
217 | |
|
218 | |
@Override |
219 | |
public List<InstructionInfo> getInstructionsByProcessAndCheck(String checkKey, String processKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
220 | 0 | return getNextDecorator().getInstructionsByProcessAndCheck(checkKey, processKey, contextInfo); |
221 | |
} |
222 | |
|
223 | |
@Override |
224 | |
public List<String> searchForInstructionIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
225 | 0 | return getNextDecorator().searchForInstructionIds(criteria, contextInfo); |
226 | |
} |
227 | |
|
228 | |
@Override |
229 | |
public List<InstructionInfo> searchForInstructions(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
230 | 0 | return getNextDecorator().searchForInstructions(criteria, contextInfo); |
231 | |
} |
232 | |
|
233 | |
@Override |
234 | |
public List<ValidationResultInfo> validateInstruction(String validationTypeKey, String processKey, String checkKey, InstructionInfo instructionInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
235 | 0 | return getNextDecorator().validateInstruction(validationTypeKey, processKey, checkKey, instructionInfo, contextInfo); |
236 | |
} |
237 | |
|
238 | |
@Override |
239 | |
public InstructionInfo createInstruction(String processKey, String checkKey, InstructionInfo instructionInfo, ContextInfo contextInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
240 | 0 | return getNextDecorator().createInstruction(processKey, checkKey, instructionInfo, contextInfo); |
241 | |
} |
242 | |
|
243 | |
@Override |
244 | |
public InstructionInfo updateInstruction(String instructionId, InstructionInfo instructionInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
245 | 0 | return getNextDecorator().updateInstruction(instructionId, instructionInfo, contextInfo); |
246 | |
} |
247 | |
|
248 | |
@Override |
249 | |
public StatusInfo deleteInstruction(String instructionId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
250 | 0 | return getNextDecorator().deleteInstruction(instructionId, contextInfo); |
251 | |
} |
252 | |
|
253 | |
@Override |
254 | |
public List<InstructionInfo> getInstructionsForEvaluation(String processKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
255 | 0 | return getNextDecorator().getInstructionsForEvaluation(processKey, contextInfo); |
256 | |
} |
257 | |
|
258 | |
|
259 | |
} |