org.kuali.kfs.module.cam.batch.service.impl
Class AssetBarcodeInventoryLoadServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.cam.batch.service.impl.AssetBarcodeInventoryLoadServiceImpl
All Implemented Interfaces:
AssetBarcodeInventoryLoadService

public class AssetBarcodeInventoryLoadServiceImpl
extends Object
implements AssetBarcodeInventoryLoadService

Implementation of the AssetBarcodeInventoryLoadService interface. Handles loading, parsing, and storing of incoming barcode inventory files.


Field Summary
protected static String DOCUMENT_EXPLANATION
           
static String DOCUMENTS_MSG
           
protected static int MAX_NUMBER_OF_COLUMNS
           
static String MESSAGE_NO_DOCUMENT_CREATED
           
static String TOTAL_RECORDS_IN_ERROR_MSG
           
static String TOTAL_RECORDS_UPLOADED_MSG
           
 
Constructor Summary
AssetBarcodeInventoryLoadServiceImpl()
           
 
Method Summary
protected  org.kuali.rice.kns.bo.AdHocRouteRecipient buildApprovePersonRecipient(String userId)
          This method builds a recipient for Approval.
protected  String createBarcodeInventoryErrorDocuments(List<BarcodeInventoryErrorDetail> bcies, BarcodeInventoryErrorDocument barcodeInventoryErrorDocument, AssetBarCodeInventoryInputFileForm form)
          This method...
protected  BarcodeInventoryErrorDocument createInvalidBarcodeInventoryDocument(List<BarcodeInventoryErrorDetail> barcodeInventoryErrorDetails, String uploadDescription)
          This method creates a transaction document with the invalid barcode inventory records
 org.kuali.rice.kns.service.ParameterService getParameterService()
           
 boolean isCurrentUserInitiator(org.kuali.rice.kns.document.Document document)
          Determines whether the current user is the document initiator.
 boolean isFileFormatValid(File file)
          Validates and parses the file identified by the given files name.
 boolean isFullyProcessed(org.kuali.rice.kns.document.Document document)
          Determines whether or not the BCIE document has all its records corrected or deleted
protected  void processBarcodeInventory(List<BarcodeInventoryErrorDetail> barcodeInventoryErrorDetails, AssetBarCodeInventoryInputFileForm form)
          This method invokes the rules in order to validate each records of the barcode file and invokes the method that updates the asset table with the records that passes the rules validation
 boolean processFile(File file, AssetBarCodeInventoryInputFileForm form)
          This method creates the barcode inventory error document, validates each record, and invokes the method that actually stores the record in the tables
protected  void removeDoneFile(File file)
          This method removes the *.done files.
protected  void saveInvalidBarcodeInventoryDocument(BarcodeInventoryErrorDocument document)
          saves the barcode inventory document
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
           
 void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
           
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
           
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
           
 void setKualiRuleService(org.kuali.rice.kns.service.KualiRuleService ruleService)
           
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
           
 void setWorkflowDocumentService(org.kuali.rice.kns.workflow.service.WorkflowDocumentService workflowDocumentService)
           
 void updateAssetInformation(BarcodeInventoryErrorDetail barcodeInventoryErrorDetail, boolean updateWithDateAssetWasScanned)
          This method updates the asset information particularly the building code, bulding room, building subrool, campus code, and condition code
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_NO_DOCUMENT_CREATED

public static final String MESSAGE_NO_DOCUMENT_CREATED
See Also:
Constant Field Values

DOCUMENTS_MSG

public static final String DOCUMENTS_MSG
See Also:
Constant Field Values

TOTAL_RECORDS_UPLOADED_MSG

public static final String TOTAL_RECORDS_UPLOADED_MSG
See Also:
Constant Field Values

TOTAL_RECORDS_IN_ERROR_MSG

public static final String TOTAL_RECORDS_IN_ERROR_MSG
See Also:
Constant Field Values

MAX_NUMBER_OF_COLUMNS

protected static final int MAX_NUMBER_OF_COLUMNS
See Also:
Constant Field Values

DOCUMENT_EXPLANATION

protected static final String DOCUMENT_EXPLANATION
See Also:
Constant Field Values
Constructor Detail

AssetBarcodeInventoryLoadServiceImpl

public AssetBarcodeInventoryLoadServiceImpl()
Method Detail

isFullyProcessed

public boolean isFullyProcessed(org.kuali.rice.kns.document.Document document)
Determines whether or not the BCIE document has all its records corrected or deleted

Specified by:
isFullyProcessed in interface AssetBarcodeInventoryLoadService
Parameters:
document -
Returns:
boolean

isCurrentUserInitiator

public boolean isCurrentUserInitiator(org.kuali.rice.kns.document.Document document)
Description copied from interface: AssetBarcodeInventoryLoadService
Determines whether the current user is the document initiator. This method...

Specified by:
isCurrentUserInitiator in interface AssetBarcodeInventoryLoadService
Returns:
See Also:
AssetBarcodeInventoryLoadService.isCurrentUserInitiator(org.kuali.rice.kns.document.Document)

isFileFormatValid

public boolean isFileFormatValid(File file)
Description copied from interface: AssetBarcodeInventoryLoadService
Validates and parses the file identified by the given files name. If successful, parsed entries are stored.

Specified by:
isFileFormatValid in interface AssetBarcodeInventoryLoadService
Returns:
True if the file load and store was successful, false otherwise.
See Also:
org.kuali.module.cams.service.AssetBarcodeInventoryLoadService#isFileFormatValid(java.io.File)

processFile

public boolean processFile(File file,
                           AssetBarCodeInventoryInputFileForm form)
Description copied from interface: AssetBarcodeInventoryLoadService
This method creates the barcode inventory error document, validates each record, and invokes the method that actually stores the record in the tables

Specified by:
processFile in interface AssetBarcodeInventoryLoadService
Returns:
See Also:
org.kuali.module.cams.service.AssetBarCodeInventoryLoadService#processFile(java.io.File)

removeDoneFile

protected void removeDoneFile(File file)
This method removes the *.done files. If not deleted, then the program will display the name of the file in a puldown menu with a label of ready for process.

Parameters:
file -

processBarcodeInventory

protected void processBarcodeInventory(List<BarcodeInventoryErrorDetail> barcodeInventoryErrorDetails,
                                       AssetBarCodeInventoryInputFileForm form)
                                throws Exception
This method invokes the rules in order to validate each records of the barcode file and invokes the method that updates the asset table with the records that passes the rules validation

Parameters:
barcodeInventoryErrorDetails -
Throws:
Exception

createBarcodeInventoryErrorDocuments

protected String createBarcodeInventoryErrorDocuments(List<BarcodeInventoryErrorDetail> bcies,
                                                      BarcodeInventoryErrorDocument barcodeInventoryErrorDocument,
                                                      AssetBarCodeInventoryInputFileForm form)
This method...

Parameters:
bcies -
barcodeInventoryErrorDocument -

updateAssetInformation

public void updateAssetInformation(BarcodeInventoryErrorDetail barcodeInventoryErrorDetail,
                                   boolean updateWithDateAssetWasScanned)
This method updates the asset information particularly the building code, bulding room, building subrool, campus code, and condition code

Specified by:
updateAssetInformation in interface AssetBarcodeInventoryLoadService
Parameters:
barcodeInventoryErrorDetail -

createInvalidBarcodeInventoryDocument

protected BarcodeInventoryErrorDocument createInvalidBarcodeInventoryDocument(List<BarcodeInventoryErrorDetail> barcodeInventoryErrorDetails,
                                                                              String uploadDescription)
                                                                       throws org.kuali.rice.kew.exception.WorkflowException
This method creates a transaction document with the invalid barcode inventory records

Parameters:
barcodeInventoryErrorDetails -
Returns:
BarcodeInventoryErrorDocument
Throws:
org.kuali.rice.kew.exception.WorkflowException

saveInvalidBarcodeInventoryDocument

protected void saveInvalidBarcodeInventoryDocument(BarcodeInventoryErrorDocument document)
saves the barcode inventory document

Parameters:
document -

buildApprovePersonRecipient

protected org.kuali.rice.kns.bo.AdHocRouteRecipient buildApprovePersonRecipient(String userId)
This method builds a recipient for Approval.

Parameters:
userId -
Returns:

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)

setDataDictionaryService

public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)

setWorkflowDocumentService

public void setWorkflowDocumentService(org.kuali.rice.kns.workflow.service.WorkflowDocumentService workflowDocumentService)

setKualiRuleService

public void setKualiRuleService(org.kuali.rice.kns.service.KualiRuleService ruleService)

setDocumentService

public void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)

getParameterService

public org.kuali.rice.kns.service.ParameterService getParameterService()

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.