01: /*
02: * Copyright 2005-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.module.chart.service;
17:
18: import java.util.List;
19:
20: import org.kuali.module.chart.bo.Org;
21:
22: /**
23: * This interface defines methods that an Org Service must provide.
24: */
25: public interface OrganizationService {
26:
27: /**
28: * This method retrieves an organization instance by its composite primary keys (parameters passed in).
29: *
30: * @param chartOfAccountsCode
31: * @param organizationCode
32: * @return An Org instance.
33: */
34: public Org getByPrimaryId(String chartOfAccountsCode,
35: String organizationCode);
36:
37: /**
38: * Method is used by KualiOrgReviewAttribute to enable caching of orgs for routing.
39: *
40: * @see org.kuali.module.chart.service.OrganizationService#getByPrimaryId(java.lang.String, java.lang.String)
41: */
42: public Org getByPrimaryIdWithCaching(String chartOfAccountsCode,
43: String organizationCode);
44:
45: /**
46: * Saves an Org object instance.
47: *
48: * @param organization
49: */
50: public void save(Org organization);
51:
52: /**
53: * Retrieves a List of Accounts that are active, and are tied to this Org. If there are no Accounts that meet this criteria, an
54: * empty list will be returned.
55: *
56: * @param chartOfAccountsCode - chartCode for the Org you want Accounts for
57: * @param organizationCode - orgCode for the Org you want Accounts for
58: * @return A List of Accounts that are active, and tied to this Org
59: */
60: public List getActiveAccountsByOrg(String chartOfAccountsCode,
61: String organizationCode);
62:
63: /**
64: * Retrieves a List of Orgs that are active, and that ReportTo this Org If there are no Orgs that meet this criteria, an empty
65: * list will be returned.
66: *
67: * @param chartOfAccountsCode - chartCode for the Org you want Child Orgs for
68: * @param organizationCode - orgCode for the Org you want Child Orgs for
69: * @return A List of Orgs that are active, and report to this Org
70: */
71: public List getActiveChildOrgs(String chartOfAccountsCode,
72: String organizationCode);
73:
74: /**
75: * Returns a list of active organizations with the given organization type code.
76: *
77: * @param organizationTypeCode
78: * @return
79: */
80: public List<Org> getActiveOrgsByType(String organizationTypeCode);
81:
82: /**
83: * returns the chart and organization of the ACTIVE root-level organization
84: */
85: public String[] getRootOrganizationCode();
86: }
|