1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
package org.kuali.student.r2.core.state.service; |
16 | |
|
17 | |
import java.util.List; |
18 | |
|
19 | |
import org.kuali.rice.core.api.criteria.QueryByCriteria; |
20 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
21 | |
import org.kuali.student.r2.common.dto.StatusInfo; |
22 | |
import org.kuali.student.r2.common.dto.ValidationResultInfo; |
23 | |
|
24 | |
import org.kuali.student.r2.common.exceptions.AlreadyExistsException; |
25 | |
import org.kuali.student.r2.common.exceptions.DataValidationErrorException; |
26 | |
import org.kuali.student.r2.common.exceptions.DoesNotExistException; |
27 | |
import org.kuali.student.r2.common.exceptions.InvalidParameterException; |
28 | |
import org.kuali.student.r2.common.exceptions.MissingParameterException; |
29 | |
import org.kuali.student.r2.common.exceptions.OperationFailedException; |
30 | |
import org.kuali.student.r2.common.exceptions.PermissionDeniedException; |
31 | |
import org.kuali.student.r2.common.exceptions.ReadOnlyException; |
32 | |
import org.kuali.student.r2.common.exceptions.VersionMismatchException; |
33 | |
|
34 | |
import org.kuali.student.r2.core.state.dto.LifecycleInfo; |
35 | |
import org.kuali.student.r2.core.state.dto.StateInfo; |
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | 0 | public class StateServiceDecorator implements StateService { |
43 | |
|
44 | |
private StateService nextDecorator; |
45 | |
|
46 | |
public StateService getNextDecorator() { |
47 | 0 | return nextDecorator; |
48 | |
} |
49 | |
|
50 | |
public void setNextDecorator(StateService nextDecorator) { |
51 | 0 | this.nextDecorator = nextDecorator; |
52 | 0 | } |
53 | |
|
54 | |
@Override |
55 | |
public LifecycleInfo getLifecycle(String lifecycleKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
56 | 0 | return getNextDecorator().getLifecycle(lifecycleKey, contextInfo); |
57 | |
} |
58 | |
|
59 | |
@Override |
60 | |
public List<LifecycleInfo> getLifecyclesByKeys(List<String> lifecycleKeys, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
61 | 0 | return getNextDecorator().getLifecyclesByKeys(lifecycleKeys, contextInfo); |
62 | |
} |
63 | |
|
64 | |
@Override |
65 | |
public List<String> getLifecycleKeysByRefObjectUri(String refObjectUri, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
66 | 0 | return getNextDecorator().getLifecycleKeysByRefObjectUri(refObjectUri, contextInfo); |
67 | |
} |
68 | |
|
69 | |
@Override |
70 | |
public List<String> searchForLifecycleKeys(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
71 | 0 | return getNextDecorator().searchForLifecycleKeys(criteria, contextInfo); |
72 | |
} |
73 | |
|
74 | |
@Override |
75 | |
public List<LifecycleInfo> searchForLifecycles(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
76 | 0 | return getNextDecorator().searchForLifecycles(criteria, contextInfo); |
77 | |
} |
78 | |
|
79 | |
@Override |
80 | |
public List<ValidationResultInfo> validateLifecycle(String validationTypeKey, LifecycleInfo lifecycleInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
81 | 0 | return getNextDecorator().validateLifecycle(validationTypeKey, lifecycleInfo, contextInfo); |
82 | |
} |
83 | |
|
84 | |
@Override |
85 | |
public LifecycleInfo createLifecycle(String lifecycleKey, LifecycleInfo lifecycleInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
86 | 0 | return getNextDecorator().createLifecycle(lifecycleKey, lifecycleInfo, contextInfo); |
87 | |
} |
88 | |
|
89 | |
@Override |
90 | |
public LifecycleInfo updateLifecycle(String lifecycleKey, LifecycleInfo lifecycleInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
91 | 0 | return getNextDecorator().updateLifecycle(lifecycleKey, lifecycleInfo, contextInfo); |
92 | |
} |
93 | |
|
94 | |
@Override |
95 | |
public StatusInfo deleteLifecycle(String lifecycleKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
96 | 0 | return getNextDecorator().deleteLifecycle(lifecycleKey, contextInfo); |
97 | |
} |
98 | |
|
99 | |
@Override |
100 | |
public StateInfo getState(String stateKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
101 | 0 | return getNextDecorator().getState(stateKey, contextInfo); |
102 | |
} |
103 | |
|
104 | |
@Override |
105 | |
public List<StateInfo> getStatesByKeys(List<String> stateKeys, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
106 | 0 | return getNextDecorator().getStatesByKeys(stateKeys, contextInfo); |
107 | |
} |
108 | |
|
109 | |
@Override |
110 | |
public List<StateInfo> getStatesByLifecycle(String lifecycleKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
111 | 0 | return getNextDecorator().getStatesByLifecycle(lifecycleKey, contextInfo); |
112 | |
} |
113 | |
|
114 | |
@Override |
115 | |
public List<String> searchForStateKeys(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
116 | 0 | return getNextDecorator().searchForStateKeys(criteria, contextInfo); |
117 | |
} |
118 | |
|
119 | |
@Override |
120 | |
public List<StateInfo> searchForStates(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
121 | 0 | return getNextDecorator().searchForStates(criteria, contextInfo); |
122 | |
} |
123 | |
|
124 | |
@Override |
125 | |
public List<ValidationResultInfo> validateState(String validationTypeKey, String lifecycleKey, StateInfo stateInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
126 | 0 | return getNextDecorator().validateState(validationTypeKey, lifecycleKey, stateInfo, contextInfo); |
127 | |
} |
128 | |
|
129 | |
@Override |
130 | |
public StateInfo createState(String lifecycleKey, String stateKey, StateInfo stateInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
131 | 0 | return getNextDecorator().createState(lifecycleKey, stateKey, stateInfo, contextInfo); |
132 | |
} |
133 | |
|
134 | |
@Override |
135 | |
public StateInfo updateState(String stateKey, StateInfo stateInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
136 | 0 | return getNextDecorator().updateState(stateKey, stateInfo, contextInfo); |
137 | |
} |
138 | |
|
139 | |
@Override |
140 | |
public StatusInfo deleteState(String stateKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
141 | 0 | return getNextDecorator().deleteState(stateKey, contextInfo); |
142 | |
} |
143 | |
} |