org.kuali.kfs.module.cam.util
Class AssetPaymentDistributor

java.lang.Object
  extended by org.kuali.kfs.module.cam.util.AssetPaymentDistributor

public class AssetPaymentDistributor
extends Object

This class is a calculator which will distribute the payment amounts by ratio. Inputs received are

  • Asset Payment Details
  • Asset Details
  • total historical cost for asset
  • It provides a table mapping of asset payment distributions key off of AssetPaymentDetail and AssetPaymentAssetDetail Logic is best explained as below
  • Compute the asset ratio of amount to be distributed per asset
  • For each Asset Payment Details, create proportional asset payments base on the asset ratio
  • * Keep track of unallocated amount within each asset payment loop*
  • * For the last asset in each payment detail iteration, use the rest of unallocated amount

  • Constructor Summary
    AssetPaymentDistributor(List<AssetPaymentDetail> assetPaymentDetailLines, List<AssetPaymentAssetDetail> assetPaymentAssetDetails, org.kuali.rice.kns.util.KualiDecimal totalHistoricalCost)
              Constructor and instantiate the detai lists as empty
     
    Method Summary
     Map<String,Map<AssetPaymentAssetDetail,org.kuali.rice.kns.util.KualiDecimal>> getAssetPaymentDistributions()
              Retrieve the asset payment distributions
     Map<AssetPaymentAssetDetail,org.kuali.rice.kns.util.KualiDecimal> getTotalAssetAllocations()
              Get each Asset's allocation totals base the payment distributions
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    AssetPaymentDistributor

    public AssetPaymentDistributor(List<AssetPaymentDetail> assetPaymentDetailLines,
                                   List<AssetPaymentAssetDetail> assetPaymentAssetDetails,
                                   org.kuali.rice.kns.util.KualiDecimal totalHistoricalCost)
    Constructor and instantiate the detai lists as empty

    Method Detail

    getAssetPaymentDistributions

    public Map<String,Map<AssetPaymentAssetDetail,org.kuali.rice.kns.util.KualiDecimal>> getAssetPaymentDistributions()
    Retrieve the asset payment distributions

    Returns:

    getTotalAssetAllocations

    public Map<AssetPaymentAssetDetail,org.kuali.rice.kns.util.KualiDecimal> getTotalAssetAllocations()
    Get each Asset's allocation totals base the payment distributions

    Returns:
    map of asset detail and its totals


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