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.module.cam.batch.service;
017    
018    import java.io.File;
019    
020    import org.kuali.kfs.module.cam.businessobject.BarcodeInventoryErrorDetail;
021    import org.kuali.kfs.module.cam.document.BarcodeInventoryErrorDocument;
022    import org.kuali.kfs.module.cam.document.web.struts.AssetBarCodeInventoryInputFileForm;
023    import org.kuali.rice.kns.document.Document;
024    
025    /**
026     * This service interface defines the methods that a ProcurementCardLoadTransactionsService implementation must provide. Provides
027     * methods to load batch files for the procurement card batch job.
028     */
029    public interface AssetBarcodeInventoryLoadService {
030        /**
031         * Validates and parses the file identified by the given files name. If successful, parsed entries are stored.
032         * 
033         * @param fileName Name of file to be uploaded and processed.
034         * @return True if the file load and store was successful, false otherwise.
035         */
036        public boolean isFileFormatValid(File file);
037    
038        /**
039         * This method creates the barcode inventory error document, validates each record, and invokes the method that actually stores
040         * the record in the tables
041         * 
042         * @param file
043         * @return
044         */
045        public boolean processFile(File file, AssetBarCodeInventoryInputFileForm form);
046    
047    
048        /**
049         * This method updates the asset table
050         * 
051         * @param barcodeInventoryErrorDetail
052         */
053        public void updateAssetInformation(BarcodeInventoryErrorDetail barcodeInventoryErrorDetail, boolean updateWithDateAssetWasScanned);
054    
055        /**
056         * Determines whether or not the BCIE document has all its records corrected or deleted
057         * 
058         * @param document
059         * @return
060         */
061        boolean isFullyProcessed(Document document);
062    
063        /**
064         * Determines whether the current user is the document initiator. This method...
065         * 
066         * @param document
067         * @return
068         */
069        boolean isCurrentUserInitiator(Document document);
070    }