| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| PropositionBoService |
|
| 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.impl.repository; | |
| 18 | ||
| 19 | import java.util.List; | |
| 20 | ||
| 21 | ||
| 22 | import org.kuali.rice.krms.api.repository.proposition.PropositionDefinition; | |
| 23 | import org.kuali.rice.krms.api.repository.proposition.PropositionParameter; | |
| 24 | ||
| 25 | public interface PropositionBoService { | |
| 26 | ||
| 27 | /** | |
| 28 | * This will create a {@link PropositionDefinition} exactly like the parameter passed in. | |
| 29 | * | |
| 30 | * @param prop the proposition to create | |
| 31 | * @throws IllegalArgumentException if the proposition is null | |
| 32 | * @throws IllegalStateException if the proposition already exists in the system | |
| 33 | */ | |
| 34 | PropositionDefinition createProposition(PropositionDefinition prop); | |
| 35 | ||
| 36 | /** | |
| 37 | * This will update an existing {@link PropositionDefinition}. | |
| 38 | * | |
| 39 | * @param prop the proposition to update | |
| 40 | * @throws IllegalArgumentException if the proposition is null | |
| 41 | * @throws IllegalStateException if the proposition does not exist in the system | |
| 42 | */ | |
| 43 | void updateProposition(PropositionDefinition prop); | |
| 44 | ||
| 45 | /** | |
| 46 | * Lookup the proposition based on the given proposition id. | |
| 47 | * | |
| 48 | * @param propId the given proposition id | |
| 49 | * @return a proposition associated with the given proposition id. A null reference is returned if an invalid or | |
| 50 | * non-existent id is supplied. | |
| 51 | */ | |
| 52 | PropositionDefinition getPropositionById(String propId); | |
| 53 | ||
| 54 | ||
| 55 | ||
| 56 | /** | |
| 57 | * This will create a {@link PropositionParameter} exactly like the parameter passed in. | |
| 58 | * | |
| 59 | * @param parameter the proposition parameter to create | |
| 60 | * @throws IllegalArgumentException if the proposition parameter is null | |
| 61 | * @throws IllegalStateException if the proposition parameter is already existing in the system | |
| 62 | */ | |
| 63 | void createParameter(PropositionParameter parameter); | |
| 64 | ||
| 65 | /** | |
| 66 | * This will update a {@link PropositionParameter}. | |
| 67 | * | |
| 68 | * | |
| 69 | * @param parameter the proposition parameter to update | |
| 70 | * @throws IllegalArgumentException if the proposition parameter is null | |
| 71 | * @throws IllegalStateException if the proposition parameter does not exist in the system | |
| 72 | */ | |
| 73 | void updateParameter(PropositionParameter parameter); | |
| 74 | ||
| 75 | /** | |
| 76 | * Lookup the proposition parameters based on the given proposition id. | |
| 77 | * | |
| 78 | * @param id the given proposition id | |
| 79 | * @return a list of PropositionParameters associated with the given proposition id. A null reference is returned if an invalid or | |
| 80 | * non-existant id is supplied. | |
| 81 | */ | |
| 82 | List<PropositionParameter> getParameters(String propId); | |
| 83 | ||
| 84 | /** | |
| 85 | * Lookup the proposition parameter based on the id. | |
| 86 | * | |
| 87 | * @param id the given proposition id | |
| 88 | * @return an immutable PropositionParameters associated with the given id. A null reference is returned if an invalid or | |
| 89 | * non-existant id is supplied. | |
| 90 | */ | |
| 91 | PropositionParameter getParameterById(String id); | |
| 92 | ||
| 93 | /** | |
| 94 | * Lookup the proposition parameter based on the proposition id and sequence number. | |
| 95 | * | |
| 96 | * @param id the given proposition id | |
| 97 | * @return an immutable PropositionParameters associated with the given proposition id and sequence number. A null reference is returned if an invalid or | |
| 98 | * non-existant. | |
| 99 | */ | |
| 100 | PropositionParameter getParameterByPropIdAndSequenceNumber(String propId, Integer sequenceNumber); | |
| 101 | ||
| 102 | ||
| 103 | } |