org.kuali.kfs.module.cab.document.service.impl
Class PurApLineDocumentServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.cab.document.service.impl.PurApLineDocumentServiceImpl
All Implemented Interfaces:
PurApLineDocumentService

public class PurApLineDocumentServiceImpl
extends Object
implements PurApLineDocumentService

This class provides default implementations of PurApLineService


Field Summary
static String DOCUMENT_DESC_PREFIX
           
 
Constructor Summary
PurApLineDocumentServiceImpl()
           
 
Method Summary
protected  boolean checkBuildingCodeValid(String campusCode, String buildingCode)
          Check the given buildingCode and campusCode valid.
protected  boolean checkBuildingRoomNumberValid(String campusCode, String buildingCode, String buildingRoomNumber)
          Check the given buildingCode and campusCode valid.
protected  boolean checkCampusCodeValid(String campusCode)
          check the given campus code existing and active status.
protected  boolean checkCapitalAssetTypeCodeExist(String capitalAssetTypeCode)
          check the given capital asset type code exists in CAM
protected  void conditionalyUpdateDocumentStatusAsEnroute(PurchasingAccountsPayableDocument selectedDoc)
          set doc status as enroute when all its items are in CAMs
protected  AssetGlobal createAssetGlobal(PurchasingAccountsPayableItemAsset selectedItem, String documentNumber, Pretag preTag, Integer requisitionIdentifier)
          Create AssetGlobal BO and feed data from pre-asset tagging table.
protected  void createAssetPaymentAssetDetails(List assetPaymentAssetDetails, PurchasingAccountsPayableItemAsset selectedItem, String documentNumber)
          Create AssetPaymentAssetDetail List for assetPaymentDocument.
protected  void createAssetPaymentDetails(List<AssetPaymentDetail> assetPaymentList, PurchasingAccountsPayableItemAsset selectedItem, String documentNumber, Integer requisitionIdentifier)
          Build asset payment details list for new asset global document.
protected  PurchaseOrderCapitalAssetSystem findCapitalAssetSystem(Integer capitalAssetSystemIdentifier)
          Get PurAp PurchaseOrderCapitalAssetSystem Object if exists.
 org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          Gets the businessObjectService attribute.
 org.kuali.rice.kns.service.DocumentService getDocumentService()
          Gets the documentService attribute.
protected  List<GeneralLedgerEntry> getGlEntryInActivedList(PurchasingAccountsPayableItemAsset selectedItem)
          Update GL Entry status as "enroute" if all its amount are consumed by submit CAMs document.Return the general ledger entry changes as a list.
 PurApInfoService getPurApInfoService()
          Gets the purApInfoService attribute.
 PurApLineService getPurApLineService()
          Gets the purApLineService attribute.
protected  void inActivateItem(PurchasingAccountsPayableItemAsset selectedItem)
          In-activate item, item Account and generalLedgerEntry active indicator.
protected  void inActivatePreTag(Pretag preTag)
          In-activate preTag if all its preTagDetail entry are inactive.
protected  boolean isAssetNumberValid(Long capitalAssetNumber)
          Check the asset table if given capitalAssetNumber is valid or not.
protected  boolean isItemFullyPretagged(Pretag preTag, AssetGlobal assetGlobal)
          Check if the all new assets get pre-tagged by pre-tagging.
protected  boolean isItemPretagged(Pretag preTag)
          check if item is pre-tagged already.
protected  void postProcessCreatingDocument(PurchasingAccountsPayableItemAsset selectedItem, List<PurchasingAccountsPayableDocument> purApDocs, PurApLineSession purApLineSession, String documentNumber)
          Process item line, cab document after creating CAMs document.
 String processApplyPayment(PurchasingAccountsPayableItemAsset selectedItem, List<PurchasingAccountsPayableDocument> purApDocs, PurApLineSession purApLineSession, Integer requisitionIdentifer)
          Create CAMS asset payment document.
 String processCreateAsset(PurchasingAccountsPayableItemAsset selectedItem, List<PurchasingAccountsPayableDocument> purApDocs, PurApLineSession purApLineSession, Integer requisitionIdentifier)
          Create CAMs asset global document.
protected  String replaceFiller(String val)
           
protected  void setAssetDetailFromPreTag(Pretag preTag, List<AssetGlobalDetail> assetSharedDetails, List<AssetGlobalDetail> assetUniqueDetails)
          Feeding data into assetGlobalDetail list from preTagDetail
protected  void setAssetGlobalDetailFromPurAp(PurchaseOrderCapitalAssetSystem capitalAssetSystem, List<AssetGlobalDetail> assetSharedDetail)
          Set asset global detail location information from PurAp input.
protected  void setAssetGlobalDetails(PurchasingAccountsPayableItemAsset selectedItem, AssetGlobal assetGlobal, Pretag preTag, PurchaseOrderCapitalAssetSystem capitalAssetSystem)
          Build asset details/shared details/unique details lists for new asset global document
protected  void setAssetGlobalFromPreTag(Pretag preTag, AssetGlobal assetGlobal)
          Feeding data from preTag and set into asset global for shared information.
protected  void setAssetGlobalFromPurAp(AssetGlobal assetGlobal, PurchaseOrderCapitalAssetSystem capitalAssetSystem)
          Set asset information from PurAp PurchaseOrderCapitalAssetSystem.
protected  void setAssetGlobalOrgOwnerAccount(AssetGlobal assetGlobal)
          Set Asset Global org owner account and chart code.
 void setAssetGlobalService(AssetGlobalService assetGlobalService)
           
protected  void setAssetGlobalTotalCost(AssetGlobal assetGlobal)
          Set Asset Global total cost amount.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
          Sets the documentService attribute value.
protected  void setNewAssetByPurApLocation(CapitalAssetLocation assetLocation, AssetGlobalDetail assetDetail)
          Set asset global detail by PurAp asset location.
protected  void setOrgInventoryNameForAssetDetail(List<AssetGlobalDetail> assetGlobalDetails, PurchaseOrderDocument purApdocument)
          Set organization inventory name for each asset detail by PO Contact name or if empty, by Requestor Name.
 void setPurApInfoService(PurApInfoService purApInfoService)
          Sets the purApInfoService attribute value.
 void setPurApLineService(PurApLineService purApLineService)
          Sets the purApLineService attribute value.
protected  void updateGlEntrySubmitAmount(PurchasingAccountsPayableItemAsset selectedItem, List glEntryList)
          Update transactionLedgerSubmitAmount in the associated generalLedgerEntry for each item account.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCUMENT_DESC_PREFIX

public static final String DOCUMENT_DESC_PREFIX
See Also:
Constant Field Values
Constructor Detail

PurApLineDocumentServiceImpl

public PurApLineDocumentServiceImpl()
Method Detail

processApplyPayment

public String processApplyPayment(PurchasingAccountsPayableItemAsset selectedItem,
                                  List<PurchasingAccountsPayableDocument> purApDocs,
                                  PurApLineSession purApLineSession,
                                  Integer requisitionIdentifer)
                           throws org.kuali.rice.kew.exception.WorkflowException
Description copied from interface: PurApLineDocumentService
Create CAMS asset payment document.

Specified by:
processApplyPayment in interface PurApLineDocumentService
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException
See Also:
PurApLineDocumentService.processApplyPayment(PurchasingAccountsPayableItemAsset, List, PurApLineSession, Integer)

createAssetPaymentAssetDetails

protected void createAssetPaymentAssetDetails(List assetPaymentAssetDetails,
                                              PurchasingAccountsPayableItemAsset selectedItem,
                                              String documentNumber)
Create AssetPaymentAssetDetail List for assetPaymentDocument.

Parameters:
assetPaymentAssetDetails -
selectedItem -
documentNumber -

isAssetNumberValid

protected boolean isAssetNumberValid(Long capitalAssetNumber)
Check the asset table if given capitalAssetNumber is valid or not.

Parameters:
capitalAssetNumber -
Returns:

processCreateAsset

public String processCreateAsset(PurchasingAccountsPayableItemAsset selectedItem,
                                 List<PurchasingAccountsPayableDocument> purApDocs,
                                 PurApLineSession purApLineSession,
                                 Integer requisitionIdentifier)
                          throws org.kuali.rice.kew.exception.WorkflowException
Description copied from interface: PurApLineDocumentService
Create CAMs asset global document.

Specified by:
processCreateAsset in interface PurApLineDocumentService
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException
See Also:
org.kuali.kfs.module.cab.document.service.PurApLineService#processCreateAsset(org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset, org.kuali.kfs.module.cab.document.web.struts.PurApLineForm)

postProcessCreatingDocument

protected void postProcessCreatingDocument(PurchasingAccountsPayableItemAsset selectedItem,
                                           List<PurchasingAccountsPayableDocument> purApDocs,
                                           PurApLineSession purApLineSession,
                                           String documentNumber)
Process item line, cab document after creating CAMs document.

Parameters:
selectedItem -
purApForm -
purApLineSession -
documentNumber -

conditionalyUpdateDocumentStatusAsEnroute

protected void conditionalyUpdateDocumentStatusAsEnroute(PurchasingAccountsPayableDocument selectedDoc)
set doc status as enroute when all its items are in CAMs

Parameters:
selectedDoc -

updateGlEntrySubmitAmount

protected void updateGlEntrySubmitAmount(PurchasingAccountsPayableItemAsset selectedItem,
                                         List glEntryList)
Update transactionLedgerSubmitAmount in the associated generalLedgerEntry for each item account.

Parameters:
selectedItem -

setAssetGlobalDetails

protected void setAssetGlobalDetails(PurchasingAccountsPayableItemAsset selectedItem,
                                     AssetGlobal assetGlobal,
                                     Pretag preTag,
                                     PurchaseOrderCapitalAssetSystem capitalAssetSystem)
Build asset details/shared details/unique details lists for new asset global document

Parameters:
selectedItem -
newDocument -
assetGlobal -

isItemFullyPretagged

protected boolean isItemFullyPretagged(Pretag preTag,
                                       AssetGlobal assetGlobal)
Check if the all new assets get pre-tagged by pre-tagging.

Parameters:
preTag -
assetGlobal -
Returns:

setAssetGlobalDetailFromPurAp

protected void setAssetGlobalDetailFromPurAp(PurchaseOrderCapitalAssetSystem capitalAssetSystem,
                                             List<AssetGlobalDetail> assetSharedDetail)
Set asset global detail location information from PurAp input. In this method, no grouping for shared location because AssetGlobalMaintainableImpl.processAfterRetrieve() will group the shared location anyway...

Parameters:
capitalAssetSystem -
assetDetailsList -

setNewAssetByPurApLocation

protected void setNewAssetByPurApLocation(CapitalAssetLocation assetLocation,
                                          AssetGlobalDetail assetDetail)
Set asset global detail by PurAp asset location.

Parameters:
assetLocation -
assetDetail -

checkBuildingRoomNumberValid

protected boolean checkBuildingRoomNumberValid(String campusCode,
                                               String buildingCode,
                                               String buildingRoomNumber)
Check the given buildingCode and campusCode valid.

Parameters:
campusCode -
buildingCode -
buildingRoomNumber -
Returns:

checkBuildingCodeValid

protected boolean checkBuildingCodeValid(String campusCode,
                                         String buildingCode)
Check the given buildingCode and campusCode valid.

Parameters:
buildingCode -
Returns:

checkCampusCodeValid

protected boolean checkCampusCodeValid(String campusCode)
check the given campus code existing and active status.

Parameters:
campusCode -
Returns:

setAssetDetailFromPreTag

protected void setAssetDetailFromPreTag(Pretag preTag,
                                        List<AssetGlobalDetail> assetSharedDetails,
                                        List<AssetGlobalDetail> assetUniqueDetails)
Feeding data into assetGlobalDetail list from preTagDetail

Parameters:
preTag -
assetDetailsList -

inActivatePreTag

protected void inActivatePreTag(Pretag preTag)
In-activate preTag if all its preTagDetail entry are inactive.

Parameters:
preTag -

createAssetPaymentDetails

protected void createAssetPaymentDetails(List<AssetPaymentDetail> assetPaymentList,
                                         PurchasingAccountsPayableItemAsset selectedItem,
                                         String documentNumber,
                                         Integer requisitionIdentifier)
Build asset payment details list for new asset global document.

Parameters:
selectedItem -
assetGlobal -
requisitionIdentifier -

inActivateItem

protected void inActivateItem(PurchasingAccountsPayableItemAsset selectedItem)
In-activate item, item Account and generalLedgerEntry active indicator.

Parameters:
selectedItem -
glEntryList -

getGlEntryInActivedList

protected List<GeneralLedgerEntry> getGlEntryInActivedList(PurchasingAccountsPayableItemAsset selectedItem)
Update GL Entry status as "enroute" if all its amount are consumed by submit CAMs document.Return the general ledger entry changes as a list.

Parameters:
glEntryList -
selectedAccount -
glEntry -

replaceFiller

protected String replaceFiller(String val)

createAssetGlobal

protected AssetGlobal createAssetGlobal(PurchasingAccountsPayableItemAsset selectedItem,
                                        String documentNumber,
                                        Pretag preTag,
                                        Integer requisitionIdentifier)
Create AssetGlobal BO and feed data from pre-asset tagging table.

Parameters:
selectedItem -
newDocument -
preTag -
Returns:

setOrgInventoryNameForAssetDetail

protected void setOrgInventoryNameForAssetDetail(List<AssetGlobalDetail> assetGlobalDetails,
                                                 PurchaseOrderDocument purApdocument)
Set organization inventory name for each asset detail by PO Contact name or if empty, by Requestor Name.

Parameters:
assetGlobalDetails -
purApdocument -

isItemPretagged

protected boolean isItemPretagged(Pretag preTag)
check if item is pre-tagged already.

Parameters:
preTag -
Returns:

setAssetGlobalFromPurAp

protected void setAssetGlobalFromPurAp(AssetGlobal assetGlobal,
                                       PurchaseOrderCapitalAssetSystem capitalAssetSystem)
Set asset information from PurAp PurchaseOrderCapitalAssetSystem.

Parameters:
assetGlobal -
capitalAssetSystem -

checkCapitalAssetTypeCodeExist

protected boolean checkCapitalAssetTypeCodeExist(String capitalAssetTypeCode)
check the given capital asset type code exists in CAM

Parameters:
capitalAssetTypeCode -
Returns:

findCapitalAssetSystem

protected PurchaseOrderCapitalAssetSystem findCapitalAssetSystem(Integer capitalAssetSystemIdentifier)
Get PurAp PurchaseOrderCapitalAssetSystem Object if exists.

Parameters:
capitalAssetSystemIdentifier -
Returns:

setAssetGlobalOrgOwnerAccount

protected void setAssetGlobalOrgOwnerAccount(AssetGlobal assetGlobal)
Set Asset Global org owner account and chart code. It's assigned by selecting the account that contributed the most dollars on the payment request.

Parameters:
assetGlobal -

setAssetGlobalTotalCost

protected void setAssetGlobalTotalCost(AssetGlobal assetGlobal)
Set Asset Global total cost amount.

Parameters:
assetGlobal -

setAssetGlobalFromPreTag

protected void setAssetGlobalFromPreTag(Pretag preTag,
                                        AssetGlobal assetGlobal)
Feeding data from preTag and set into asset global for shared information. PreTag data may override PurAp asset data since the strategy choose to respect Pretagging

Parameters:
preTag -
assetGlobal -

getBusinessObjectService

public org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
Gets the businessObjectService attribute.

Returns:
Returns the businessObjectService.

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.

Parameters:
businessObjectService - The businessObjectService to set.

getDocumentService

public org.kuali.rice.kns.service.DocumentService getDocumentService()
Gets the documentService attribute.

Returns:
Returns the documentService.

setDocumentService

public void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
Sets the documentService attribute value.

Parameters:
documentService - The documentService to set.

getPurApLineService

public PurApLineService getPurApLineService()
Gets the purApLineService attribute.

Returns:
Returns the purApLineService.

setPurApLineService

public void setPurApLineService(PurApLineService purApLineService)
Sets the purApLineService attribute value.

Parameters:
purApLineService - The purApLineService to set.

getPurApInfoService

public PurApInfoService getPurApInfoService()
Gets the purApInfoService attribute.

Returns:
Returns the purApInfoService.

setPurApInfoService

public void setPurApInfoService(PurApInfoService purApInfoService)
Sets the purApInfoService attribute value.

Parameters:
purApInfoService - The purApInfoService to set.

setAssetGlobalService

public void setAssetGlobalService(AssetGlobalService assetGlobalService)


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