public class OrganizationServiceImpl extends Object implements OrganizationService
Modifier and Type | Field and Description |
---|---|
protected org.kuali.rice.krad.service.BusinessObjectService |
boService |
protected ChartService |
chartService |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
protected Map<ChartOrgHolderImpl,ChartOrgHolderImpl> |
parentOrgCache |
Constructor and Description |
---|
OrganizationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
flushParentOrgCache()
Flushes an internal cache used to resolve parent organizations.
|
List<Account> |
getActiveAccountsByOrg(String chartOfAccountsCode,
String organizationCode)
Retrieves a List of Accounts that are active, and are tied to this Org.
|
List<Organization> |
getActiveChildOrgs(String chartOfAccountsCode,
String organizationCode)
Retrieves a List of Orgs that are active, and that ReportTo this Org If there are no Orgs that meet this criteria, an empty
list will be returned.
|
List<Organization> |
getActiveFinancialOrgs()
Returns a list of active financial processing organizations.
|
List<Organization> |
getActiveOrgsByType(String organizationTypeCode)
Returns a list of active organizations with the given organization type code.
|
Organization |
getByPrimaryId(String chartOfAccountsCode,
String organizationCode)
This method retrieves an organization instance by its composite primary keys (parameters passed in).
|
Organization |
getByPrimaryIdWithCaching(String chartOfAccountsCode,
String organizationCode)
Implements the getByPrimaryId method defined by OrganizationService.
|
String[] |
getRootOrganizationCode()
TODO: refactor me to a ChartOrgHolder
|
protected boolean |
isParentOrganization_Internal(ChartOrgHolderImpl currOrg,
ChartOrgHolderImpl desiredParentOrg,
List<ChartOrgHolderImpl> traversedOrgs)
This helper method handles the case where there might be cycles in the data.
|
boolean |
isParentOrganization(String childChartOfAccountsCode,
String childOrganizationCode,
String parentChartOfAccountsCode,
String parentOrganizationCode)
This method traverses the hierarchy to see if the organization represented by the potentialChildChartCode and potentialChildOrganizationCode
reports to the organization represented by the potentialParentChartCode and potentialParentOrganizationCode
|
protected void |
loadParentOrgCache() |
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService boService) |
void |
setChartService(ChartService chartService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected ChartService chartService
protected org.kuali.rice.krad.service.BusinessObjectService boService
protected Map<ChartOrgHolderImpl,ChartOrgHolderImpl> parentOrgCache
public OrganizationServiceImpl()
public Organization getByPrimaryId(String chartOfAccountsCode, String organizationCode)
OrganizationService
getByPrimaryId
in interface OrganizationService
OrganizationService.getByPrimaryId(java.lang.String, java.lang.String)
@Cacheable(value="OLE/Organization", key="#p0+\'-\'+#p1") public Organization getByPrimaryIdWithCaching(String chartOfAccountsCode, String organizationCode)
getByPrimaryIdWithCaching
in interface OrganizationService
getByPrimaryId(java.lang.String, java.lang.String)
public List<Account> getActiveAccountsByOrg(String chartOfAccountsCode, String organizationCode)
OrganizationService
getActiveAccountsByOrg
in interface OrganizationService
chartOfAccountsCode
- - chartCode for the Org you want Accounts fororganizationCode
- - orgCode for the Org you want Accounts forOrganizationService.getActiveAccountsByOrg(java.lang.String, java.lang.String)
public List<Organization> getActiveChildOrgs(String chartOfAccountsCode, String organizationCode)
OrganizationService
getActiveChildOrgs
in interface OrganizationService
chartOfAccountsCode
- - chartCode for the Org you want Child Orgs fororganizationCode
- - orgCode for the Org you want Child Orgs forOrganizationService.getActiveChildOrgs(java.lang.String, java.lang.String)
protected void loadParentOrgCache()
public void flushParentOrgCache()
OrganizationService
flushParentOrgCache
in interface OrganizationService
public boolean isParentOrganization(String childChartOfAccountsCode, String childOrganizationCode, String parentChartOfAccountsCode, String parentOrganizationCode)
OrganizationService
isParentOrganization
in interface OrganizationService
protected boolean isParentOrganization_Internal(ChartOrgHolderImpl currOrg, ChartOrgHolderImpl desiredParentOrg, List<ChartOrgHolderImpl> traversedOrgs)
public List<Organization> getActiveOrgsByType(String organizationTypeCode)
OrganizationService
getActiveOrgsByType
in interface OrganizationService
OrganizationService.getActiveOrgsByType(java.lang.String)
public List<Organization> getActiveFinancialOrgs()
OrganizationService
getActiveFinancialOrgs
in interface OrganizationService
OrganizationService.getActiveFinancialOrgs()
public String[] getRootOrganizationCode()
getRootOrganizationCode
in interface OrganizationService
OrganizationService.getRootOrganizationCode()
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService boService)
public void setChartService(ChartService chartService)
Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.