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

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

public class AssetGlobalServiceImpl
extends Object
implements AssetGlobalService


Nested Class Summary
protected static class AssetGlobalServiceImpl.AmountCategory
           
 
Constructor Summary
AssetGlobalServiceImpl()
           
 
Method Summary
protected  AssetGlpeSourceDetail createAssetGlpePostable(AssetGlobal document, AssetPaymentDetail assetPaymentDetail, AssetGlobalServiceImpl.AmountCategory amountCategory)
          Creates an instance of AssetGlpeSourceDetail depending on the source flag
 void createGLPostables(AssetGlobal assetGlobal, CamsGeneralLedgerPendingEntrySourceBase assetGlobalGlPoster)
          Creates GL Postables
 boolean existsInGroup(String groupName, String memberName)
          This method checks if member exists in the given group.
 AssetObjectCodeService getAssetObjectCodeService()
          Gets the assetObjectCodeService attribute.
 AssetPaymentService getAssetPaymentService()
          Gets the assetPaymentService attribute.
 AssetService getAssetService()
          Gets the assetService attribute.
 org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          Gets the businessObjectService attribute.
 String getCapitalObjectAcquisitionCodeGroup()
           
 List<org.kuali.rice.kns.bo.PersistableBusinessObject> getCreateNewAssets(AssetGlobal assetGlobal)
          Returns assets for save for create new assets
 String getNewAcquisitionTypeCode()
           
 String getNonNewAcquisitionCodeGroup()
           
 org.kuali.rice.kns.service.ParameterService getParameterService()
           
 PaymentSummaryService getPaymentSummaryService()
          Gets the paymentSummaryService attribute.
 List<org.kuali.rice.kns.bo.PersistableBusinessObject> getSeparateAssets(AssetGlobal assetGlobal)
          Returns assets for save for asset separate
 org.kuali.rice.kns.util.KualiDecimal getUniqueAssetsTotalAmount(AssetGlobal assetGlobal)
          Add and return the total amount for all unique assets created.
 UniversityDateService getUniversityDateService()
          Gets the universityDateService attribute.
 boolean isAssetSeparate(AssetGlobal assetGlobal)
          Validates if the document type matches that of Asset Separate.
 boolean isAssetSeparateByPayment(AssetGlobal assetGlobal)
          Validates if the document type matches that of Asset Separate by payment
protected  boolean isPaymentFinancialObjectActive(AssetPaymentDetail assetPayment)
           
 void setAssetObjectCodeService(AssetObjectCodeService assetObjectCodeService)
          Sets the assetObjectCodeService attribute value.
 void setAssetPaymentService(AssetPaymentService assetPaymentService)
          Sets the assetPaymentService attribute value.
 void setAssetService(AssetService assetService)
          Sets the assetService attribute value.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
           
 void setPaymentSummaryService(PaymentSummaryService paymentSummaryService)
          Sets the paymentSummaryService attribute value.
 void setUniversityDateService(UniversityDateService universityDateService)
          Sets the universityDateService attribute value.
protected  Asset setupAsset(AssetGlobal assetGlobal, AssetGlobalDetail assetGlobalDetail, boolean separate)
          Creates a new Asset appropriate for either create new or separate.
protected  void setupAssetLocationOffCampus(AssetGlobalDetail assetGlobalDetail, Asset asset)
          Off campus location appropriately set for this asset.
protected  AssetPayment setupCreateNewAssetPayment(Long capitalAssetNumber, String acquisitionTypeCode, int assetGlobalDetailsSize, int assetGlobalDetailsIndex, AssetPaymentDetail assetPaymentDetail)
          Creates a payment for an asset in create new mode.
 org.kuali.rice.kns.util.KualiDecimal totalPaymentByAsset(AssetGlobal assetGlobal, boolean lastEntry)
          We need to calculate asset total amount from the sum of its payments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetGlobalServiceImpl

public AssetGlobalServiceImpl()
Method Detail

createAssetGlpePostable

protected AssetGlpeSourceDetail createAssetGlpePostable(AssetGlobal document,
                                                        AssetPaymentDetail assetPaymentDetail,
                                                        AssetGlobalServiceImpl.AmountCategory amountCategory)
Creates an instance of AssetGlpeSourceDetail depending on the source flag

Parameters:
universityDateService - University Date Service
assetPayment - Payment record for which postable is created
isSource - Indicates if postable is for source organization
Returns:
GL Postable source detail

createGLPostables

public void createGLPostables(AssetGlobal assetGlobal,
                              CamsGeneralLedgerPendingEntrySourceBase assetGlobalGlPoster)
Description copied from interface: AssetGlobalService
Creates GL Postables

Specified by:
createGLPostables in interface AssetGlobalService
See Also:
org.kuali.kfs.module.cam.document.service.AssetGlobalService#createGLPostables(org.kuali.module.cams.document.AssetGlobal)

getParameterService

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

setParameterService

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

getAssetObjectCodeService

public AssetObjectCodeService getAssetObjectCodeService()
Gets the assetObjectCodeService attribute.

Returns:
Returns the assetObjectCodeService.

setAssetObjectCodeService

public void setAssetObjectCodeService(AssetObjectCodeService assetObjectCodeService)
Sets the assetObjectCodeService attribute value.

Parameters:
assetObjectCodeService - The assetObjectCodeService to set.

getAssetPaymentService

public AssetPaymentService getAssetPaymentService()
Gets the assetPaymentService attribute.

Returns:
Returns the assetPaymentService.

setAssetPaymentService

public void setAssetPaymentService(AssetPaymentService assetPaymentService)
Sets the assetPaymentService attribute value.

Parameters:
assetPaymentService - The assetPaymentService to set.

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.

getUniversityDateService

public UniversityDateService getUniversityDateService()
Gets the universityDateService attribute.

Returns:
Returns the universityDateService.

setUniversityDateService

public void setUniversityDateService(UniversityDateService universityDateService)
Sets the universityDateService attribute value.

Parameters:
universityDateService - The universityDateService to set.

totalPaymentByAsset

public org.kuali.rice.kns.util.KualiDecimal totalPaymentByAsset(AssetGlobal assetGlobal,
                                                                boolean lastEntry)
We need to calculate asset total amount from the sum of its payments. Otherwise, the asset total amount could mismatch with the sum of payments.

Specified by:
totalPaymentByAsset in interface AssetGlobalService
Returns:
See Also:
org.kuali.kfs.module.cam.document.service.AssetGlobalService#totalPaymentByAsset(org.kuali.kfs.module.cam.businessobject.AssetGlobal)

existsInGroup

public boolean existsInGroup(String groupName,
                             String memberName)
Description copied from interface: AssetGlobalService
This method checks if member exists in the given group.

Specified by:
existsInGroup in interface AssetGlobalService
Returns:
See Also:
AssetGlobalService.existsInGroup(java.lang.String, java.lang.String)

isPaymentFinancialObjectActive

protected boolean isPaymentFinancialObjectActive(AssetPaymentDetail assetPayment)

getAssetService

public AssetService getAssetService()
Gets the assetService attribute.

Returns:
Returns the assetService.

setAssetService

public void setAssetService(AssetService assetService)
Sets the assetService attribute value.

Parameters:
assetService - The assetService to set.

isAssetSeparate

public boolean isAssetSeparate(AssetGlobal assetGlobal)
Description copied from interface: AssetGlobalService
Validates if the document type matches that of Asset Separate.

Specified by:
isAssetSeparate in interface AssetGlobalService
Returns:
boolean
See Also:
AssetGlobalService.isAssetSeparate(org.kuali.kfs.module.cam.businessobject.AssetGlobal)

isAssetSeparateByPayment

public boolean isAssetSeparateByPayment(AssetGlobal assetGlobal)
Description copied from interface: AssetGlobalService
Validates if the document type matches that of Asset Separate by payment

Specified by:
isAssetSeparateByPayment in interface AssetGlobalService
Returns:
boolean
See Also:
AssetGlobalService.isAssetSeparateByPayment(org.kuali.kfs.module.cam.businessobject.AssetGlobal)

getUniqueAssetsTotalAmount

public org.kuali.rice.kns.util.KualiDecimal getUniqueAssetsTotalAmount(AssetGlobal assetGlobal)
Add and return the total amount for all unique assets created.

Specified by:
getUniqueAssetsTotalAmount in interface AssetGlobalService
Parameters:
assetGlobal -
Returns:
Returns the total separate source amount

getCreateNewAssets

public List<org.kuali.rice.kns.bo.PersistableBusinessObject> getCreateNewAssets(AssetGlobal assetGlobal)
Description copied from interface: AssetGlobalService
Returns assets for save for create new assets

Specified by:
getCreateNewAssets in interface AssetGlobalService
Returns:
See Also:
AssetGlobalService.getCreateNewAssets(org.kuali.kfs.module.cam.businessobject.AssetGlobal)

getSeparateAssets

public List<org.kuali.rice.kns.bo.PersistableBusinessObject> getSeparateAssets(AssetGlobal assetGlobal)
Description copied from interface: AssetGlobalService
Returns assets for save for asset separate

Specified by:
getSeparateAssets in interface AssetGlobalService
Returns:
See Also:
AssetGlobalService.getSeparateAssets(org.kuali.kfs.module.cam.businessobject.AssetGlobal)

setupAsset

protected Asset setupAsset(AssetGlobal assetGlobal,
                           AssetGlobalDetail assetGlobalDetail,
                           boolean separate)
Creates a new Asset appropriate for either create new or separate. This does not create the payments for this asset.

Parameters:
assetGlobal - containing data for the asset to be created
assetGlobalDetail - containing data for the asset to be created
separate - indicating whether this is a separate and asset or not
Returns:
set of assets appropriate for this creation without payments

setupAssetLocationOffCampus

protected void setupAssetLocationOffCampus(AssetGlobalDetail assetGlobalDetail,
                                           Asset asset)
Off campus location appropriately set for this asset.

Parameters:
assetGlobalDetail - containing data for the location
asset - object that location is set in

setupCreateNewAssetPayment

protected AssetPayment setupCreateNewAssetPayment(Long capitalAssetNumber,
                                                  String acquisitionTypeCode,
                                                  int assetGlobalDetailsSize,
                                                  int assetGlobalDetailsIndex,
                                                  AssetPaymentDetail assetPaymentDetail)
Creates a payment for an asset in create new mode.

Parameters:
capitalAssetNumber - to use for the payment
acquisitionTypeCode - for logic in determining how dates are to be set
assetGlobalDetailsSize - for logic in determining depreciation amounts (if asset is depreciable)
assetGlobalDetailsIndex - for logic in determining depreciation amounts (if asset is depreciable)
assetPaymentDetail - containing data for the payment
Returns:
payment for an asset in create new

getPaymentSummaryService

public PaymentSummaryService getPaymentSummaryService()
Gets the paymentSummaryService attribute.

Returns:
Returns the paymentSummaryService.

setPaymentSummaryService

public void setPaymentSummaryService(PaymentSummaryService paymentSummaryService)
Sets the paymentSummaryService attribute value.

Parameters:
paymentSummaryService - The paymentSummaryService to set.

getNewAcquisitionTypeCode

public String getNewAcquisitionTypeCode()
Specified by:
getNewAcquisitionTypeCode in interface AssetGlobalService
Returns:
the parameter value for the new acquisition type code

getCapitalObjectAcquisitionCodeGroup

public String getCapitalObjectAcquisitionCodeGroup()
Specified by:
getCapitalObjectAcquisitionCodeGroup in interface AssetGlobalService
Returns:
the parameter value for the capital object acquisition code group

getNonNewAcquisitionCodeGroup

public String getNonNewAcquisitionCodeGroup()
Specified by:
getNonNewAcquisitionCodeGroup in interface AssetGlobalService
Returns:
the parameter value for the not new acquisition code group


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