001/* 002 * Copyright 2008 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.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/ecl2.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 */ 016package org.kuali.ole.integration.cab; 017 018import java.util.List; 019 020import org.kuali.ole.fp.businessobject.CapitalAssetInformation; 021import org.kuali.ole.integration.purap.ExternalPurApItem; 022import org.kuali.ole.integration.purap.ItemCapitalAsset; 023import org.kuali.ole.sys.businessobject.AccountingLine; 024import org.kuali.ole.sys.document.AccountingDocument; 025import org.kuali.rice.krad.bo.DocumentHeader; 026 027public interface CapitalAssetBuilderModuleService { 028 /** 029 * Check the existence of asset type code 030 * 031 * @param assetTypeCode 032 * @return 033 */ 034 public boolean isAssetTypeExisting(String assetTypeCode); 035 /** 036 * Get current Purchase Order Document number for given CAMS Document Number 037 * 038 * @param camsDocumentNumber 039 * @return 040 */ 041 String getCurrentPurchaseOrderDocumentNumber(String camsDocumentNumber); 042 043 /** 044 * validate the capitalAssetManagementAsset data associated with the given accounting document 045 * 046 * @param accountingDocument the given accounting document 047 * @param capitalAssetManagementAsset data to be validated 048 * @return validation succeeded or errors present 049 */ 050 public boolean validateFinancialProcessingData(AccountingDocument accountingDocument, CapitalAssetInformation capitalAssetInformation, int index); 051 052 053 public boolean validatePurchasingData(AccountingDocument accountingDocument); 054 055 public boolean validateAccountsPayableData(AccountingDocument accountingDocument); 056 057 public boolean doesAccountingLineFailAutomaticPurchaseOrderRules(AccountingLine accountingLine); 058 059 public boolean doesDocumentFailAutomaticPurchaseOrderRules(AccountingDocument accountingDocument); 060 061 public boolean doesItemNeedCapitalAsset(String itemTypeCode, List accountingLines); 062 063 public boolean validateUpdateCAMSView(AccountingDocument accountingDocumen); 064 065 public boolean validateAddItemCapitalAssetBusinessRules(ItemCapitalAsset asset); 066 067 public boolean warningObjectLevelCapital(AccountingDocument accountingDocument); 068 069 public boolean validateItemCapitalAssetWithErrors(String recurringPaymentTypeCode, ExternalPurApItem item, boolean apoCheck); 070 071 public List<CapitalAssetBuilderAssetTransactionType> getAllAssetTransactionTypes(); 072 073 /** 074 * External modules can notify CAB if a document changed its route status. CAB Uses this notification to release records or to 075 * update other modules about the changes 076 * 077 * @param documentHeader DocumentHeader 078 */ 079 public void notifyRouteStatusChange(DocumentHeader documentHeader); 080 081 082 /** 083 * determine whether there is any object code of the given source accounting lines with a capital asset object sub type 084 * 085 * @param accountingLines the given source accounting lines 086 * @return true if there is at least one object code of the given source accounting lines with a capital asset object sub type; 087 * otherwise, false 088 */ 089 public boolean hasCapitalAssetObjectSubType(AccountingDocument accountingDocument); 090 091 public boolean validateAllFieldRequirementsByChart(AccountingDocument accountingDocument); 092 093 public boolean validatePurchasingObjectSubType(AccountingDocument accountingDocument); 094 095 public boolean hasCapitalAssetObjectSubType(AccountingLine accountingLine); 096 097 public boolean validateAssetTags(AccountingDocument accountingDocument); 098 099 /** 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}