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.rice.krad.bo.DocumentHeader;
26  
27  public interface CapitalAssetBuilderModuleService {
28      /**
29       * Check the existence of asset type code
30       * 
31       * @param assetTypeCode
32       * @return
33       */
34      public boolean isAssetTypeExisting(String assetTypeCode);
35      /**
36       * Get current Purchase Order Document number for given CAMS Document Number
37       * 
38       * @param camsDocumentNumber
39       * @return
40       */
41      String getCurrentPurchaseOrderDocumentNumber(String camsDocumentNumber);
42  
43      /**
44       * validate the capitalAssetManagementAsset data associated with the given accounting document
45       * 
46       * @param accountingDocument the given accounting document
47       * @param capitalAssetManagementAsset data to be validated
48       * @return validation succeeded or errors present
49       */
50      public boolean validateFinancialProcessingData(AccountingDocument accountingDocument, CapitalAssetInformation capitalAssetInformation, int index);
51  
52  
53      public boolean validatePurchasingData(AccountingDocument accountingDocument);
54  
55      public boolean validateAccountsPayableData(AccountingDocument accountingDocument);
56  
57      public boolean doesAccountingLineFailAutomaticPurchaseOrderRules(AccountingLine accountingLine);
58  
59      public boolean doesDocumentFailAutomaticPurchaseOrderRules(AccountingDocument accountingDocument);
60  
61      public boolean doesItemNeedCapitalAsset(String itemTypeCode, List accountingLines);
62  
63      public boolean validateUpdateCAMSView(AccountingDocument accountingDocumen);
64  
65      public boolean validateAddItemCapitalAssetBusinessRules(ItemCapitalAsset asset);
66  
67      public boolean warningObjectLevelCapital(AccountingDocument accountingDocument);
68  
69      public boolean validateItemCapitalAssetWithErrors(String recurringPaymentTypeCode, ExternalPurApItem item, boolean apoCheck);
70  
71      public List<CapitalAssetBuilderAssetTransactionType> getAllAssetTransactionTypes();
72  
73      /**
74       * External modules can notify CAB if a document changed its route status. CAB Uses this notification to release records or to
75       * update other modules about the changes
76       * 
77       * @param documentHeader DocumentHeader
78       */
79      public void notifyRouteStatusChange(DocumentHeader documentHeader);
80  
81  
82      /**
83       * determine whether there is any object code of the given source accounting lines with a capital asset object sub type
84       * 
85       * @param accountingLines the given source accounting lines
86       * @return true if there is at least one object code of the given source accounting lines with a capital asset object sub type;
87       *         otherwise, false
88       */
89      public boolean hasCapitalAssetObjectSubType(AccountingDocument accountingDocument);
90      
91      public boolean validateAllFieldRequirementsByChart(AccountingDocument accountingDocument);
92      
93      public boolean validatePurchasingObjectSubType(AccountingDocument accountingDocument);
94  
95      public boolean hasCapitalAssetObjectSubType(AccountingLine accountingLine);
96      
97      public boolean validateAssetTags(AccountingDocument accountingDocument);
98      
99      /**
100      * validates all capital accounting lines that have been processed.
101      * 
102      * @param accountingDocumentForValidation
103      * @return true if all lines have been processes else return false
104      */
105     public boolean validateAllCapitalAccountingLinesProcessed(AccountingDocument accountingDocumentForValidation);    
106     
107     /**
108      * determine whether the given document's all capital accounting lines totals
109      * match to that of capital assets.
110      * @param accountingDocumentForValidation
111      * @return true if totals match else return false
112      */
113     public boolean validateTotalAmountMatch(AccountingDocument accountingDocumentForValidation);
114     
115     /**
116      * determine whether the any capital accounting line's amount matches
117      * with all the capital assets for that capital accounting line.
118      * 
119      * @param accountingDocument
120      * @return true if totals match else return false
121      */
122     public boolean validateCapitlAssetsAmountToAccountingLineAmount(AccountingDocument accountingDocument);
123     
124     /**
125      * validates whether capital assets exist for any given capital accounting line.
126      * @param accountingDocumentForValidation
127      * @return true if capital assets exist for capital accounting line else return false.
128      */
129     public boolean validateCapitalAccountingLines(AccountingDocument accountingDocumentForValidation);    
130     
131     /**
132      * mark the gl entry line if all the capital asset lines have been processed
133      * @param documentNumber
134      * @return true if gl entry line marked as processed else return false.
135      */
136     public boolean markProcessedGLEntryLine(String documentNumber);   
137 }