| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| FunctionBoService |
|
| 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.impl.repository; | |
| 17 | ||
| 18 | import org.kuali.rice.krms.api.repository.function.FunctionDefinition; | |
| 19 | ||
| 20 | /** | |
| 21 | * This is the interface for accessing KRMS repository Function related bos | |
| 22 | * | |
| 23 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 24 | * | |
| 25 | */ | |
| 26 | ||
| 27 | public interface FunctionBoService { | |
| 28 | ||
| 29 | /** | |
| 30 | * This will create a {@link FunctionDefinition} exactly like the function passed in. | |
| 31 | * | |
| 32 | * @param function The Function to create | |
| 33 | * @throws IllegalArgumentException if the function is null | |
| 34 | * @throws IllegalStateException if the function already exists in the system | |
| 35 | */ | |
| 36 | public FunctionDefinition createFunction(FunctionDefinition function); | |
| 37 | ||
| 38 | /** | |
| 39 | * This will update an existing {@link FunctionDefinition}. | |
| 40 | * | |
| 41 | * @param function The Function to update | |
| 42 | * @throws IllegalArgumentException if the function is null | |
| 43 | * @throws IllegalStateException if the function does not exist in the system | |
| 44 | */ | |
| 45 | public void updateFunction(FunctionDefinition function); | |
| 46 | ||
| 47 | /** | |
| 48 | * Retrieves a Function from the repository based on the given function id. | |
| 49 | * | |
| 50 | * @param functionId the id of the Function to retrieve | |
| 51 | * @return a {@link FunctionDefinition} identified by the given functionId. | |
| 52 | * A null reference is returned if an invalid or non-existent functionId is supplied. | |
| 53 | */ | |
| 54 | public FunctionDefinition getFunctionById(String functionId); | |
| 55 | ||
| 56 | /** | |
| 57 | * Retrieves a Function from the repository based on the provided function name | |
| 58 | * and namespace. | |
| 59 | * | |
| 60 | * @param name the name of the Function to retrieve. | |
| 61 | * @param namespace the namespace that the Function is under. | |
| 62 | * @return a {@link FunctionDefinition} identified by the given name and namespace. | |
| 63 | * A null reference is returned if an invalid or non-existent function name and | |
| 64 | * namespace combination is supplied. | |
| 65 | */ | |
| 66 | public FunctionDefinition getFunctionByNameAndNamespace(String name, String namespace); | |
| 67 | ||
| 68 | } |