| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| RuleRepositoryService | 
 | 
 | 1.0;1 | 
| 1 |  /** | |
| 2 |   * Copyright 2005-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 |  package org.kuali.rice.krms.api.repository; | |
| 17 | ||
| 18 |  import org.kuali.rice.krms.api.KrmsConstants; | |
| 19 |  import org.kuali.rice.krms.api.repository.agenda.AgendaTreeDefinition; | |
| 20 |  import org.kuali.rice.krms.api.repository.context.ContextDefinition; | |
| 21 |  import org.kuali.rice.krms.api.repository.context.ContextSelectionCriteria; | |
| 22 |  import org.kuali.rice.krms.api.repository.rule.RuleDefinition; | |
| 23 | ||
| 24 |  import javax.jws.WebMethod; | |
| 25 |  import javax.jws.WebParam; | |
| 26 |  import javax.jws.WebResult; | |
| 27 |  import javax.jws.WebService; | |
| 28 |  import javax.jws.soap.SOAPBinding; | |
| 29 |  import java.util.List; | |
| 30 | ||
| 31 |  /** | |
| 32 |   * The rule repository contains all of the information about context definitions, | |
| 33 |   * agendas, and business rules. | |
| 34 |   *  | |
| 35 |   * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 36 |   * | |
| 37 |   */ | |
| 38 |  @WebService(name = "ruleRepositoryService", targetNamespace = KrmsConstants.Namespaces.KRMS_NAMESPACE_2_0) | |
| 39 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
| 40 | public interface RuleRepositoryService { | |
| 41 | ||
| 42 |          /** | |
| 43 |           * Locates a ContextDefinition based on the given map of context qualifiers. | |
| 44 |           *  | |
| 45 |           * @param contextSelectionCriteria | |
| 46 |           * @return | |
| 47 |           */ | |
| 48 |          @WebMethod(operationName = "selectContext") | |
| 49 |          @WebResult(name = "contextDefinition") | |
| 50 | public ContextDefinition selectContext(@WebParam(name = "contextSelectionCriteria") ContextSelectionCriteria contextSelectionCriteria); | |
| 51 | ||
| 52 |          /** | |
| 53 |           * Retrieves the agenda tree for the given agendaId.  The agenda tree includes | |
| 54 |           * the entire agenda definition in the appropriate order and with the | |
| 55 |           * defined agenda branching. | |
| 56 |           *  | |
| 57 |           * @param agendaId the id of the agenda for which to retrieve the agenda tree | |
| 58 |           * @return the agenda tree, or null if no agenda could be located for the given agendaId | |
| 59 |           *  | |
| 60 |           * @throws IllegalArgumentException if the given agendaId is null | |
| 61 |           */ | |
| 62 |          @WebMethod(operationName = "getAgendaTree") | |
| 63 |          @WebResult(name = "agendaTree") | |
| 64 | public AgendaTreeDefinition getAgendaTree(@WebParam(name = "agendaId") String agendaId); | |
| 65 | ||
| 66 |          /** | |
| 67 |           * Retrieves all of the agendas trees for the given list of agendaIds.  The agenda tree includes | |
| 68 |           * the entire agenda definition in the appropriate order and with the | |
| 69 |           * defined agenda branching. | |
| 70 |           *  | |
| 71 |           * <p>The list which is returned from this operation may not be the same size as the list | |
| 72 |           * which is passed to this method.  If an agenda doesn't exist for a given agenda id then | |
| 73 |           * no result for that id will be returned in the list.  As a result of this, the returned | |
| 74 |           * list can be empty, but it will never be null. | |
| 75 |           *  | |
| 76 |           * @param agendaIds the list of agenda ids for which to retrieve the agenda trees | |
| 77 |           * @return the list of agenda trees for the given ids, this list will only contain agenda trees for the ids | |
| 78 |           * that were resolved successfully, it will never return null but could return an empty list if no agenda | |
| 79 |           * trees could be loaded for the given set of ids | |
| 80 |           *  | |
| 81 |           * @throws IllegalArgumentException if the given list of agendaIds is null | |
| 82 |           */ | |
| 83 |          @WebMethod(operationName = "getAgendaTrees") | |
| 84 |          @WebResult(name = "agendaTrees") | |
| 85 | public List<AgendaTreeDefinition> getAgendaTrees(@WebParam(name = "agendaIds") List<String> agendaIds); | |
| 86 | ||
| 87 |          /** | |
| 88 |           * Retrieves the rule for the given ruleId.  The rule includes the propositions | |
| 89 |           * which define the condition that is to be evaluated on the rule.  It also | |
| 90 |           * defines a collection of actions which will be invoked if the rule succeeds. | |
| 91 |           *  | |
| 92 |           * @param ruleId the id of the rule to retrieve | |
| 93 |           * @return the rule definition, or null if no rule could be located for the given ruleId | |
| 94 |           *  | |
| 95 |           * @throws IllegalArgumentException if the given ruleId is null | |
| 96 |           */ | |
| 97 |          @WebMethod(operationName = "getRule") | |
| 98 |          @WebResult(name = "rule") | |
| 99 | public RuleDefinition getRule(@WebParam(name = "ruleId") String ruleId); | |
| 100 | ||
| 101 |          /** | |
| 102 |           * Retrieves all of the rules for the given list of ruleIds.  The rule includes the propositions | |
| 103 |           * which define the condition that is to be evaluated on the rule.  It also | |
| 104 |           * defines a collection of actions which will be invoked if the rule succeeds. | |
| 105 |           *  | |
| 106 |           * <p>The list which is returned from this operation may not be the same size as the list | |
| 107 |           * which is passed to this method.  If a rule doesn't exist for a given rule id then | |
| 108 |           * no result for that id will be returned in the list.  As a result of this, the returned | |
| 109 |           * list can be empty, but it will never be null. | |
| 110 |           *  | |
| 111 |           * @param ruleIds the list of rule ids for which to retrieve the rules | |
| 112 |           * @return the list of rules for the given ids, this list will only contain rules for the ids | |
| 113 |           * that were resolved successfully, it will never return null but could return an empty list if no | |
| 114 |           * rules could be loaded for the given set of ids | |
| 115 |           *  | |
| 116 |           * @throws IllegalArgumentException if the given list of ruleIds is null | |
| 117 |           */ | |
| 118 |          @WebMethod(operationName = "getRules") | |
| 119 |          @WebResult(name = "rules") | |
| 120 | public List<RuleDefinition> getRules(@WebParam(name = "ruleIds") List<String> ruleIds); | |
| 121 | ||
| 122 | } |