org.kuali.kfs.module.cam.document.service.impl
Class AssetPaymentServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.cam.document.service.impl.AssetPaymentServiceImpl
All Implemented Interfaces:
AssetPaymentService

@Transactional
public class AssetPaymentServiceImpl
extends Object
implements AssetPaymentService


Constructor Summary
AssetPaymentServiceImpl()
           
 
Method Summary
 void adjustPaymentAmounts(AssetPayment assetPayment, boolean reverseAmount, boolean nullPeriodDepreciation)
          This method uses reflection and performs below steps on all Amount fields If it is a depreciation field, then reset the value to null, so that they don't get copied to offset payments If it is an amount field, then reverse the amount by multiplying with -1
 boolean extractPostedDatePeriod(AssetPaymentDetail assetPaymentDetail)
          sets in an assetPaymentDetail BO the posting year and posting period that is retrived from the university date table using the asset payment posted date as a key.
 AssetPaymentDao getAssetPaymentDao()
           
 Integer getAssetPaymentDetailQuantity(AssetGlobal assetGlobal)
          Returns asset payment details quantity
 AssetRetirementService getAssetRetirementService()
           
 AssetService getAssetService()
           
 org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
           
 Integer getMaxSequenceNumber(Long capitalAssetNumber)
          Finds out the maximum value of payment sequence for an asset
 ObjectCodeService getObjectCodeService()
           
 org.kuali.rice.kns.service.ParameterService getParameterService()
           
 UniversityDateService getUniversityDateService()
           
 boolean hasDifferentObjectSubTypes(AssetPaymentDocument document)
          This method determines whether or not an asset has different object sub type codes in its documents.
 boolean isNonDepreciableFederallyOwnedObjSubType(String objectSubType)
          Checks if object sub type is a non-depreciable federally owned object sub type
 boolean isPaymentEligibleForAccumDeprGLPosting(AssetPayment assetPayment)
          Check if payment is eligible for ACCUMMULATE_DEPRECIATION GL posting.
 boolean isPaymentEligibleForCapitalizationGLPosting(AssetPayment assetPayment)
          Check if payment is eligible for CAPITALIZATION GL posting.
 boolean isPaymentEligibleForGLPosting(AssetPayment assetPayment)
          Checks if payment is eligible for GL posting
 boolean isPaymentEligibleForOffsetGLPosting(AssetPayment assetPayment)
          Check if payment is eligible for OFFSET_AMOUNT GL posting.
 boolean isPaymentFederalOwned(AssetPayment assetPayment)
          Checks if asset payment is federally funder or not
 boolean isPaymentFinancialObjectActive(AssetPayment assetPayment)
          Checks active status of financial object of the payment
 void processApprovedAssetPayment(AssetPaymentDocument document)
          Stores the approved asset payment detail records in the asset payment table, and updates the total cost of the asset in the asset table
protected  void processPayments(AssetPaymentDocument document)
          Creates a new asset payment record for each new asset payment detail record and then save them
 void setAssetPaymentDao(AssetPaymentDao assetPaymentDao)
           
 void setAssetRetirementService(AssetRetirementService assetRetirementService)
           
 void setAssetService(AssetService assetService)
           
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
           
 void setObjectCodeService(ObjectCodeService objectCodeService)
           
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
           
 void setUniversityDateService(UniversityDateService universityDateService)
           
 boolean validateAssets(String errorPath, Asset asset)
          Validates the assets inputed in the asset payment document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetPaymentServiceImpl

public AssetPaymentServiceImpl()
Method Detail

getMaxSequenceNumber

public Integer getMaxSequenceNumber(Long capitalAssetNumber)
Description copied from interface: AssetPaymentService
Finds out the maximum value of payment sequence for an asset

Specified by:
getMaxSequenceNumber in interface AssetPaymentService
Returns:
Maximum sequence value of asset payment within an asset
See Also:
org.kuali.kfs.module.cam.document.service.AssetPaymentService#getMaxSequenceNumber(org.kuali.kfs.module.cam.businessobject.AssetPayment)

isPaymentFederalOwned

public boolean isPaymentFederalOwned(AssetPayment assetPayment)
Description copied from interface: AssetPaymentService
Checks if asset payment is federally funder or not

Specified by:
isPaymentFederalOwned in interface AssetPaymentService
Parameters:
assetPayment - Payment record
Returns:
True if financial object sub type code indicates federal contribution
See Also:
AssetPaymentService.isPaymentFederalOwned(org.kuali.kfs.module.cam.businessobject.AssetPayment)

isPaymentEligibleForAccumDeprGLPosting

public boolean isPaymentEligibleForAccumDeprGLPosting(AssetPayment assetPayment)
Description copied from interface: AssetPaymentService
Check if payment is eligible for ACCUMMULATE_DEPRECIATION GL posting.

Specified by:
isPaymentEligibleForAccumDeprGLPosting in interface AssetPaymentService
Returns:
See Also:
AssetPaymentService.isPaymentEligibleForAccumDeprGLPosting(org.kuali.kfs.module.cam.businessobject.AssetPayment)

isPaymentEligibleForCapitalizationGLPosting

public boolean isPaymentEligibleForCapitalizationGLPosting(AssetPayment assetPayment)
Description copied from interface: AssetPaymentService
Check if payment is eligible for CAPITALIZATION GL posting.

Specified by:
isPaymentEligibleForCapitalizationGLPosting in interface AssetPaymentService
Returns:
See Also:
AssetPaymentService.isPaymentEligibleForCapitalizationGLPosting(org.kuali.kfs.module.cam.businessobject.AssetPayment)

isPaymentEligibleForOffsetGLPosting

public boolean isPaymentEligibleForOffsetGLPosting(AssetPayment assetPayment)
Description copied from interface: AssetPaymentService
Check if payment is eligible for OFFSET_AMOUNT GL posting.

Specified by:
isPaymentEligibleForOffsetGLPosting in interface AssetPaymentService
Returns:
See Also:
AssetPaymentService.isPaymentEligibleForOffsetGLPosting(org.kuali.kfs.module.cam.businessobject.AssetPayment)

isPaymentFinancialObjectActive

public boolean isPaymentFinancialObjectActive(AssetPayment assetPayment)
Description copied from interface: AssetPaymentService
Checks active status of financial object of the payment

Specified by:
isPaymentFinancialObjectActive in interface AssetPaymentService
Parameters:
assetPayment - Payment record
Returns:
True if object is active
See Also:
AssetPaymentService.isPaymentFinancialObjectActive(org.kuali.kfs.module.cam.businessobject.AssetPayment)

processApprovedAssetPayment

public void processApprovedAssetPayment(AssetPaymentDocument document)
Description copied from interface: AssetPaymentService
Stores the approved asset payment detail records in the asset payment table, and updates the total cost of the asset in the asset table

Specified by:
processApprovedAssetPayment in interface AssetPaymentService
See Also:
AssetPaymentService.processApprovedAssetPayment(org.kuali.kfs.module.cam.document.AssetPaymentDocument)

processPayments

protected void processPayments(AssetPaymentDocument document)
Creates a new asset payment record for each new asset payment detail record and then save them

Parameters:
document -

adjustPaymentAmounts

public void adjustPaymentAmounts(AssetPayment assetPayment,
                                 boolean reverseAmount,
                                 boolean nullPeriodDepreciation)
                          throws IllegalAccessException,
                                 InvocationTargetException
Description copied from interface: AssetPaymentService
This method uses reflection and performs below steps on all Amount fields
  • If it is a depreciation field, then reset the value to null, so that they don't get copied to offset payments
  • If it is an amount field, then reverse the amount by multiplying with -1
  • Specified by:
    adjustPaymentAmounts in interface AssetPaymentService
    reverseAmount - true if amounts needs to be multiplied with -1
    nullPeriodDepreciation - true if depreciation period amount needs to be null
    Throws:
    IllegalAccessException
    InvocationTargetException
    See Also:
    AssetPaymentService.adjustPaymentAmounts(org.kuali.kfs.module.cam.businessobject.AssetPayment, boolean, boolean)

    isPaymentEligibleForGLPosting

    public boolean isPaymentEligibleForGLPosting(AssetPayment assetPayment)
    Description copied from interface: AssetPaymentService
    Checks if payment is eligible for GL posting

    Specified by:
    isPaymentEligibleForGLPosting in interface AssetPaymentService
    Parameters:
    assetPayment - AssetPayment
    Returns:
    true if elgible for GL posting
    See Also:
    AssetPaymentService.isPaymentEligibleForGLPosting(org.kuali.kfs.module.cam.businessobject.AssetPayment)

    isNonDepreciableFederallyOwnedObjSubType

    public boolean isNonDepreciableFederallyOwnedObjSubType(String objectSubType)
    Checks if object sub type is a non-depreciable federally owned object sub type

    Specified by:
    isNonDepreciableFederallyOwnedObjSubType in interface AssetPaymentService
    Parameters:
    string - objectSubType2
    Returns:
    true if is NON_DEPRECIABLE_FEDERALLY_OWNED_OBJECT_SUB_TYPES

    extractPostedDatePeriod

    public boolean extractPostedDatePeriod(AssetPaymentDetail assetPaymentDetail)
    Description copied from interface: AssetPaymentService
    sets in an assetPaymentDetail BO the posting year and posting period that is retrived from the university date table using the asset payment posted date as a key.

    Specified by:
    extractPostedDatePeriod in interface AssetPaymentService
    Returns:
    boolean
    See Also:
    AssetPaymentService.extractPostedDatePeriod(org.kuali.kfs.module.cam.businessobject.AssetPaymentDetail)

    getAssetPaymentDetailQuantity

    public Integer getAssetPaymentDetailQuantity(AssetGlobal assetGlobal)
    Description copied from interface: AssetPaymentService
    Returns asset payment details quantity

    Specified by:
    getAssetPaymentDetailQuantity in interface AssetPaymentService
    Returns:
    Integer
    See Also:
    AssetPaymentService.getAssetPaymentDetailQuantity(org.kuali.kfs.module.cam.businessobject.AssetGlobal)

    validateAssets

    public boolean validateAssets(String errorPath,
                                  Asset asset)
    Description copied from interface: AssetPaymentService
    Validates the assets inputed in the asset payment document

    Specified by:
    validateAssets in interface AssetPaymentService
    Returns:
    See Also:
    AssetPaymentService.validateAssets(java.lang.String, org.kuali.kfs.module.cam.businessobject.Asset)

    hasDifferentObjectSubTypes

    public boolean hasDifferentObjectSubTypes(AssetPaymentDocument document)
    This method determines whether or not an asset has different object sub type codes in its documents.

    Specified by:
    hasDifferentObjectSubTypes in interface AssetPaymentService
    Returns:
    true when the asset has payments with object codes that point to different object sub type codes

    setBusinessObjectService

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

    getBusinessObjectService

    public org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()

    getParameterService

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

    setParameterService

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

    getAssetPaymentDao

    public AssetPaymentDao getAssetPaymentDao()

    setAssetPaymentDao

    public void setAssetPaymentDao(AssetPaymentDao assetPaymentDao)

    getObjectCodeService

    public ObjectCodeService getObjectCodeService()

    setObjectCodeService

    public void setObjectCodeService(ObjectCodeService objectCodeService)

    getUniversityDateService

    public UniversityDateService getUniversityDateService()

    setUniversityDateService

    public void setUniversityDateService(UniversityDateService universityDateService)

    getAssetRetirementService

    public AssetRetirementService getAssetRetirementService()

    setAssetRetirementService

    public void setAssetRetirementService(AssetRetirementService assetRetirementService)

    getAssetService

    public AssetService getAssetService()

    setAssetService

    public void setAssetService(AssetService assetService)


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