Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
KrmsTypeService |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2006-2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | ||
17 | package org.kuali.rice.krms.api.repository; | |
18 | ||
19 | import javax.jws.WebMethod; | |
20 | import javax.jws.WebParam; | |
21 | import javax.jws.WebResult; | |
22 | import javax.jws.WebService; | |
23 | import javax.jws.soap.SOAPBinding; | |
24 | import java.util.List; | |
25 | ||
26 | ||
27 | @WebService(name = "KRMSTypeService", targetNamespace = RepositoryConstants.Namespaces.KRMS_NAMESPACE) | |
28 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
29 | public interface KrmsTypeService { | |
30 | ||
31 | /** | |
32 | * Lookup a krms type based on the given id. | |
33 | * | |
34 | * @param id the given KRMS type id | |
35 | * @return a KRMS KrmsType object with the given id. A null reference is returned if an invalid or | |
36 | * non-existant id is supplied. | |
37 | */ | |
38 | @WebMethod(operationName = "getTypeById") | |
39 | @WebResult(name = "type") | |
40 | KrmsType getTypeById(@WebParam(name = "id") String id); | |
41 | ||
42 | /** | |
43 | * Get a krms type object based on name and namespace | |
44 | * | |
45 | * @param name the given type name | |
46 | * @param namespace the given type namespace | |
47 | * @return A krms type object with the given namespace and name if one with that name and namespace | |
48 | * exists. Otherwise, null is returned. | |
49 | * @throws IllegalStateException if multiple krms types exist with the same name and namespace | |
50 | */ | |
51 | @WebMethod(operationName = "getTypeByNameAndNamespace") | |
52 | @WebResult(name = "type") | |
53 | KrmsType getTypeByNameAndNamespace( | |
54 | @WebParam(name = "name") String name, | |
55 | @WebParam(name = "namespace") String namespace); | |
56 | ||
57 | /** | |
58 | * Returns all KRMS types that for a given namespace. | |
59 | * | |
60 | * @return all KRMS types for a namespace | |
61 | */ | |
62 | @WebMethod(operationName = "findAllTypesByNamespace") | |
63 | @WebResult(name = "namespaceTypes") | |
64 | List<KrmsType> findAllTypesByNamespace( | |
65 | @WebParam(name = "namespace") String namespace); | |
66 | ||
67 | /** | |
68 | * Returns all KRMS types | |
69 | * | |
70 | * @return all KRMS types | |
71 | */ | |
72 | @WebMethod(operationName = "findAllTypes") | |
73 | @WebResult(name = "allTypes") | |
74 | List<KrmsType> findAllTypes(); | |
75 | } |