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.module.gl.service.impl;
17:
18: import org.kuali.module.gl.service.ScrubberProcessObjectCodeOverride;
19:
20: /**
21: * The default implementation of ScrubberProcessObjectCodeOverride
22: */
23: public class ScrubberProcessObjectCodeOverrideImpl implements
24: ScrubberProcessObjectCodeOverride {
25:
26: /**
27: * Potentially overrides the object code for origin entries the scrubber generates
28: *
29: * @param originEntryObjectLevelCode the current level code of the object code that could potentially be overriden
30: * @param originEntryObjectCode current originEntryObjectCode
31: * @return the overriden object code, or the same object code if overriding wasn't necessary
32: * @see org.kuali.module.gl.service.ScrubberProcessObjectCodeOverride#getOriginEntryObjectCode(java.lang.String, java.lang.String)
33: */
34: public String getOriginEntryObjectCode(
35: String originEntryObjectLevelCode,
36: String originEntryObjectCode) {
37: boolean done = false;
38:
39: // IU Specific Rules
40: if ((!done)
41: && ("BENF".equals(originEntryObjectLevelCode) && ("9956"
42: .equals(originEntryObjectCode) || 5700 > Integer
43: .valueOf(originEntryObjectCode).intValue()))) { // BENEFITS
44: originEntryObjectCode = "9956"; // TRSFRS_OF_FUNDS_FRINGE_BENF
45: done = true;
46: }
47:
48: if ((!done)
49: && ("FINA".equals(originEntryObjectLevelCode) && ("9954"
50: .equals(originEntryObjectCode) || "5400"
51: .equals(originEntryObjectCode)))) {
52: // STUDENT_FINANCIAL_AID - TRSFRS_OF_FUNDS_FEE_REM - GRADUATE_FEE_REMISSIONS
53: originEntryObjectCode = "9954"; // TRSFRS_OF_FUNDS_CAPITAL
54: done = true;
55: }
56:
57: return originEntryObjectCode;
58: }
59: }
|