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