001    /*
002     * Copyright 2011 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     */
016    package org.kuali.kfs.integration.cab;
017    
018    import java.util.List;
019    
020    import org.kuali.kfs.fp.businessobject.CapitalAssetInformation;
021    import org.kuali.kfs.integration.purap.ExternalPurApItem;
022    import org.kuali.kfs.integration.purap.ItemCapitalAsset;
023    import org.kuali.kfs.sys.businessobject.AccountingLine;
024    import org.kuali.kfs.sys.document.AccountingDocument;
025    import org.kuali.rice.kns.bo.DocumentHeader;
026    
027    public 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);
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    }