public class AccountServiceImpl extends Object implements AccountService
Modifier and Type | Field and Description |
---|---|
protected AccountDao |
accountDao |
protected org.kuali.rice.krad.service.BusinessObjectService |
businessObjectService |
protected org.kuali.rice.core.api.datetime.DateTimeService |
dateTimeService |
protected org.kuali.rice.kew.api.doctype.DocumentTypeService |
documentTypeService |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
Constructor and Description |
---|
AccountServiceImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
accountsCanCrossCharts()
Returns true if parameter ACCOUNTS_CAN_CROSS_CHARTS_IND is set to "Y"; otherwise false.
|
protected List<AccountDelegate> |
filterAccountDelegates(AccountDelegate delegateExample,
List<AccountDelegate> accountDelegatesToFilterFrom)
This method filters account delegates by
1) performing an exact match on the document type name of delegateExample
2) if no match is found for 1), then by performing an exact match on
the closest parent document type name of delegateExample document type name.
|
protected List<AccountDelegate> |
filterAccountDelegates(List<AccountDelegate> delegations,
String documentTypeNameToFilterOn)
This method filters account delegates by performing an exact match on the document type name passed in.
|
Collection<Account> |
getAccountsForAccountNumber(String accountNumber)
Returns the accounts associated with a given account number
|
List |
getAccountsThatUserIsResponsibleFor(org.kuali.rice.kim.api.identity.Person person)
Fetches the accounts that the user is either the fiscal officer or fiscal officer delegate for.
|
Iterator<Account> |
getActiveAccountsForAccountSupervisor(String principalId)
Retrieves all active accounts from the database where the given principal is the account supervisor
|
Iterator<Account> |
getActiveAccountsForFiscalOfficer(String principalId)
Retrieves all active accounts from the database where the given principal is the fiscal officer
|
Iterator |
getAllAccounts()
get all accounts in the system.
|
Account |
getByPrimaryId(String chartOfAccountsCode,
String accountNumber)
Retrieves an Account object based on primary key.
|
Account |
getByPrimaryIdWithCaching(String chartOfAccountsCode,
String accountNumber)
Method is used by KualiAccountAttribute to enable caching of accounts for routing.
|
String |
getDefaultLaborBenefitRateCategoryCodeForAccountType(String accountTypeCode)
Retrieves the default labor benefit rate category code based on account type code.
|
Iterator<Account> |
getExpiredAccountsForAccountSupervisor(String principalId)
Retrieves all active accounts from the database where the given principal is the account supervisor
|
Iterator<Account> |
getExpiredAccountsForFiscalOfficer(String principalId)
Retrieves all expired accounts from the database where the given principal is the fiscal officer
|
protected Set<String> |
getPotentialParentDocumentTypeNames(List<AccountDelegate> delegations)
This method gets a list of potential parent document type names by collecting the unique doc type names from the list of
account delegations
|
AccountDelegate |
getPrimaryDelegationByExample(AccountDelegate delegateExample,
String totalDollarAmount)
This method retrieves the fiscal officers primary delegate based on the chart, account, and document type specified on the
example, along with the total dollar amount
|
List |
getSecondaryDelegationsByExample(AccountDelegate delegateExample,
String totalDollarAmount)
This method retrieves the fiscal officers secondary delegates based on the chart, account, and document type specified on the
example, along with the total dollar amount
|
Account |
getUniqueAccountForAccountNumber(String accountNumber)
Returns the unique account associated with a given account number.
|
boolean |
hasResponsibilityOnAccount(org.kuali.rice.kim.api.identity.Person kualiUser,
Account account)
Does the given user have responsibilities on the given account?
|
Boolean |
isFridgeBenefitCalculationEnable()
Retrieve the from the parameter if ENABLE_FRINGE_BENEFIT_CALC_BY_BENEFIT_RATE_CATEGORY_IND
is enabled
Default to Boolean.FALSE if it cannot be evaluated or parameter is not defined
|
boolean |
isPrincipalInAnyWayShapeOrFormAccountManager(String principalId)
Determines if the given principal is the account manager of any non-closed account
|
boolean |
isPrincipalInAnyWayShapeOrFormAccountSupervisor(String principalId)
Determines if the given principal is the account supervisor of any non-closed account
|
boolean |
isPrincipalInAnyWayShapeOrFormFiscalOfficer(String principalId)
Determines if the given principal is the fiscal officer of any non-closed account
|
void |
populateAccountingLineChartIfNeeded(AccountingLine line) |
void |
setAccountDao(AccountDao accountDao) |
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) |
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService) |
void |
setDocumentTypeService(org.kuali.rice.kew.api.doctype.DocumentTypeService documentTypeService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected AccountDao accountDao
protected org.kuali.rice.core.api.datetime.DateTimeService dateTimeService
protected org.kuali.rice.kew.api.doctype.DocumentTypeService documentTypeService
protected org.kuali.rice.krad.service.BusinessObjectService businessObjectService
public AccountServiceImpl()
@Cacheable(value="OLE/Account", key="#p0+\'-\'+#p1") public Account getByPrimaryId(String chartOfAccountsCode, String accountNumber)
getByPrimaryId
in interface AccountService
chartOfAccountsCode
- - Chart of Accounts CodeaccountNumber
- - Account NumberAccountService
@Cacheable(value="OLE/Account", key="#p0+\'-\'+#p1") public Account getByPrimaryIdWithCaching(String chartOfAccountsCode, String accountNumber)
getByPrimaryIdWithCaching
in interface AccountService
getByPrimaryId(java.lang.String, java.lang.String)
@Cacheable(value="OLE/Account", key="\'ResponsibleForAccounts\'+#p0.principalId") public List getAccountsThatUserIsResponsibleFor(org.kuali.rice.kim.api.identity.Person person)
AccountService
getAccountsThatUserIsResponsibleFor
in interface AccountService
org.kuali.ole.coa.service.AccountService#getAccountsThatUserIsResponsibleFor(org.kuali.bo.user.KualiUser)
@Cacheable(value="OLE/Account", key="\'ResponsibilityOnAccount\'+#p0.principalId+\'-\'+#p1.chartOfAccountsCode+\'-\'+#p1.accountNumber") public boolean hasResponsibilityOnAccount(org.kuali.rice.kim.api.identity.Person kualiUser, Account account)
AccountService
hasResponsibilityOnAccount
in interface AccountService
kualiUser
- the universal user to check responsibilities foraccount
- the account to check responsibilities onAccountService.hasResponsibilityOnAccount(org.kuali.rice.kim.api.identity.Person,
org.kuali.ole.coa.businessobject.Account)
public AccountDelegate getPrimaryDelegationByExample(AccountDelegate delegateExample, String totalDollarAmount)
AccountService
getPrimaryDelegationByExample
in interface AccountService
delegateExample
- The object that contains the chart, account, and document type that should be used to query the
account delegate tabletotalDollarAmount
- The amount that should be compared to the from and to amount on the account delegate tableAccountService.getPrimaryDelegationByExample(org.kuali.ole.coa.businessobject.AccountDelegate,
java.lang.String)
public List getSecondaryDelegationsByExample(AccountDelegate delegateExample, String totalDollarAmount)
AccountService
getSecondaryDelegationsByExample
in interface AccountService
delegateExample
- The object that contains the chart, account, and document type that should be used to query the
account delegate tabletotalDollarAmount
- The amount that should be compared to the from and to amount on the account delegate tableAccountService.getSecondaryDelegationsByExample(org.kuali.ole.coa.businessobject.AccountDelegate,
java.lang.String)
protected List<AccountDelegate> filterAccountDelegates(AccountDelegate delegateExample, List<AccountDelegate> accountDelegatesToFilterFrom)
delegateExample
- accountDelegatesToFilterFrom
- protected List<AccountDelegate> filterAccountDelegates(List<AccountDelegate> delegations, String documentTypeNameToFilterOn)
delegations
- documentTypeNameToFilterOn
- protected Set<String> getPotentialParentDocumentTypeNames(List<AccountDelegate> delegations)
delegations
- public Iterator getAllAccounts()
getAllAccounts
in interface AccountService
public Iterator<Account> getActiveAccountsForAccountSupervisor(String principalId)
AccountService
getActiveAccountsForAccountSupervisor
in interface AccountService
principalId
- the principal id of the account supervisorAccountService.getActiveAccountsForAccountSupervisor(java.lang.String)
public Iterator<Account> getActiveAccountsForFiscalOfficer(String principalId)
AccountService
getActiveAccountsForFiscalOfficer
in interface AccountService
principalId
- the principal id of the fiscal officerAccountService.getActiveAccountsForFiscalOfficer(java.lang.String)
public Iterator<Account> getExpiredAccountsForAccountSupervisor(String principalId)
AccountService
getExpiredAccountsForAccountSupervisor
in interface AccountService
principalId
- the principal id of the account supervisorAccountService.getExpiredAccountsForAccountSupervisor(java.lang.String)
public Iterator<Account> getExpiredAccountsForFiscalOfficer(String principalId)
AccountService
getExpiredAccountsForFiscalOfficer
in interface AccountService
principalId
- the principal id of the fiscal officerAccountService.getExpiredAccountsForFiscalOfficer(java.lang.String)
public boolean isPrincipalInAnyWayShapeOrFormAccountManager(String principalId)
AccountService
isPrincipalInAnyWayShapeOrFormAccountManager
in interface AccountService
principalId
- the principal to check for the account manager roleAccountService.isPrincipalInAnyWayShapeOrFormAccountManager(java.lang.String)
public boolean isPrincipalInAnyWayShapeOrFormAccountSupervisor(String principalId)
AccountService
isPrincipalInAnyWayShapeOrFormAccountSupervisor
in interface AccountService
principalId
- the principal to check for the account supervisor roleAccountService.isPrincipalInAnyWayShapeOrFormAccountSupervisor(java.lang.String)
public boolean isPrincipalInAnyWayShapeOrFormFiscalOfficer(String principalId)
AccountService
isPrincipalInAnyWayShapeOrFormFiscalOfficer
in interface AccountService
principalId
- the principal to check for the fiscal officer roleAccountService.isPrincipalInAnyWayShapeOrFormFiscalOfficer(java.lang.String)
@Cacheable(value="OLE/Account", key="\'AccountsForAccountNumber\'+#p0") public Collection<Account> getAccountsForAccountNumber(String accountNumber)
AccountService
getAccountsForAccountNumber
in interface AccountService
accountNumber
- the account numberAccountService.getAccountsForAccountNumber(java.lang.String)
public String getDefaultLaborBenefitRateCategoryCodeForAccountType(String accountTypeCode)
AccountService
getDefaultLaborBenefitRateCategoryCodeForAccountType
in interface AccountService
accountTypeCode
- - The Account Type Code to find the default value forpublic Boolean isFridgeBenefitCalculationEnable()
AccountService
isFridgeBenefitCalculationEnable
in interface AccountService
AccountService.isFridgeBenefitCalculationEnable()
@Cacheable(value="OLE/Account", key="\'UniqueAccountForAccountNumber\'+#p0") public Account getUniqueAccountForAccountNumber(String accountNumber)
AccountService
getUniqueAccountForAccountNumber
in interface AccountService
accountNumber
- the account numberAccountService.getUniqueAccountForAccountNumber(java.lang.String)
public boolean accountsCanCrossCharts()
AccountService
accountsCanCrossCharts
in interface AccountService
AccountService.accountsCanCrossCharts()
public void populateAccountingLineChartIfNeeded(AccountingLine line)
populateAccountingLineChartIfNeeded
in interface AccountService
AccountService.accountsCanCrossCharts()
public void setAccountDao(AccountDao accountDao)
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
public void setDocumentTypeService(org.kuali.rice.kew.api.doctype.DocumentTypeService documentTypeService)
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.