001: /*
002: * Copyright 2006-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.module.purap.document;
017:
018: import java.util.List;
019:
020: import org.kuali.core.util.KualiDecimal;
021: import org.kuali.kfs.bo.Country;
022: import org.kuali.kfs.document.AccountingDocument;
023: import org.kuali.module.purap.PurapWorkflowConstants.NodeDetails;
024: import org.kuali.module.purap.bo.CreditMemoView;
025: import org.kuali.module.purap.bo.PaymentRequestView;
026: import org.kuali.module.purap.bo.PurApItem;
027: import org.kuali.module.purap.bo.PurchaseOrderView;
028: import org.kuali.module.purap.bo.RequisitionView;
029: import org.kuali.module.purap.bo.Status;
030: import org.kuali.module.vendor.bo.VendorAddress;
031: import org.kuali.module.vendor.bo.VendorDetail;
032:
033: /**
034: * Interface for Purchasing-Accounts Payable Documents.
035: */
036: public interface PurchasingAccountsPayableDocument extends
037: AccountingDocument {
038:
039: /**
040: * Returns the Item Class.
041: *
042: * @return the Item Class.
043: */
044: public Class getItemClass();
045:
046: /**
047: * Returns the source of this Purchasing Accounts Payable Document if exists.
048: *
049: * @return the source of this document if exists, else null.
050: */
051: public PurchasingAccountsPayableDocument getPurApSourceDocumentIfPossible();
052:
053: /**
054: * Returns the label of the source of this Purchasing Accounts Payable Document if exists.
055: *
056: * @return the label of the document source if exists, else null.
057: */
058: public String getPurApSourceDocumentLabelIfPossible();
059:
060: /**
061: * Returns true if this document is stopped in the specified route node.
062: *
063: * @param nodeDetails the node details of the specified node.
064: * @return true if this document is stopped in the specified route node.
065: */
066: public boolean isDocumentStoppedInRouteNode(NodeDetails nodeDetails);
067:
068: /**
069: * Adds the specified item to this document.
070: *
071: * @param item the specified item to add.
072: */
073: public void addItem(PurApItem item);
074:
075: /**
076: * Deletes the specified item from this document.
077: *
078: * @param item the specified item to delete.
079: */
080: public void deleteItem(int lineNum);
081:
082: /**
083: * Renumbers the item starting from the specified index.
084: *
085: * @param start the index of the starting item to be renumbered.
086: */
087: public void renumberItems(int start);
088:
089: /**
090: * Swaps the specified two items based on their item line numbers (which are one higher than the item positions in the list).
091: *
092: * @param position1 the position of the first item
093: * @param position2 the position of the second item
094: */
095: public void itemSwap(int position1, int position2);
096:
097: /**
098: * Determines the item line position if the user did not specify the line number on an above the line items before clicking on
099: * the add button. It subtracts the number of the below the line items on the list with the total item list size.
100: *
101: * @return the item line position of the last (highest) line number of above the line items.
102: */
103: public int getItemLinePosition();
104:
105: /**
106: * Gets the item at the specified index.
107: *
108: * @param pos the specified index.
109: * @return the item at the specified index.
110: */
111: public PurApItem getItem(int pos);
112:
113: /**
114: * Gets all below the line item types.
115: *
116: * @return Returns a list of below the line item types.
117: */
118: public String[] getBelowTheLineTypes();
119:
120: /**
121: * Computes the total dollar amount of all items.
122: *
123: * @return the total dollar amount of all items.
124: */
125: public KualiDecimal getTotalDollarAmount();
126:
127: /**
128: * Sets the total dollar amount to the specified amount.
129: *
130: * @param the specified total amount.
131: */
132: public void setTotalDollarAmount(KualiDecimal totalDollarAmount);
133:
134: /**
135: * Computes the total dollar amount with the specified item types excluded.
136: *
137: * @param excludedTypes the types of items to be excluded.
138: * @return the total dollar amount with the specified item types excluded.
139: */
140: public KualiDecimal getTotalDollarAmountAllItems(
141: String[] excludedTypes);
142:
143: /**
144: * Sets vendor address fields based on a given VendorAddress.
145: *
146: * @param vendorAddress
147: */
148: public void templateVendorAddress(VendorAddress vendorAddress);
149:
150: /**
151: * Gets the related Requisition Views for this document.
152: *
153: * @return the list of related Requisition Views.
154: */
155: public List<RequisitionView> getRelatedRequisitionViews();
156:
157: /**
158: * Gets the related Purchase Order Views for this document.
159: *
160: * @return the list of related Purchase Order Views.
161: */
162: public List<PurchaseOrderView> getRelatedPurchaseOrderViews();
163:
164: /**
165: * Gets the related Payment Request Views for this document.
166: *
167: * @return the list of related Payment Request Views.
168: */
169: public List<PaymentRequestView> getRelatedPaymentRequestViews();
170:
171: /**
172: * Gets the related Credit Memo Views for this document.
173: *
174: * @return the list of related Credit Memo Views.
175: */
176: public List<CreditMemoView> getRelatedCreditMemoViews();
177:
178: public Country getVendorCountry();
179:
180: public Status getStatus();
181:
182: public VendorDetail getVendorDetail();
183:
184: public List<PurApItem> getItems();
185:
186: public void setItems(List items);
187:
188: public String getVendorNumber();
189:
190: public void setVendorNumber(String vendorNumber);
191:
192: public Integer getVendorHeaderGeneratedIdentifier();
193:
194: public void setVendorHeaderGeneratedIdentifier(
195: Integer vendorHeaderGeneratedIdentifier);
196:
197: public Integer getVendorDetailAssignedIdentifier();
198:
199: public void setVendorDetailAssignedIdentifier(
200: Integer vendorDetailAssignedIdentifier);
201:
202: public String getVendorCustomerNumber();
203:
204: public void setVendorCustomerNumber(String vendorCustomerNumber);
205:
206: public Integer getPurapDocumentIdentifier();
207:
208: public void setPurapDocumentIdentifier(Integer identifier);
209:
210: public String getStatusCode();
211:
212: public void setStatusCode(String statusCode);
213:
214: public String getVendorCityName();
215:
216: public void setVendorCityName(String vendorCityName);
217:
218: public String getVendorCountryCode();
219:
220: public void setVendorCountryCode(String vendorCountryCode);
221:
222: public String getVendorLine1Address();
223:
224: public void setVendorLine1Address(String vendorLine1Address);
225:
226: public String getVendorLine2Address();
227:
228: public void setVendorLine2Address(String vendorLine2Address);
229:
230: public String getVendorName();
231:
232: public void setVendorName(String vendorName);
233:
234: public String getVendorPostalCode();
235:
236: public void setVendorPostalCode(String vendorPostalCode);
237:
238: public String getVendorStateCode();
239:
240: public void setVendorStateCode(String vendorStateCode);
241:
242: public Integer getAccountsPayablePurchasingDocumentLinkIdentifier();
243:
244: public void setAccountsPayablePurchasingDocumentLinkIdentifier(
245: Integer accountsPayablePurchasingDocumentLinkIdentifier);
246:
247: public Integer getVendorAddressGeneratedIdentifier();
248:
249: public void setVendorAddressGeneratedIdentifier(
250: Integer vendorAddressGeneratedIdentifier);
251: }
|