org.kuali.kfs.coa.service.impl
Class AccountDelegateServiceImpl

java.lang.Object
  extended by org.kuali.kfs.coa.service.impl.AccountDelegateServiceImpl
All Implemented Interfaces:
AccountDelegateService

public class AccountDelegateServiceImpl
extends Object
implements AccountDelegateService

The default implementation of AccountDelegateService.


Constructor Summary
AccountDelegateServiceImpl()
           
 
Method Summary
 FinancialSystemMaintainable buildMaintainableForAccountDelegate(AccountDelegate delegate)
          Builds an appropriate maintainable with the given account delegate as the business object
 AccountDelegateDao getAccountDelegateDao()
          Gets the accountDelegateDao attribute.
 AccountDelegateGlobalDao getAccountDelegateGlobalDao()
          Gets the accountDelegateGlobalDao attribute.
protected  FinancialSystemMaintainable getAccountDelegateMaintainable()
           
protected  Class<? extends org.kuali.rice.kns.maintenance.Maintainable> getAccountDelegateMaintainableClass()
           
 org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          Gets the businessObjectService attribute.
 org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
          Gets the dataDictionaryService attribute.
 String getLockingDocumentId(AccountDelegateGlobalMaintainableImpl global, String docNumber)
          This method checks for any MaintenanceLocks that would block the creation of this document
 String getLockingDocumentId(AccountDelegateMaintainableImpl delegate, String docNumber)
          This method checks for any MaintenanceLocks that would block the creation of this document
 boolean isPrincipalInAnyWayShapeOrFormPrimaryAccountDelegate(String principalId)
          Determines if the given principal is an active delegate for any non-closed account
 boolean isPrincipalInAnyWayShapeOrFormSecondaryAccountDelegate(String principalId)
          Determines if the given principal is an active delegate for any non-closed account
 Iterator<AccountDelegate> retrieveAllActiveDelegationsForPerson(String principalId, boolean primary)
          Retrieves all active account delegations which delegate to the given Person
 void saveChangesForGlobalMaintenanceDocument(List<org.kuali.rice.kns.bo.PersistableBusinessObject> delegatesToChange)
          Persists the given account delegate global maintenance document changes
 void saveForMaintenanceDocument(AccountDelegate accountDelegate)
          Saves the given account delegate to the persistence store
 void saveInactivationsForGlobalMaintenanceDocument(List<org.kuali.rice.kns.bo.PersistableBusinessObject> delegatesToInactivate)
          Persists the given account delegate global maintenance document inactivations
 void setAccountDelegateDao(AccountDelegateDao accountDelegateDao)
          Sets the accountDelegateDao attribute value.
 void setAccountDelegateGlobalDao(AccountDelegateGlobalDao accountDelegateGlobalDao)
          Sets the accountDelegateGlobalDao attribute value.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
          Sets the dataDictionaryService attribute value.
 void updateDelegationRole()
          Updates the role that this delegate is part of, to account for the changes in this delegate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountDelegateServiceImpl

public AccountDelegateServiceImpl()
Method Detail

getLockingDocumentId

public String getLockingDocumentId(AccountDelegateGlobalMaintainableImpl global,
                                   String docNumber)
Description copied from interface: AccountDelegateService
This method checks for any MaintenanceLocks that would block the creation of this document

Specified by:
getLockingDocumentId in interface AccountDelegateService
Parameters:
global - The AccountDelegateGlobalMaintainableImpl to check against.
docNumber - The document number of the AccountDelegateGlobalMaintainableImpl in question.
Returns:
the documentNumber of the locking record or null if none.
See Also:
AccountDelegateService.getLockingDocumentId(org.kuali.kfs.coa.document.AccountDelegateGlobalMaintainableImpl, java.lang.String)

getLockingDocumentId

public String getLockingDocumentId(AccountDelegateMaintainableImpl delegate,
                                   String docNumber)
Description copied from interface: AccountDelegateService
This method checks for any MaintenanceLocks that would block the creation of this document

Specified by:
getLockingDocumentId in interface AccountDelegateService
Parameters:
delegate - The AccountDelegateMaintainableImpl to check against.
docNumber - The document number of the AccountDelegateMaintainableImpl in question.
Returns:
the documentNumber of the locking record or null if none.
See Also:
AccountDelegateService.getLockingDocumentId(org.kuali.kfs.coa.document.AccountDelegateMaintainableImpl, java.lang.String)

buildMaintainableForAccountDelegate

public FinancialSystemMaintainable buildMaintainableForAccountDelegate(AccountDelegate delegate)
Description copied from interface: AccountDelegateService
Builds an appropriate maintainable with the given account delegate as the business object

Specified by:
buildMaintainableForAccountDelegate in interface AccountDelegateService
Parameters:
delegate - the account delegate to wrap in a maintainable
Returns:
an appropriate maintainable
See Also:
AccountDelegateService.buildMaintainableForAccountDelegate(org.kuali.kfs.coa.businessobject.AccountDelegate)

getAccountDelegateMaintainableClass

protected Class<? extends org.kuali.rice.kns.maintenance.Maintainable> getAccountDelegateMaintainableClass()
Returns:
the proper class for the Maintainable associated with AccountDelegate maintenance documents

getAccountDelegateMaintainable

protected FinancialSystemMaintainable getAccountDelegateMaintainable()
Returns:
a new instance of the proper maintainable for AccountDelegate maintenance documents

retrieveAllActiveDelegationsForPerson

public Iterator<AccountDelegate> retrieveAllActiveDelegationsForPerson(String principalId,
                                                                       boolean primary)
Description copied from interface: AccountDelegateService
Retrieves all active account delegations which delegate to the given Person

Specified by:
retrieveAllActiveDelegationsForPerson in interface AccountDelegateService
Parameters:
principalId - a principal id of the person to find account delegations for
primary - whether the account delegates returned should be primary or not
Returns:
a List of AccountDelegate business objects, representing that person's delegations
See Also:
org.kuali.kfs.coa.service.AccountDelegateService#retrieveAllActiveDelegationsForPerson(java.lang.String)

isPrincipalInAnyWayShapeOrFormPrimaryAccountDelegate

public boolean isPrincipalInAnyWayShapeOrFormPrimaryAccountDelegate(String principalId)
Description copied from interface: AccountDelegateService
Determines if the given principal is an active delegate for any non-closed account

Specified by:
isPrincipalInAnyWayShapeOrFormPrimaryAccountDelegate in interface AccountDelegateService
Parameters:
principalId - the principal ID to check primary account delegations for
Returns:
true if the principal is a primary account delegate, false otherwise
See Also:
AccountDelegateService.isPrincipalInAnyWayShapeOrFormPrimaryAccountDelegate(java.lang.String)

isPrincipalInAnyWayShapeOrFormSecondaryAccountDelegate

public boolean isPrincipalInAnyWayShapeOrFormSecondaryAccountDelegate(String principalId)
Description copied from interface: AccountDelegateService
Determines if the given principal is an active delegate for any non-closed account

Specified by:
isPrincipalInAnyWayShapeOrFormSecondaryAccountDelegate in interface AccountDelegateService
Parameters:
principalId - the principal ID to check secondary account delegations for
Returns:
true if the principal is a secondary account delegate, false otherwise
See Also:
AccountDelegateService.isPrincipalInAnyWayShapeOrFormSecondaryAccountDelegate(java.lang.String)

saveForMaintenanceDocument

@Transactional(propagation=REQUIRES_NEW)
public void saveForMaintenanceDocument(AccountDelegate accountDelegate)
Saves the given account delegate to the persistence store

Specified by:
saveForMaintenanceDocument in interface AccountDelegateService
Parameters:
accountDelegate - the account delegate to save

saveInactivationsForGlobalMaintenanceDocument

@Transactional(propagation=REQUIRES_NEW)
public void saveInactivationsForGlobalMaintenanceDocument(List<org.kuali.rice.kns.bo.PersistableBusinessObject> delegatesToInactivate)
Persists the given account delegate global maintenance document inactivations

Specified by:
saveInactivationsForGlobalMaintenanceDocument in interface AccountDelegateService
Parameters:
delegatesToInactivate - the List of delegates to inactivate

saveChangesForGlobalMaintenanceDocument

@Transactional(propagation=REQUIRES_NEW)
public void saveChangesForGlobalMaintenanceDocument(List<org.kuali.rice.kns.bo.PersistableBusinessObject> delegatesToChange)
Persists the given account delegate global maintenance document changes

Specified by:
saveChangesForGlobalMaintenanceDocument in interface AccountDelegateService
Parameters:
delegatesToChange - the List of delegates to change

updateDelegationRole

@Transactional
public void updateDelegationRole()
Updates the role that this delegate is part of, to account for the changes in this delegate

Specified by:
updateDelegationRole in interface AccountDelegateService

getAccountDelegateDao

public AccountDelegateDao getAccountDelegateDao()
Gets the accountDelegateDao attribute.

Returns:
Returns the accountDelegateDao.

setAccountDelegateDao

public void setAccountDelegateDao(AccountDelegateDao accountDelegateDao)
Sets the accountDelegateDao attribute value.

Parameters:
accountDelegateDao - The accountDelegateDao to set.

getAccountDelegateGlobalDao

public AccountDelegateGlobalDao getAccountDelegateGlobalDao()
Gets the accountDelegateGlobalDao attribute.

Returns:
Returns the accountDelegateGlobalDao.

setAccountDelegateGlobalDao

public void setAccountDelegateGlobalDao(AccountDelegateGlobalDao accountDelegateGlobalDao)
Sets the accountDelegateGlobalDao attribute value.

Parameters:
accountDelegateGlobalDao - The accountDelegateGlobalDao to set.

getDataDictionaryService

public org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
Gets the dataDictionaryService attribute.

Returns:
Returns the dataDictionaryService.

setDataDictionaryService

public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Sets the dataDictionaryService attribute value.

Parameters:
dataDictionaryService - The dataDictionaryService 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.


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