01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.kfs.service;
17:
18: import java.util.Collection;
19:
20: import org.kuali.core.bo.KualiCode;
21:
22: /**
23: * This interface defines methods that an KualiCodeBase Service must provide
24: */
25: public interface KualiCodeService {
26:
27: /**
28: * @param className - the name of the object being used, either KualiCodeBase or a subclass
29: * @param code - code to search for
30: * @return KualiCodeBase Retrieves an KualiCodeBase object by a given code.
31: */
32: public KualiCode getByCode(Class queryClass, String code);
33:
34: public KualiCode getSystemCode(Class clazz, String code);
35:
36: /**
37: * @param className - the name of the object being used, either KualiCodeBase or a subclass
38: * @param name - name to search for
39: * @return KualiCodeBase Retrieves an KualiCodeBase object by a given exact name.
40: */
41: public KualiCode getByName(Class queryClass, String name);
42:
43: /**
44: * @param kualiCode - KualiCodeBase (or subclass) to be saved Pass the method a populated KualiCodeBase object, and it will be
45: * saved.
46: */
47: public void save(KualiCode kualiCode);
48:
49: /**
50: * This method retrieves all objects that extend KualiCodes by a class name.
51: *
52: * @param className
53: * @return
54: */
55: public Collection getAll(Class queryClass);
56: }
|