1 | |
package org.kuali.student.r2.lum.lrc.service; |
2 | |
|
3 | |
import java.util.List; |
4 | |
|
5 | |
import org.kuali.student.r2.common.dto.StatusInfo; |
6 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
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.DoesNotExistException; |
10 | |
import org.kuali.student.r2.common.exceptions.DataValidationErrorException; |
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.VersionMismatchException; |
16 | |
import org.kuali.student.r2.lum.lrc.dto.ResultValuesGroupInfo; |
17 | |
import org.kuali.student.r2.lum.lrc.dto.ResultScaleInfo; |
18 | |
import org.kuali.student.r2.lum.lrc.dto.ResultValueInfo; |
19 | |
|
20 | 0 | public abstract class LRCServiceDecorator implements LRCService { |
21 | |
|
22 | |
private LRCService nextDecorator; |
23 | |
|
24 | |
public LRCService getNextDecorator() |
25 | |
throws OperationFailedException { |
26 | 0 | if (null == nextDecorator) { |
27 | 0 | throw new OperationFailedException("Misconfigured application: nextDecorator is null"); |
28 | |
} |
29 | 0 | return nextDecorator; |
30 | |
} |
31 | |
public void setNextDecorator(LRCService nextDecorator) { |
32 | 0 | this.nextDecorator = nextDecorator; |
33 | 0 | } |
34 | |
|
35 | |
@Override |
36 | |
public ResultValuesGroupInfo getResultValuesGroup(String resultValuesGroupId, ContextInfo context) |
37 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
38 | |
OperationFailedException, PermissionDeniedException { |
39 | 0 | return getNextDecorator().getResultValuesGroup(resultValuesGroupId, context); |
40 | |
} |
41 | |
|
42 | |
@Override |
43 | |
public List<ResultValuesGroupInfo> getResultValuesGroupsByIds(List<String> resultValuesGroupIds, ContextInfo context) |
44 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
45 | |
OperationFailedException, PermissionDeniedException { |
46 | 0 | return getNextDecorator().getResultValuesGroupsByIds(resultValuesGroupIds, context); |
47 | |
} |
48 | |
|
49 | |
@Override |
50 | |
public List<ResultValuesGroupInfo> getResultValuesGroupsByResultValue(String resultValueId, ContextInfo context) |
51 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
52 | |
OperationFailedException, PermissionDeniedException { |
53 | 0 | return getNextDecorator().getResultValuesGroupsByResultValue(resultValueId, context); |
54 | |
} |
55 | |
|
56 | |
@Override |
57 | |
public List<String> getResultValuesGroupIdsByType(String resultValuesGroupTypeKey, ContextInfo context) |
58 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
59 | |
OperationFailedException, PermissionDeniedException { |
60 | 0 | return getNextDecorator().getResultValuesGroupIdsByType(resultValuesGroupTypeKey, context); |
61 | |
} |
62 | |
|
63 | |
@Override |
64 | |
public ResultValuesGroupInfo createResultValuesGroup(ResultValuesGroupInfo gradeValuesGroupInfo, ContextInfo context) |
65 | |
throws AlreadyExistsException, |
66 | |
DataValidationErrorException, InvalidParameterException, |
67 | |
MissingParameterException, OperationFailedException, |
68 | |
PermissionDeniedException { |
69 | 0 | return getNextDecorator().createResultValuesGroup(gradeValuesGroupInfo, context); |
70 | |
} |
71 | |
|
72 | |
@Override |
73 | |
public ResultValuesGroupInfo updateResultValuesGroup(String resultValuesGroupKey, |
74 | |
ResultValuesGroupInfo gradeValuesGroupInfo, ContextInfo context) |
75 | |
throws DataValidationErrorException, DoesNotExistException, |
76 | |
InvalidParameterException, MissingParameterException, OperationFailedException, |
77 | |
PermissionDeniedException, |
78 | |
VersionMismatchException { |
79 | 0 | return getNextDecorator().updateResultValuesGroup(resultValuesGroupKey, gradeValuesGroupInfo, context); |
80 | |
} |
81 | |
|
82 | |
@Override |
83 | |
public StatusInfo deleteResultValuesGroup(String resultValuesGroupId, ContextInfo context) |
84 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
85 | |
OperationFailedException, PermissionDeniedException { |
86 | 0 | return getNextDecorator().deleteResultValuesGroup(resultValuesGroupId, context); |
87 | |
} |
88 | |
|
89 | |
@Override |
90 | |
public ResultValueInfo getResultValue(String resultValueId, ContextInfo context) |
91 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
92 | |
OperationFailedException, PermissionDeniedException { |
93 | 0 | return getNextDecorator().getResultValue(resultValueId, context); |
94 | |
} |
95 | |
|
96 | |
@Override |
97 | |
public List<ResultValueInfo> getResultValuesByIds(List<String> resultValueIds, ContextInfo context) |
98 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
99 | |
OperationFailedException, PermissionDeniedException { |
100 | 0 | return getNextDecorator().getResultValuesByIds(resultValueIds, context); |
101 | |
} |
102 | |
|
103 | |
@Override |
104 | |
public List<ResultValueInfo> getResultValuesForResultValuesGroup(String resultValuesGroupId, ContextInfo context) |
105 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
106 | |
OperationFailedException, PermissionDeniedException { |
107 | 0 | return getNextDecorator().getResultValuesForResultValuesGroup(resultValuesGroupId, context); |
108 | |
} |
109 | |
|
110 | |
@Override |
111 | |
public ResultValueInfo createResultValue(ResultValueInfo resultValueInfo, ContextInfo context) |
112 | |
throws AlreadyExistsException, |
113 | |
DataValidationErrorException, DoesNotExistException, |
114 | |
InvalidParameterException, MissingParameterException, OperationFailedException, |
115 | |
PermissionDeniedException { |
116 | 0 | return getNextDecorator().createResultValue(resultValueInfo, context); |
117 | |
} |
118 | |
|
119 | |
@Override |
120 | |
public ResultValueInfo updateResultValue(String resultValueId, ResultValueInfo resultValueInfo, ContextInfo context) |
121 | |
throws DataValidationErrorException, DoesNotExistException, |
122 | |
InvalidParameterException, MissingParameterException, OperationFailedException, |
123 | |
PermissionDeniedException, |
124 | |
VersionMismatchException { |
125 | 0 | return getNextDecorator().updateResultValue(resultValueId, resultValueInfo, context); |
126 | |
} |
127 | |
|
128 | |
@Override |
129 | |
public StatusInfo deleteResultValue(String resultValueId, ContextInfo context) throws DoesNotExistException, |
130 | |
InvalidParameterException, MissingParameterException, OperationFailedException, |
131 | |
PermissionDeniedException { |
132 | 0 | return getNextDecorator().deleteResultValue(resultValueId, context); |
133 | |
} |
134 | |
|
135 | |
@Override |
136 | |
public List<ValidationResultInfo> validateResultValue(String validationType, ResultValueInfo resultValueInfo, |
137 | |
ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
138 | |
OperationFailedException { |
139 | 0 | return getNextDecorator().validateResultValue(validationType, resultValueInfo, context); |
140 | |
} |
141 | |
|
142 | |
@Override |
143 | |
public List<ValidationResultInfo> validateResultValuesGroup(String validationType, |
144 | |
ResultValuesGroupInfo gradeValuesGroupInfo, ContextInfo context) throws DoesNotExistException, |
145 | |
InvalidParameterException, MissingParameterException, OperationFailedException { |
146 | 0 | return getNextDecorator().validateResultValuesGroup(validationType, gradeValuesGroupInfo, context); |
147 | |
} |
148 | |
|
149 | |
@Override |
150 | |
public ResultScaleInfo getResultScale(String resultScaleId, ContextInfo context) throws DoesNotExistException, |
151 | |
InvalidParameterException, MissingParameterException, OperationFailedException, |
152 | |
PermissionDeniedException { |
153 | 0 | return getNextDecorator().getResultScale(resultScaleId, context); |
154 | |
} |
155 | |
|
156 | |
@Override |
157 | |
public List<ResultValueInfo> getResultValuesForScale(String resultScaleKey, ContextInfo context) |
158 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
159 | |
OperationFailedException, PermissionDeniedException { |
160 | 0 | return getNextDecorator().getResultValuesForScale(resultScaleKey, context); |
161 | |
} |
162 | |
} |