View Javadoc
1   /*
2    * Copyright 2008 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
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.ole.integration.cab;
17  
18  import java.util.List;
19  
20  import org.kuali.ole.fp.businessobject.CapitalAssetInformation;
21  import org.kuali.ole.integration.purap.ExternalPurApItem;
22  import org.kuali.ole.integration.purap.ItemCapitalAsset;
23  import org.kuali.ole.sys.businessobject.AccountingLine;
24  import org.kuali.ole.sys.document.AccountingDocument;
25  import org.kuali.ole.sys.document.OLEAccountingDocument;
26  import org.kuali.rice.krad.bo.DocumentHeader;
27  
28  public interface CapitalAssetBuilderModuleService {
29      /**
30       * Check the existence of asset type code
31       * 
32       * @param assetTypeCode
33       * @return
34       */
35      public boolean isAssetTypeExisting(String assetTypeCode);
36      /**
37       * Get current Purchase Order Document number for given CAMS Document Number
38       * 
39       * @param camsDocumentNumber
40       * @return
41       */
42      String getCurrentPurchaseOrderDocumentNumber(String camsDocumentNumber);
43  
44      /**
45       * validate the capitalAssetManagementAsset data associated with the given accounting document
46       * 
47       * @param accountingDocument the given accounting document
48       * @param capitalAssetManagementAsset data to be validated
49       * @return validation succeeded or errors present
50       */
51      public boolean validateFinancialProcessingData(AccountingDocument accountingDocument, CapitalAssetInformation capitalAssetInformation, int index);
52  
53  
54      public boolean validatePurchasingData(AccountingDocument accountingDocument);
55  
56      public boolean validatePurchasingData(OLEAccountingDocument accountingDocument);
57  
58      public boolean validateAccountsPayableData(AccountingDocument accountingDocument);
59  
60      public boolean doesAccountingLineFailAutomaticPurchaseOrderRules(AccountingLine accountingLine);
61  
62      public boolean doesDocumentFailAutomaticPurchaseOrderRules(AccountingDocument accountingDocument);
63  
64      public boolean doesDocumentFailAutomaticPurchaseOrderRules(OLEAccountingDocument accountingDocument);
65  
66      public boolean doesItemNeedCapitalAsset(String itemTypeCode, List accountingLines);
67  
68      public boolean validateUpdateCAMSView(AccountingDocument accountingDocumen);
69      public boolean validateUpdateCAMSView(OLEAccountingDocument accountingDocumen);
70  
71      public boolean validateAddItemCapitalAssetBusinessRules(ItemCapitalAsset asset);
72  
73      public boolean warningObjectLevelCapital(AccountingDocument accountingDocument);
74  
75      public boolean validateItemCapitalAssetWithErrors(String recurringPaymentTypeCode, ExternalPurApItem item, boolean apoCheck);
76  
77      public List<CapitalAssetBuilderAssetTransactionType> getAllAssetTransactionTypes();
78  
79      /**
80       * External modules can notify CAB if a document changed its route status. CAB Uses this notification to release records or to
81       * update other modules about the changes
82       * 
83       * @param documentHeader DocumentHeader
84       */
85      public void notifyRouteStatusChange(DocumentHeader documentHeader);
86  
87  
88      /**
89       * determine whether there is any object code of the given source accounting lines with a capital asset object sub type
90       * 
91       * @param accountingLines the given source accounting lines
92       * @return true if there is at least one object code of the given source accounting lines with a capital asset object sub type;
93       *         otherwise, false
94       */
95      public boolean hasCapitalAssetObjectSubType(AccountingDocument accountingDocument);
96      
97      public boolean validateAllFieldRequirementsByChart(AccountingDocument accountingDocument);
98  
99      public boolean validateAllFieldRequirementsByChart(OLEAccountingDocument accountingDocument);
100 
101     public boolean validatePurchasingObjectSubType(AccountingDocument accountingDocument);
102 
103     public boolean validatePurchasingObjectSubType(OLEAccountingDocument accountingDocument);
104 
105     public boolean hasCapitalAssetObjectSubType(AccountingLine accountingLine);
106     
107     public boolean validateAssetTags(AccountingDocument accountingDocument);
108     
109     /**
110      * validates all capital accounting lines that have been processed.
111      * 
112      * @param accountingDocumentForValidation
113      * @return true if all lines have been processes else return false
114      */
115     public boolean validateAllCapitalAccountingLinesProcessed(AccountingDocument accountingDocumentForValidation);    
116     
117     /**
118      * determine whether the given document's all capital accounting lines totals
119      * match to that of capital assets.
120      * @param accountingDocumentForValidation
121      * @return true if totals match else return false
122      */
123     public boolean validateTotalAmountMatch(AccountingDocument accountingDocumentForValidation);
124     
125     /**
126      * determine whether the any capital accounting line's amount matches
127      * with all the capital assets for that capital accounting line.
128      * 
129      * @param accountingDocument
130      * @return true if totals match else return false
131      */
132     public boolean validateCapitlAssetsAmountToAccountingLineAmount(AccountingDocument accountingDocument);
133     
134     /**
135      * validates whether capital assets exist for any given capital accounting line.
136      * @param accountingDocumentForValidation
137      * @return true if capital assets exist for capital accounting line else return false.
138      */
139     public boolean validateCapitalAccountingLines(AccountingDocument accountingDocumentForValidation);    
140     
141     /**
142      * mark the gl entry line if all the capital asset lines have been processed
143      * @param documentNumber
144      * @return true if gl entry line marked as processed else return false.
145      */
146     public boolean markProcessedGLEntryLine(String documentNumber);   
147 }