@Transactional public class FiscalYearMakerServiceImpl extends Object implements FiscalYearMakerService
org.kuali.ole.coa.batch.service.FiscalYearMakerService
Modifier and Type | Field and Description |
---|---|
protected List<FiscalYearMaker> |
fiscalYearMakers |
protected FiscalYearMakersDao |
fiscalYearMakersDao |
protected org.kuali.rice.krad.service.KualiModuleService |
kualiModuleService |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
Constructor and Description |
---|
FiscalYearMakerServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkChildrenForParentReference(Class<? extends FiscalYearBasedBusinessObject> parent,
Set<Class<? extends FiscalYearBasedBusinessObject>> children,
Map<Class<? extends FiscalYearBasedBusinessObject>,Set<Class<? extends FiscalYearBasedBusinessObject>>> parentChildren,
Set<Class<? extends FiscalYearBasedBusinessObject>> checkedParents)
Recursively checks all children of children who are parents for reference to the given parent class
|
protected void |
findCircularReferenceAndThrowException(Map<Class<? extends FiscalYearBasedBusinessObject>,Set<Class<? extends FiscalYearBasedBusinessObject>>> parentChildren)
Finds circular references (class which is a child to itself) and throws exception indicating the invalid parent-child
configuration
|
protected Set<Class<? extends FiscalYearBasedBusinessObject>> |
getChildren(Map<Class<? extends FiscalYearBasedBusinessObject>,Set<Class<? extends FiscalYearBasedBusinessObject>>> parentChildren)
Gets all classes that are child of another class in the given Map
|
protected List<FiscalYearMaker> |
getFiscalYearMakerHelpersInCopyOrder()
Returns List of
FiscalYearMaker objects in the order they should be copied. |
protected List<FiscalYearMaker> |
getFiscalYearMakerHelpersInDeleteOrder(List<FiscalYearMaker> fiscalYearMakerHelpersCopyOrder)
Returns List of
FiscalYearMaker objects in the order they should be deleted. |
protected Map<Class<? extends FiscalYearBasedBusinessObject>,FiscalYearMaker> |
getFiscalYearMakerMap()
Helper method to build a Map with the copy class as the key and its corresponding
FiscalYearMaker as the Map
value |
protected List<FiscalYearMaker> |
getFiscalYearMakers()
Gets the fiscalYearMakers attribute.
|
protected FiscalYearMakersDao |
getFiscalYearMakersDao()
Gets the fiscalYearMakersDao attribute.
|
protected org.kuali.rice.krad.service.KualiModuleService |
getKualiModuleService()
Gets the kualiModuleService attribute.
|
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
getParameterService()
Gets the parameterService attribute.
|
protected Map<Class<? extends FiscalYearBasedBusinessObject>,Set<Class<? extends FiscalYearBasedBusinessObject>>> |
getParentChildrenMap()
Helper method to build a Map with Parent classes as the key and their Set of child classes as the value
|
void |
initialize()
Populates the fiscal year maker list from the installed modules
|
protected boolean |
isParentClass(Class<? extends FiscalYearBasedBusinessObject> businessObjectClass)
Checks if the given class is a parent (to at least one other class)
|
void |
runProcess()
Runs the fiscal year maker process for the configured base year
|
protected void |
setFiscalYearMakers(List<FiscalYearMaker> fiscalYearMakers)
Sets the fiscalYearMakers attribute value.
|
void |
setFiscalYearMakersDao(FiscalYearMakersDao fiscalYearMakersDao)
Sets the fiscalYearMakersDao attribute value.
|
void |
setKualiModuleService(org.kuali.rice.krad.service.KualiModuleService kualiModuleService)
Sets the kualiModuleService attribute value.
|
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Sets the parameterService attribute value.
|
protected void |
validateFiscalYearMakerConfiguration()
Validates each configured fiscal year maker implementation
|
protected void |
writeCopyFailureMessages(Collection<String> copyErrors)
Write outs errors encountered while creating new records for an object to LOG.
|
protected FiscalYearMakersDao fiscalYearMakersDao
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected org.kuali.rice.krad.service.KualiModuleService kualiModuleService
protected List<FiscalYearMaker> fiscalYearMakers
public FiscalYearMakerServiceImpl()
public void runProcess()
FiscalYearMakerService
runProcess
in interface FiscalYearMakerService
org.kuali.ole.coa.batch.service.FiscalYearMakerService#runProcess()
protected List<FiscalYearMaker> getFiscalYearMakerHelpersInCopyOrder()
FiscalYearMaker
objects in the order they should be copied. Ordered by Parent classes first then
children. This is necessary to ensure referential integrity is satisfied when the new record is inserted.protected List<FiscalYearMaker> getFiscalYearMakerHelpersInDeleteOrder(List<FiscalYearMaker> fiscalYearMakerHelpersCopyOrder)
FiscalYearMaker
objects in the order they should be deleted. Ordered by Child classes first then
Parents. This is necessary to ensure referential integrity is satisfied when the new record is deleted.fiscalYearMakerHelpersCopyOrder
- list of fiscal year makers in copy orderprotected void findCircularReferenceAndThrowException(Map<Class<? extends FiscalYearBasedBusinessObject>,Set<Class<? extends FiscalYearBasedBusinessObject>>> parentChildren)
parents
- Set of parent classes to checkparentChildren
- Map with parent class as the key and its children classes as valueprotected boolean checkChildrenForParentReference(Class<? extends FiscalYearBasedBusinessObject> parent, Set<Class<? extends FiscalYearBasedBusinessObject>> children, Map<Class<? extends FiscalYearBasedBusinessObject>,Set<Class<? extends FiscalYearBasedBusinessObject>>> parentChildren, Set<Class<? extends FiscalYearBasedBusinessObject>> checkedParents)
parent
- Class of parent to check forchildren
- Set of children classes to checkparentChildren
- Map with parent class as the key and its children classes as valuecheckedParents
- Set of parent classes we have already checked (to prevent endless recursiveness)protected Map<Class<? extends FiscalYearBasedBusinessObject>,Set<Class<? extends FiscalYearBasedBusinessObject>>> getParentChildrenMap()
protected boolean isParentClass(Class<? extends FiscalYearBasedBusinessObject> businessObjectClass)
businessObjectClass
- class to checkprotected Set<Class<? extends FiscalYearBasedBusinessObject>> getChildren(Map<Class<? extends FiscalYearBasedBusinessObject>,Set<Class<? extends FiscalYearBasedBusinessObject>>> parentChildren)
parentChildren
- Map with parent class as the key and its children classes as valueprotected Map<Class<? extends FiscalYearBasedBusinessObject>,FiscalYearMaker> getFiscalYearMakerMap()
FiscalYearMaker
as the Map
valueprotected void validateFiscalYearMakerConfiguration()
protected void writeCopyFailureMessages(Collection<String> copyErrors)
copyErrors
- Collection of error messages to writepublic void initialize()
protected void setFiscalYearMakers(List<FiscalYearMaker> fiscalYearMakers)
fiscalYearMakers
- The fiscalYearMakers to set.public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
parameterService
- The parameterService to set.public void setFiscalYearMakersDao(FiscalYearMakersDao fiscalYearMakersDao)
fiscalYearMakersDao
- The fiscalYearMakersDao to set.public void setKualiModuleService(org.kuali.rice.krad.service.KualiModuleService kualiModuleService)
kualiModuleService
- The kualiModuleService to set.protected FiscalYearMakersDao getFiscalYearMakersDao()
protected org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
protected org.kuali.rice.krad.service.KualiModuleService getKualiModuleService()
protected List<FiscalYearMaker> getFiscalYearMakers()
Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.