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.purap.bo;
17:
18: import java.math.BigDecimal;
19:
20: import org.kuali.core.util.KualiDecimal;
21: import org.kuali.kfs.bo.AccountingLine;
22: import org.kuali.kfs.bo.SourceAccountingLine;
23:
24: /**
25: * Purap Accounting Line Interface.
26: */
27: public interface PurApAccountingLine extends AccountingLine {
28:
29: public abstract Integer getAccountIdentifier();
30:
31: public abstract void setAccountIdentifier(Integer accountIdentifier);
32:
33: public abstract Integer getItemIdentifier();
34:
35: public abstract void setItemIdentifier(Integer itemIdentifier);
36:
37: public abstract BigDecimal getAccountLinePercent();
38:
39: public abstract void setAccountLinePercent(
40: BigDecimal accountLinePercent);
41:
42: /**
43: * Determines if the current purap accounting line is in an empty state.
44: *
45: * @return boolean - true if empty state
46: */
47: public abstract boolean isEmpty();
48:
49: /**
50: * Creates a copy of the current purap accounting line and sets the percentage and the amount to zero.
51: *
52: * @return - purap accounting line copy with blank percent and amount
53: */
54: public abstract PurApAccountingLine createBlankAmountsCopy();
55:
56: /**
57: * Compares the current accounting line values with a source accounting line to see if both accounting lines are equal.
58: *
59: * @param accountingLine - accounting line to compare
60: * @return boolean - true if passed in and current accounting line are equal, false otherwise
61: */
62: public abstract boolean accountStringsAreEqual(
63: SourceAccountingLine accountingLine);
64:
65: /**
66: * Compares the current accounting line values with a purap accounting line to see if both accounting lines are equal.
67: *
68: * @param accountingLine - accounting line to compare
69: * @return boolean - true if passed in and current accounting line are equal, false otherwise
70: */
71: public abstract boolean accountStringsAreEqual(
72: PurApAccountingLine accountingLine);
73:
74: /**
75: * Creates a source accounting line from the current purap accounting line.
76: *
77: * @return - source accounting line based on current purap accounting line
78: */
79: public abstract SourceAccountingLine generateSourceAccountingLine();
80:
81: public KualiDecimal getAlternateAmountForGLEntryCreation();
82:
83: public void setAlternateAmountForGLEntryCreation(
84: KualiDecimal alternateAmountForGLEntryCreation);
85:
86: public String getString();
87:
88: }
|