| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| KrmsAttributeDefinitionService |
|
| 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 = "KrmsAttributeDefinitionService", targetNamespace = RepositoryConstants.Namespaces.KRMS_NAMESPACE) | |
| 28 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
| 29 | public interface KrmsAttributeDefinitionService { | |
| 30 | ||
| 31 | /** | |
| 32 | * This will create a {@link KrmsAttributeDefinition} exactly like the parameter passed in. | |
| 33 | * | |
| 34 | * @param attributeDefinition - KrmsAttributeDefinition | |
| 35 | * @throws IllegalArgumentException if the attribute definition is null | |
| 36 | * @throws IllegalStateException if the attribute definition already exists in the system | |
| 37 | */ | |
| 38 | @WebMethod(operationName="createKrmsAttributeDefinition") | |
| 39 | void createAttributeDefinition(@WebParam(name = "attributeDefinition") KrmsAttributeDefinition attributeDefinition); | |
| 40 | ||
| 41 | /** | |
| 42 | * This will update a {@link KrmsAttributeDefinition}. | |
| 43 | * | |
| 44 | * | |
| 45 | * @param attributeDefinition - KrmsAttributeDefinition | |
| 46 | * @throws IllegalArgumentException if the attribute definition is null | |
| 47 | * @throws IllegalStateException if the attribute definition does not exist in the system | |
| 48 | */ | |
| 49 | @WebMethod(operationName="updateKrmsAttributeDefinition") | |
| 50 | void updateAttributeDefinition(@WebParam(name = "attributeDefinition") KrmsAttributeDefinition attributeDefinition); | |
| 51 | ||
| 52 | /** | |
| 53 | * Lookup a KrmsAttributeDefinition based on the given id. | |
| 54 | * | |
| 55 | * @param id the given KrmsAttributeDefinition id | |
| 56 | * @return a KrmsAttributeDefinition object with the given id. A null reference is returned if an invalid or | |
| 57 | * non-existant id is supplied. | |
| 58 | */ | |
| 59 | @WebMethod(operationName = "getAttributeDefinitionById") | |
| 60 | @WebResult(name = "attributeDefinition") | |
| 61 | KrmsAttributeDefinition getAttributeDefinitionById(@WebParam(name = "id") String id); | |
| 62 | ||
| 63 | /** | |
| 64 | * Get a KrmsAttributeDefinition object based on name and namespace | |
| 65 | * | |
| 66 | * @param name the given name | |
| 67 | * @param namespace the given type namespace | |
| 68 | * @return A KrmsAttributeDefinition object with the given namespace and name if one with that name and namespace | |
| 69 | * exists. Otherwise, null is returned. | |
| 70 | * @throws IllegalStateException if multiple KrmsAttributeDefinitions exist with the same name and namespace | |
| 71 | */ | |
| 72 | @WebMethod(operationName = "getAttributeDefinitionByNameAndNamespace") | |
| 73 | @WebResult(name = "attributeDefinition") | |
| 74 | KrmsAttributeDefinition getAttributeDefinitionByNameAndNamespace( | |
| 75 | @WebParam(name = "name") String name, | |
| 76 | @WebParam(name = "namespace") String namespace); | |
| 77 | ||
| 78 | /** | |
| 79 | * Returns all KrmsAttributeDefinition that for a given namespace. | |
| 80 | * | |
| 81 | * @return all KrmsAttributeDefinition for a namespace | |
| 82 | */ | |
| 83 | @WebMethod(operationName = "findAttributeDefinitionsByNamespace") | |
| 84 | @WebResult(name = "attributeDefinitions") | |
| 85 | List<KrmsAttributeDefinition> findAttributeDefinitionsByNamespace( | |
| 86 | @WebParam(name = "namespace") String namespace); | |
| 87 | ||
| 88 | /** | |
| 89 | * Returns all KrmsAttributeDefinitions | |
| 90 | * | |
| 91 | * @return all KrmsAttributeDefinitions | |
| 92 | */ | |
| 93 | @WebMethod(operationName = "findAllAttributeDefinitions") | |
| 94 | @WebResult(name = "allAttributeDefinitions") | |
| 95 | List<KrmsAttributeDefinition> findAllAttributeDefinitions(); | |
| 96 | } |