001 /*
002 * Copyright 2005-2009 The Kuali Foundation
003 *
004 *
005 * Licensed under the Educational Community License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.opensource.org/licenses/ecl2.php
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package mocks;
018
019 import java.util.ArrayList;
020 import java.util.List;
021
022 /**
023 *
024 * @author Kuali Rice Team (rice.collab@kuali.org)
025 */
026 public class MockChartOrgService {
027
028 private static List<MockOrganization> orgs = new ArrayList<MockOrganization>();
029 static {
030 orgs.add(new MockOrganization("IU", "UNIV", "IU", "UNIV"));
031 orgs.add(new MockOrganization("BL", "BL", "IU", "UNIV"));
032 orgs.add(new MockOrganization("BL", "ARSC", "BL", "BL"));
033 orgs.add(new MockOrganization("BL", "CHEM", "BL", "ARSC"));
034 orgs.add(new MockOrganization("KO", "KO", "IU", "UNIV"));
035 orgs.add(new MockOrganization("IN", "IN", "IU", "UNIV"));
036 orgs.add(new MockOrganization("IN", "MED", "IU", "UNIV"));
037 }
038
039 public MockOrganization findOrganization(String chart, String org) {
040 for (MockOrganization organization : orgs) {
041 if (chart.equals(organization.getFinCoaCd()) && org.equals(organization.getOrgCd())) {
042 return organization;
043 }
044 }
045 return null;
046 }
047
048 }