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