| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| KimTypeInfoService |
|
| 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.kim.api.type; | |
| 18 | ||
| 19 | import org.kuali.rice.kim.api.KimConstants; | |
| 20 | ||
| 21 | import javax.jws.WebMethod; | |
| 22 | import javax.jws.WebParam; | |
| 23 | import javax.jws.WebResult; | |
| 24 | import javax.jws.WebService; | |
| 25 | import javax.jws.soap.SOAPBinding; | |
| 26 | import javax.xml.bind.annotation.XmlElement; | |
| 27 | import javax.xml.bind.annotation.XmlElementWrapper; | |
| 28 | import java.util.Collection; | |
| 29 | ||
| 30 | @WebService(name = "kimTypeInfoServiceSoap", targetNamespace = KimConstants.Namespaces.KIM_NAMESPACE_2_0) | |
| 31 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
| 32 | public interface KimTypeInfoService { | |
| 33 | ||
| 34 | /** | |
| 35 | * Gets a {@link KimType} from a kim type id. | |
| 36 | * <p/> | |
| 37 | * <p> | |
| 38 | * This method will return null if the kim type does not exist. | |
| 39 | * </p> | |
| 40 | * | |
| 41 | * @param id the id to retrieve the kim type by. cannot be null. | |
| 42 | * @return a {@link KimType} or null | |
| 43 | * @throws IllegalArgumentException if the id is null | |
| 44 | */ | |
| 45 | @WebMethod(operationName="getKimType") | |
| 46 | @WebResult(name = "kimType") | |
| 47 | KimType getKimType(@WebParam(name = "id") String id); | |
| 48 | ||
| 49 | /** | |
| 50 | * Gets a {@link KimType} from a kim type name and namespace code. | |
| 51 | * <p/> | |
| 52 | * <p> | |
| 53 | * This method will return null if the kim type does not exist. | |
| 54 | * </p> | |
| 55 | * <p/> | |
| 56 | * <p> | |
| 57 | * This method will only return active kim types. | |
| 58 | * </p> | |
| 59 | * | |
| 60 | * @param namespaceCode the namespaceCode to retrieve the kim type by. cannot be null. | |
| 61 | * @param name the name to retrieve the kim type by. cannot be null. | |
| 62 | * @return a {@link KimType} or null | |
| 63 | * @throws IllegalArgumentException if the namespaceCode or name is null | |
| 64 | * @throws IllegalStateException if multiple active results are found for a namespaceCode and name | |
| 65 | */ | |
| 66 | @WebMethod(operationName="findKimTypeByNameAndNamespace") | |
| 67 | @WebResult(name = "kimType") | |
| 68 | KimType findKimTypeByNameAndNamespace(@WebParam(name = "namespaceCode") String namespaceCode, @WebParam(name = "name") String name); | |
| 69 | ||
| 70 | /** | |
| 71 | * Gets all the {@link KimType KimTypes}. | |
| 72 | * <p/> | |
| 73 | * <p> | |
| 74 | * This method will always return an <b>immutable</b> Collection | |
| 75 | * even when no values exist. | |
| 76 | * </p> | |
| 77 | * <p/> | |
| 78 | * <p> | |
| 79 | * This method will only return active kim types. | |
| 80 | * </p> | |
| 81 | * | |
| 82 | * @return an immutable collection of kim types | |
| 83 | */ | |
| 84 | @WebMethod(operationName="findAllKimTypes") | |
| 85 | @XmlElementWrapper(name = "kimTypes", required = true) | |
| 86 | @XmlElement(name = "kimType", required = false) | |
| 87 | @WebResult(name = "kimTypes") | |
| 88 | Collection<KimType> findAllKimTypes(); | |
| 89 | } |