Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
VersionManagementService |
|
| 1.0;1 |
1 | package org.kuali.student.r2.core.versionmanagement.service; | |
2 | ||
3 | import org.kuali.student.r2.common.dto.ContextInfo; | |
4 | import org.kuali.student.r2.common.exceptions.DoesNotExistException; | |
5 | import org.kuali.student.r2.common.exceptions.InvalidParameterException; | |
6 | import org.kuali.student.r2.common.exceptions.MissingParameterException; | |
7 | import org.kuali.student.r2.common.exceptions.OperationFailedException; | |
8 | import org.kuali.student.r2.common.exceptions.PermissionDeniedException; | |
9 | import org.kuali.student.r2.common.util.constants.VersionManagementServiceConstants; | |
10 | import org.kuali.student.r2.core.versionmanagement.dto.VersionDisplayInfo; | |
11 | ||
12 | import javax.jws.WebParam; | |
13 | import javax.jws.WebService; | |
14 | import javax.jws.soap.SOAPBinding; | |
15 | import java.util.Date; | |
16 | import java.util.List; | |
17 | ||
18 | /** | |
19 | * Version Management Service supports the management of object versions | |
20 | * | |
21 | * @Version 2.0 | |
22 | * @Author Sri komandur@uw.edu | |
23 | */ | |
24 | ||
25 | @WebService(name = "VersionManagementService", targetNamespace = VersionManagementServiceConstants.NAMESPACE) | |
26 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
27 | public interface VersionManagementService { | |
28 | /** | |
29 | * Retrieves a list of versions associated with the objectId. | |
30 | * | |
31 | * @param refObjectUri reference object type URI | |
32 | * @param refObjectId reference object Id | |
33 | * @param contextInfo context information containing the principalId and | |
34 | * locale information about the caller of service | |
35 | * operation | |
36 | * @return a list of versions | |
37 | * @throws DoesNotExistException refObjectUri or refObjectId not found | |
38 | * @throws InvalidParameterException invalid contextInfo | |
39 | * @throws MissingParameterException refObjectUri, refObjectId or | |
40 | * contextInfo is missing or null | |
41 | * @throws OperationFailedException unable to complete request | |
42 | * @throws PermissionDeniedException an authorization failure occurred | |
43 | */ | |
44 | public List<VersionDisplayInfo> getVersions(@WebParam(name = "refObjectUri") String refObjectUri, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
45 | ||
46 | /** | |
47 | * Retrieves first version associated with the objectId. | |
48 | * | |
49 | * @param refObjectUri reference object type URI | |
50 | * @param refObjectId reference object Id | |
51 | * @param contextInfo context information containing the principalId and | |
52 | * locale information about the caller of service | |
53 | * operation | |
54 | * @return first version | |
55 | * @throws DoesNotExistException refObjectUri or refObjectId not found | |
56 | * @throws InvalidParameterException contextInfo is not valid | |
57 | * @throws MissingParameterException refObjectUri, refObjectId or | |
58 | * contextInfo is missing or null | |
59 | * @throws OperationFailedException unable to complete request | |
60 | * @throws PermissionDeniedException an authorization failure occurred | |
61 | */ | |
62 | public VersionDisplayInfo getFirstVersion(@WebParam(name = "refObjectUri") String refObjectUri, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
63 | ||
64 | /** | |
65 | * Retrieves latest version associated with the objectId. This is not always | |
66 | * the current version. A current version is what is being used by the | |
67 | * system right now, but there could be draft version created after the | |
68 | * current version. | |
69 | * | |
70 | * @param refObjectUri reference object type URI | |
71 | * @param refObjectId reference object Id | |
72 | * @param contextInfo context information containing the principalId and | |
73 | * locale information about the caller of service | |
74 | * operation | |
75 | * @return latest version | |
76 | * @throws DoesNotExistException specified refObjectId and refObjectUri | |
77 | * not found | |
78 | * @throws InvalidParameterException contextInfo is not valid | |
79 | * @throws MissingParameterException refObjectUri, refObjectId or | |
80 | * contextInfo is missing or null | |
81 | * @throws OperationFailedException unable to complete request | |
82 | * @throws PermissionDeniedException an authorization failure occurred | |
83 | */ | |
84 | public VersionDisplayInfo getLatestVersion(@WebParam(name = "refObjectUri") String refObjectUri, | |
85 | @WebParam(name = "refObjectId") String refObjectId, | |
86 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
87 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
88 | ||
89 | /** | |
90 | * Retrieves current version associated with the objectId. | |
91 | * | |
92 | * @param refObjectUri reference object type URI | |
93 | * @param refObjectId reference object Id | |
94 | * @param contextInfo context information containing the principalId and | |
95 | * locale information about the caller of service | |
96 | * operation | |
97 | * @return current version | |
98 | * @throws DoesNotExistException specified refObjectUri and refObjectId | |
99 | * not found | |
100 | * @throws InvalidParameterException contextInfo is not valid | |
101 | * @throws MissingParameterException refObjectUri, refObjectId or | |
102 | * contextInfo is missing or null | |
103 | * @throws OperationFailedException unable to complete request | |
104 | * @throws PermissionDeniedException an authorization failure occurred | |
105 | */ | |
106 | public VersionDisplayInfo getCurrentVersion(@WebParam(name = "refObjectUri") String refObjectUri, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
107 | ||
108 | /** | |
109 | * Retrieves the version associated with the objectId and the sequence | |
110 | * number. | |
111 | * | |
112 | * @param refObjectUri reference object type URI | |
113 | * @param refObjectId reference object Id | |
114 | * @param sequence sequence number | |
115 | * @param contextInfo context information containing the principalId and | |
116 | * locale information about the caller of service | |
117 | * operation | |
118 | * @return version matching the sequence | |
119 | * @throws DoesNotExistException specified refObjectUri, refObjectId or | |
120 | * sequence not found | |
121 | * @throws InvalidParameterException sequence or contextInfo is not valid | |
122 | * @throws MissingParameterException refObjectUri, refObjectId, sequence or | |
123 | * contextInfo is missing or null | |
124 | * @throws OperationFailedException unable to complete request | |
125 | * @throws PermissionDeniedException an authorization failure occurred | |
126 | */ | |
127 | public VersionDisplayInfo getVersionBySequenceNumber(@WebParam(name = "refObjectUri") String refObjectUri, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "sequence") Long sequence, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
128 | ||
129 | /** | |
130 | * Retrieves the current version associated with the objectId on a given | |
131 | * date. | |
132 | * | |
133 | * @param refObjectUri reference object type URI | |
134 | * @param refObjectId reference object Id | |
135 | * @param date date | |
136 | * @param contextInfo context information containing the principalId and | |
137 | * locale information about the caller of service | |
138 | * operation | |
139 | * @return current version on given date | |
140 | * @throws DoesNotExistException specified refObjectId and refObjectUri | |
141 | * not found | |
142 | * @throws InvalidParameterException date or contextInfo is not valid | |
143 | * @throws MissingParameterException refObjectUri, refObjectId, date or | |
144 | * contextInfo is missing or null | |
145 | * @throws OperationFailedException unable to complete request | |
146 | * @throws PermissionDeniedException an authorization failure occurred | |
147 | */ | |
148 | public VersionDisplayInfo getCurrentVersionOnDate(@WebParam(name = "refObjectUri") String refObjectUri, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "date") Date date, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
149 | ||
150 | /** | |
151 | * Retrieves the current version associated with the objectId in a given | |
152 | * date range | |
153 | * | |
154 | * @param refObjectUri reference object type URI | |
155 | * @param refObjectId reference object Id | |
156 | * @param from from date | |
157 | * @param to to date | |
158 | * @param contextInfo context information containing the principalId and | |
159 | * locale information about the caller of service | |
160 | * operation | |
161 | * @return current version in given date range | |
162 | * @throws DoesNotExistException specified refObjectId and refObjectUri | |
163 | * not found | |
164 | * @throws InvalidParameterException from, to or contextInfo is not valid | |
165 | * @throws MissingParameterException refObjectUri, refObjectId, from, to or | |
166 | * contextInfo is missing or null | |
167 | * @throws OperationFailedException unable to complete request | |
168 | * @throws PermissionDeniedException an authorization failure occurred | |
169 | */ | |
170 | public List<VersionDisplayInfo> getVersionsInDateRange(@WebParam(name = "refObjectUri") String refObjectUri, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "from") Date from, @WebParam(name = "to") Date to, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
171 | } |