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

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

public class AssetServiceImpl
extends Object
implements AssetService


Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Constructor Summary
AssetServiceImpl()
           
 
Method Summary
 List<Asset> findActiveAssetsMatchingTagNumber(String campusTagNumber)
          This method returns all active assets found matching this tab number
 Collection<Asset> findAssetsMatchingTagNumber(String campusTagNumber)
          This method returns all active and not active assets found matching this tab number
 List<String> getCurrentRouteLevels(org.kuali.rice.kns.workflow.service.KualiWorkflowDocument workflowDocument)
          A helper method for determining the route levels for a given document.
 List<String> getDocumentNumbersThatSeparatedThisAsset(Long capitalAssetNumber)
           
 org.kuali.rice.kns.service.ParameterService getParameterService()
           
 PaymentSummaryService getPaymentSummaryService()
           
 boolean isAssetDepreciableLifeLimitZero(Asset asset)
          Test if Depreciable Life Limit is "0" This method...
 boolean isAssetDepreciationStarted(Asset asset)
          Check if asset has started depreciation already.
 boolean isAssetFabrication(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
           
 boolean isAssetLoaned(Asset asset)
           
 boolean isAssetMovableCheckByAsset(Asset asset)
           
 boolean isAssetMovableCheckByPayment(String financialObjectSubTypeCode)
          This will check the financial object sub type code in system parameters return TRUE if found in MOVABLE_EQUIPMENT_OBJECT_SUB_TYPE_CODES return FALSE if found in NON_MOVABLE_EQUIPMENT_OBJECT_SUB_TYPE_CODES throw ValidationException if not defined in neither one of them
 boolean isAssetRetired(Asset asset)
           
 boolean isAssetTaggedInPriorFiscalYear(Asset asset)
          The Asset Type Code is allowed to be changed only: (1)If the tag number has not been assigned or (2)The asset is tagged, and the asset created in the current fiscal year
 boolean isAssetTypeCodeChanged(Asset oldAsset, Asset newAsset)
          Test if assetTypeCode is changed.
 boolean isCapitalAsset(Asset asset)
           
 boolean isCapitalAssetNumberDuplicate(Long capitalAssetNumber1, Long capitalAssetNumber2)
          Test two capitalAssetNumber equal.
 boolean isDocumentEnrouting(org.kuali.rice.kns.document.Document document)
          Checks if given mainenanceDocument has started routing.
 boolean isFinancialObjectSubTypeCodeChanged(Asset oldAsset, Asset newAsset)
          Test if financialObjectSubTypeCode is changed.
 boolean isInServiceDateChanged(Asset oldAsset, Asset newAsset)
           
 boolean isObjectSubTypeCompatible(List<String> financialObjectSubTypeCode)
          This will check if the list of financial object sub type code are compatible with each other.
 boolean isOffCampusLocationEntered(Asset asset)
          Test if any of the off campus location field is entered.
 boolean isTagNumberCheckExclude(Asset asset)
          The Tag Number check excludes value of "N" and retired assets.
 void setAssetSummaryFields(Asset asset)
          This method calls the service codes to calculate the summary fields for each asset
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
           
 void setFiscalPeriod(Asset asset)
          sets the posting year and posting month based on the asset creation date
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
           
 void setPaymentSummaryService(PaymentSummaryService paymentSummaryService)
           
 void setSeparateHistory(Asset asset)
          For the given Asset sets the separateHistory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static org.apache.log4j.Logger LOG
Constructor Detail

AssetServiceImpl

public AssetServiceImpl()
Method Detail

getParameterService

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

setParameterService

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

isAssetMovableCheckByAsset

public boolean isAssetMovableCheckByAsset(Asset asset)
Specified by:
isAssetMovableCheckByAsset in interface AssetService

isAssetDepreciationStarted

public boolean isAssetDepreciationStarted(Asset asset)
Description copied from interface: AssetService
Check if asset has started depreciation already.

Specified by:
isAssetDepreciationStarted in interface AssetService
Returns:
See Also:
AssetService.isAssetDepreciationStarted(org.kuali.kfs.module.cam.businessobject.Asset)

isCapitalAsset

public boolean isCapitalAsset(Asset asset)
Specified by:
isCapitalAsset in interface AssetService

isAssetRetired

public boolean isAssetRetired(Asset asset)
Specified by:
isAssetRetired in interface AssetService

isInServiceDateChanged

public boolean isInServiceDateChanged(Asset oldAsset,
                                      Asset newAsset)
Specified by:
isInServiceDateChanged in interface AssetService

isAssetFabrication

public boolean isAssetFabrication(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument)
Specified by:
isAssetFabrication in interface AssetService
Returns:
if MaintenanceDocument is an asset fabrication or not
See Also:
AssetService.isAssetFabrication(org.kuali.rice.kns.document.MaintenanceDocument)

isAssetLoaned

public boolean isAssetLoaned(Asset asset)
Specified by:
isAssetLoaned in interface AssetService
Returns:
if the asset is on loan or not
See Also:
AssetService.isAssetLoaned(org.kuali.kfs.module.cam.businessobject.Asset)

isAssetTaggedInPriorFiscalYear

public boolean isAssetTaggedInPriorFiscalYear(Asset asset)
Description copied from interface: AssetService
The Asset Type Code is allowed to be changed only: (1)If the tag number has not been assigned or (2)The asset is tagged, and the asset created in the current fiscal year

Specified by:
isAssetTaggedInPriorFiscalYear in interface AssetService
Returns:
See Also:
AssetService.isAssetTaggedInPriorFiscalYear(org.kuali.kfs.module.cam.businessobject.Asset)

isTagNumberCheckExclude

public boolean isTagNumberCheckExclude(Asset asset)
Description copied from interface: AssetService
The Tag Number check excludes value of "N" and retired assets.

Specified by:
isTagNumberCheckExclude in interface AssetService
Returns:
See Also:
AssetService.isTagNumberCheckExclude(org.kuali.kfs.module.cam.businessobject.Asset)

isOffCampusLocationEntered

public boolean isOffCampusLocationEntered(Asset asset)
Description copied from interface: AssetService
Test if any of the off campus location field is entered.

Specified by:
isOffCampusLocationEntered in interface AssetService
Returns:
See Also:
AssetService.isOffCampusLocationEntered(org.kuali.kfs.module.cam.businessobject.Asset)

isFinancialObjectSubTypeCodeChanged

public boolean isFinancialObjectSubTypeCodeChanged(Asset oldAsset,
                                                   Asset newAsset)
Description copied from interface: AssetService
Test if financialObjectSubTypeCode is changed.

Specified by:
isFinancialObjectSubTypeCodeChanged in interface AssetService
Returns:
See Also:
AssetService.isFinancialObjectSubTypeCodeChanged(org.kuali.kfs.module.cam.businessobject.Asset, org.kuali.kfs.module.cam.businessobject.Asset)

isAssetTypeCodeChanged

public boolean isAssetTypeCodeChanged(Asset oldAsset,
                                      Asset newAsset)
Description copied from interface: AssetService
Test if assetTypeCode is changed.

Specified by:
isAssetTypeCodeChanged in interface AssetService
Returns:
See Also:
AssetService.isAssetTypeCodeChanged(org.kuali.kfs.module.cam.businessobject.Asset, org.kuali.kfs.module.cam.businessobject.Asset)

isAssetDepreciableLifeLimitZero

public boolean isAssetDepreciableLifeLimitZero(Asset asset)
Description copied from interface: AssetService
Test if Depreciable Life Limit is "0" This method...

Specified by:
isAssetDepreciableLifeLimitZero in interface AssetService
Returns:

isCapitalAssetNumberDuplicate

public boolean isCapitalAssetNumberDuplicate(Long capitalAssetNumber1,
                                             Long capitalAssetNumber2)
Description copied from interface: AssetService
Test two capitalAssetNumber equal.

Specified by:
isCapitalAssetNumberDuplicate in interface AssetService
Returns:
See Also:
AssetService.isCapitalAssetNumberDuplicate(java.lang.Long, java.lang.Long)

setAssetSummaryFields

public void setAssetSummaryFields(Asset asset)
This method calls the service codes to calculate the summary fields for each asset

Specified by:
setAssetSummaryFields in interface AssetService
Parameters:
asset -

getPaymentSummaryService

public PaymentSummaryService getPaymentSummaryService()

setPaymentSummaryService

public void setPaymentSummaryService(PaymentSummaryService paymentSummaryService)

isAssetMovableCheckByPayment

public boolean isAssetMovableCheckByPayment(String financialObjectSubTypeCode)
Description copied from interface: AssetService
This will check the financial object sub type code in system parameters
  • return TRUE if found in MOVABLE_EQUIPMENT_OBJECT_SUB_TYPE_CODES
  • return FALSE if found in NON_MOVABLE_EQUIPMENT_OBJECT_SUB_TYPE_CODES
  • throw ValidationException if not defined in neither one of them
  • Specified by:
    isAssetMovableCheckByPayment in interface AssetService
    Returns:
    boolean
    See Also:
    org.kuali.kfs.module.cam.document.service.AssetService#isMovableFinancialObjectSubtypeCode(java.lang.String)

    findActiveAssetsMatchingTagNumber

    public List<Asset> findActiveAssetsMatchingTagNumber(String campusTagNumber)
    Description copied from interface: AssetService
    This method returns all active assets found matching this tab number

    Specified by:
    findActiveAssetsMatchingTagNumber in interface AssetService
    Parameters:
    campusTagNumber - Campus Tag Number
    Returns:
    List of assets found matching tag number

    findAssetsMatchingTagNumber

    public Collection<Asset> findAssetsMatchingTagNumber(String campusTagNumber)
    Description copied from interface: AssetService
    This method returns all active and not active assets found matching this tab number

    Specified by:
    findAssetsMatchingTagNumber in interface AssetService
    Parameters:
    campusTagNumber - Campus Tag Number
    Returns:
    List of assets found matching tag number
    See Also:
    AssetService.findAssetsMatchingTagNumber(java.lang.String)

    isObjectSubTypeCompatible

    public boolean isObjectSubTypeCompatible(List<String> financialObjectSubTypeCode)
    Description copied from interface: AssetService
    This will check if the list of financial object sub type code are compatible with each other.
  • return TRUE if all Object sub type code are compatible with each other.
  • return FALSE if any non copatible object sub type code are found.

    Specified by:
    isObjectSubTypeCompatible in interface AssetService
    Returns:
    See Also:
    AssetService.isObjectSubTypeCompatible(java.util.List)

  • setSeparateHistory

    public void setSeparateHistory(Asset asset)
    Description copied from interface: AssetService
    For the given Asset sets the separateHistory.

    Specified by:
    setSeparateHistory in interface AssetService
    Parameters:
    asset - for which to set the separateHistory
    See Also:
    AssetService.setSeparateHistory(org.kuali.kfs.module.cam.businessobject.Asset)

    getDocumentNumbersThatSeparatedThisAsset

    public List<String> getDocumentNumbersThatSeparatedThisAsset(Long capitalAssetNumber)
    Specified by:
    getDocumentNumbersThatSeparatedThisAsset in interface AssetService
    Parameters:
    capitalAssetNumber - to check whether it got separated
    Returns:
    the list of document numbers that separated the particular asset
    See Also:
    org.kuali.kfs.module.cam.document.service.AssetService#getDocumentNumberThatSeparatedThisAsset(java.lang.Long)

    setFiscalPeriod

    public void setFiscalPeriod(Asset asset)
    sets the posting year and posting month based on the asset creation date

    Specified by:
    setFiscalPeriod in interface AssetService
    Parameters:
    asset -

    setBusinessObjectService

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

    getCurrentRouteLevels

    public List<String> getCurrentRouteLevels(org.kuali.rice.kns.workflow.service.KualiWorkflowDocument workflowDocument)
    Description copied from interface: AssetService
    A helper method for determining the route levels for a given document.

    Specified by:
    getCurrentRouteLevels in interface AssetService
    Returns:
    List
    See Also:
    AssetService.getCurrentRouteLevels(org.kuali.rice.kns.workflow.service.KualiWorkflowDocument)

    isDocumentEnrouting

    public boolean isDocumentEnrouting(org.kuali.rice.kns.document.Document document)
    Description copied from interface: AssetService
    Checks if given mainenanceDocument has started routing.

    Specified by:
    isDocumentEnrouting in interface AssetService
    Returns:
    See Also:
    org.kuali.kfs.module.cam.document.service.AssetService#isMaintenanceDocumentEnroute(org.kuali.rice.kns.document.MaintenanceDocument)


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