| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| PropositionRepositoryService |
|
| 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 java.util.List; | |
| 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 | ||
| 27 | ||
| 28 | @WebService(name = "PropositionRepositoryService", targetNamespace = RepositoryConstants.Namespaces.KRMS_NAMESPACE) | |
| 29 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
| 30 | public interface PropositionRepositoryService { | |
| 31 | ||
| 32 | /** | |
| 33 | * This will create a {@link Proposition} exactly like the parameter passed in. | |
| 34 | * | |
| 35 | * @param prop the proposition to create | |
| 36 | * @throws IllegalArgumentException if the proposition is null | |
| 37 | * @throws IllegalStateException if the proposition already exists in the system | |
| 38 | */ | |
| 39 | @WebMethod(operationName="createProposition") | |
| 40 | void createProposition(@WebParam(name = "prop") Proposition prop); | |
| 41 | ||
| 42 | /** | |
| 43 | * This will update a {@link Proposition}. | |
| 44 | * | |
| 45 | * | |
| 46 | * @param prop the proposition to update | |
| 47 | * @throws IllegalArgumentException if the proposition is null | |
| 48 | * @throws IllegalStateException if the proposition does not exist in the system | |
| 49 | */ | |
| 50 | @WebMethod(operationName="updateProposition") | |
| 51 | void updateProposition(@WebParam(name = "prop") Proposition prop); | |
| 52 | ||
| 53 | /** | |
| 54 | * Lookup the proposition based on the given proposition id. | |
| 55 | * | |
| 56 | * @param propId the given proposition id | |
| 57 | * @return a proposition associated with the given proposition id. A null reference is returned if an invalid or | |
| 58 | * non-existent id is supplied. | |
| 59 | */ | |
| 60 | @WebMethod(operationName = "getPropositionById") | |
| 61 | @WebResult(name = "prop") | |
| 62 | Proposition getPropositionById( | |
| 63 | @WebParam(name = "propId") String propId); | |
| 64 | ||
| 65 | ||
| 66 | ||
| 67 | /** | |
| 68 | * This will create a {@link PropositionParameter} exactly like the parameter passed in. | |
| 69 | * | |
| 70 | * @param parameter the proposition parameter to create | |
| 71 | * @throws IllegalArgumentException if the proposition parameter is null | |
| 72 | * @throws IllegalStateException if the proposition parameter is already existing in the system | |
| 73 | */ | |
| 74 | @WebMethod(operationName="createParameter") | |
| 75 | void createParameter(@WebParam(name = "parameter") PropositionParameter parameter); | |
| 76 | ||
| 77 | /** | |
| 78 | * This will update a {@link PropositionParameter}. | |
| 79 | * | |
| 80 | * | |
| 81 | * @param parameter the proposition parameter to update | |
| 82 | * @throws IllegalArgumentException if the proposition parameter is null | |
| 83 | * @throws IllegalStateException if the proposition parameter does not exist in the system | |
| 84 | */ | |
| 85 | @WebMethod(operationName="updateParameter") | |
| 86 | void updateParameter(@WebParam(name = "parameter") PropositionParameter parameter); | |
| 87 | ||
| 88 | /** | |
| 89 | * Lookup the proposition parameters based on the given proposition id. | |
| 90 | * | |
| 91 | * @param id the given proposition id | |
| 92 | * @return a list of PropositionParameters associated with the given proposition id. A null reference is returned if an invalid or | |
| 93 | * non-existant id is supplied. | |
| 94 | */ | |
| 95 | @WebMethod(operationName = "getParameters") | |
| 96 | @WebResult(name = "parameters") | |
| 97 | List<PropositionParameter> getParameters( | |
| 98 | @WebParam(name = "propId") String propId); | |
| 99 | ||
| 100 | /** | |
| 101 | * Lookup the proposition parameter based on the id. | |
| 102 | * | |
| 103 | * @param id the given proposition id | |
| 104 | * @return an immutable PropositionParameters associated with the given id. A null reference is returned if an invalid or | |
| 105 | * non-existant id is supplied. | |
| 106 | */ | |
| 107 | @WebMethod(operationName = "getParameterById") | |
| 108 | @WebResult(name = "parameter") | |
| 109 | PropositionParameter getParameterById( | |
| 110 | @WebParam(name = "id") String id); | |
| 111 | ||
| 112 | /** | |
| 113 | * Lookup the proposition parameter based on the proposition id and sequence number. | |
| 114 | * | |
| 115 | * @param id the given proposition id | |
| 116 | * @return an immutable PropositionParameters associated with the given proposition id and sequence number. A null reference is returned if an invalid or | |
| 117 | * non-existant. | |
| 118 | */ | |
| 119 | @WebMethod(operationName = "getParameterByPropIdAndSequenceNumber") | |
| 120 | @WebResult(name = "parameter") | |
| 121 | PropositionParameter getParameterByPropIdAndSequenceNumber( | |
| 122 | @WebParam(name = "propId") String propId, | |
| 123 | @WebParam(name = "sequenceNumber")Integer sequenceNumber); | |
| 124 | ||
| 125 | ||
| 126 | } |