Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
FunctionRepositoryService |
|
| 1.0;1 |
1 | package org.kuali.rice.krms.api.repository.function; | |
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.RepositoryConstants; | |
12 | ||
13 | /** | |
14 | * The function repository contains information about custom functions which | |
15 | * can be used on propositions that are defined when constructing rules. | |
16 | * | |
17 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
18 | * | |
19 | */ | |
20 | @WebService(name = "functionRepositoryService", targetNamespace = RepositoryConstants.Namespaces.REPOSITORY_NAMESPACE_2_0) | |
21 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
22 | public interface FunctionRepositoryService { | |
23 | ||
24 | /** | |
25 | * Retrieves the function for the given functionId. The function can be used when | |
26 | * constructing propositions and defines the type of the parameters to the function | |
27 | * as well as it's return type. | |
28 | * | |
29 | * @param functionId the id of the function to retrieve | |
30 | * @return the function definition, or null if no function could be located for the given functionId | |
31 | * | |
32 | * @throws IllegalArgumentException if the given functionId is null | |
33 | */ | |
34 | @WebMethod(operationName = "getFunction") | |
35 | @WebResult(name = "function") | |
36 | public FunctionDefinition getFunction(@WebParam(name = "functionId") String functionId); | |
37 | ||
38 | /** | |
39 | * Retrieves all of the functions for the given list of functionIds. The | |
40 | * function can be used when constructing propositions and defines the type | |
41 | * of the parameters to the function as well as it's return type. | |
42 | * | |
43 | * <p>The list which is returned from this operation may not be the same size as the list | |
44 | * which is passed to this method. If a function doesn't exist for a given function id then | |
45 | * no result for that id will be returned in the list. As a result of this, the returned | |
46 | * list can be empty, but it will never be null. | |
47 | * | |
48 | * @param functionIds the list of function ids for which to retrieve the functions | |
49 | * @return the list of functions for the given ids, this list will only contain functions for the ids | |
50 | * that were resolved successfully, it will never return null but could return an empty list if no | |
51 | * functions could be loaded for the given set of ids | |
52 | * | |
53 | * @throws IllegalArgumentException if the given list of functionIds is null | |
54 | */ | |
55 | @WebMethod(operationName = "getFunctions") | |
56 | @WebResult(name = "functions") | |
57 | public List<FunctionDefinition> getFunctions(@WebParam(name = "functionIds") List<String> functionIds); | |
58 | ||
59 | } |