001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.kuali.kfs.document;
017:
018: import java.util.List;
019:
020: import org.kuali.core.util.KualiDecimal;
021: import org.kuali.kfs.bo.AccountingLineParser;
022: import org.kuali.kfs.bo.SourceAccountingLine;
023: import org.kuali.kfs.bo.TargetAccountingLine;
024:
025: /**
026: * This is the FinancialDocument interface. The TransactionalDocument interface should extend this. It represents any document that
027: * exists within the Financial Transactions module, but isn't transactional (i.e. no accounting lines). This interface was put in
028: * place to facilitate the CashManagementDocument which is a Financial Transaction module document, but doesn't have accounting
029: * lines.
030: */
031: public interface AccountingDocument extends
032: GeneralLedgerPostingDocument {
033: /**
034: * This method is used to return the title that a transactional document should give to it's source accounting line section.
035: *
036: * @return The source accounting line section's title.
037: */
038: public String getSourceAccountingLinesSectionTitle();
039:
040: /**
041: * This method is used to return the title that a transactional document should give to it's source accounting line section.
042: *
043: * @return The target accounting line section's title.
044: */
045: public String getTargetAccountingLinesSectionTitle();
046:
047: /**
048: * Sums up the amounts of all of the target accounting lines.
049: */
050: public KualiDecimal getTargetTotal();
051:
052: /**
053: * Sums up the amounts of all of the source accounting lines.
054: */
055: public KualiDecimal getSourceTotal();
056:
057: /**
058: * @return AccountingLineParser instance appropriate for importing AccountingLines for this document type
059: */
060: public AccountingLineParser getAccountingLineParser();
061:
062: /*
063: * @return Class of the document's source accounting lines
064: */
065: public Class getSourceAccountingLineClass();
066:
067: /*
068: * @return Class of the document's target accounting lines
069: */
070: public Class getTargetAccountingLineClass();
071:
072: /*
073: * @return Name of the document's source accounting lines
074: */
075: public String getSourceAccountingLineEntryName();
076:
077: /*
078: * @return Name of the document's target accounting lines
079: */
080: public String getTargetAccountingLineEntryName();
081:
082: /**
083: * Retrieves the next line sequence number for an accounting line in the Source accounting line section on a transactional
084: * document.
085: *
086: * @return The next available source line number.
087: */
088: public Integer getNextSourceLineNumber();
089:
090: /**
091: * @param nextLineNumber
092: */
093: public void setNextSourceLineNumber(Integer nextLineNumber);
094:
095: /**
096: * Retrieves the next line sequence number for an accounting line in the Target accounting line section on a transactional
097: * document.
098: *
099: * @return The next available target line number.
100: */
101: public Integer getNextTargetLineNumber();
102:
103: /**
104: * @param nextLineNumber
105: */
106: public void setNextTargetLineNumber(Integer nextLineNumber);
107:
108: /**
109: * This method adds a source accounting line.
110: *
111: * @param line
112: */
113: public void addSourceAccountingLine(SourceAccountingLine line);
114:
115: /**
116: * This method returns a list of target accounting lines.
117: *
118: * @return The list of source accounting lines.
119: */
120: public List getSourceAccountingLines();
121:
122: /**
123: * This method returns the accounting line at a particular spot in the overall list of accounting lines.
124: *
125: * @param index
126: * @return The source accounting line at the specified index.
127: */
128: public SourceAccountingLine getSourceAccountingLine(int index);
129:
130: /**
131: * This method sets the list of source accounting lines for this document.
132: *
133: * @param sourceLines
134: */
135: public void setSourceAccountingLines(List sourceLines);
136:
137: /**
138: * This method adds a target accounting line to the document.
139: *
140: * @param line
141: */
142: public void addTargetAccountingLine(TargetAccountingLine line);
143:
144: /**
145: * This method retrieves all of the target accounting lines associated with this document.
146: */
147: public List getTargetAccountingLines();
148:
149: /**
150: * This method retrieves the target accounting line at the specified index.
151: *
152: * @param index
153: * @return The target accounting line at the passed in index.
154: */
155: public TargetAccountingLine getTargetAccountingLine(int index);
156:
157: /**
158: * This method sets the list of target accounting lines for this document.
159: *
160: * @param targetLines
161: */
162: public void setTargetAccountingLines(List targetLines);
163:
164: }
|