Search in sources :

Example 1 with PenaltyParametersDto

use of org.mifos.dto.screen.PenaltyParametersDto in project head by mifos.

the class WebTierPenaltyServiceFacade method getPenaltyParameters.

@Override
public PenaltyParametersDto getPenaltyParameters() {
    try {
        List<GLCodeEntity> glCodes = generalLedgerDao.retreiveGlCodesBy(FinancialActionConstants.PENALTYPOSTING, FinancialConstants.CREDIT);
        List<PenaltyCategoryEntity> categories = this.penaltyDao.getPenaltiesCategories();
        List<PenaltyPeriodEntity> periods = this.penaltyDao.getPenaltiesPeriods();
        List<PenaltyFormulaEntity> formulas = this.penaltyDao.getPenaltiesFormulas();
        List<PenaltyFrequencyEntity> frequencies = this.penaltyDao.getPenaltiesFrequencies();
        List<PenaltyStatusEntity> statuses = this.penaltyDao.getPenaltiesStatuses();
        return new PenaltyParametersDto(listToMap(categories), listToMap(statuses), listToMap(periods), listToMap(formulas), listToMap(frequencies), glCodesToMap(glCodes));
    } catch (FinancialException e) {
        throw new BusinessRuleException(e.getKey(), e);
    }
}
Also used : PenaltyStatusEntity(org.mifos.accounts.penalties.business.PenaltyStatusEntity) GLCodeEntity(org.mifos.accounts.financial.business.GLCodeEntity) PenaltyPeriodEntity(org.mifos.accounts.penalties.business.PenaltyPeriodEntity) PenaltyCategoryEntity(org.mifos.accounts.penalties.business.PenaltyCategoryEntity) BusinessRuleException(org.mifos.service.BusinessRuleException) PenaltyFrequencyEntity(org.mifos.accounts.penalties.business.PenaltyFrequencyEntity) FinancialException(org.mifos.accounts.financial.exceptions.FinancialException) PenaltyParametersDto(org.mifos.dto.screen.PenaltyParametersDto) PenaltyFormulaEntity(org.mifos.accounts.penalties.business.PenaltyFormulaEntity)

Aggregations

GLCodeEntity (org.mifos.accounts.financial.business.GLCodeEntity)1 FinancialException (org.mifos.accounts.financial.exceptions.FinancialException)1 PenaltyCategoryEntity (org.mifos.accounts.penalties.business.PenaltyCategoryEntity)1 PenaltyFormulaEntity (org.mifos.accounts.penalties.business.PenaltyFormulaEntity)1 PenaltyFrequencyEntity (org.mifos.accounts.penalties.business.PenaltyFrequencyEntity)1 PenaltyPeriodEntity (org.mifos.accounts.penalties.business.PenaltyPeriodEntity)1 PenaltyStatusEntity (org.mifos.accounts.penalties.business.PenaltyStatusEntity)1 PenaltyParametersDto (org.mifos.dto.screen.PenaltyParametersDto)1 BusinessRuleException (org.mifos.service.BusinessRuleException)1