use of org.mifos.config.business.MifosConfigurationManager in project head by mifos.
the class AccountingRules method getCurrencyRoundingMode.
public static RoundingMode getCurrencyRoundingMode() {
MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
String modeStr = configMgr.getString(AccountingRulesConstants.CURRENCY_ROUNDING_MODE);
return getRoundingModeFromString(modeStr, "CurrencyRoundingMode", DEFAULT_CURRENCY_ROUNDING_MODE);
}
use of org.mifos.config.business.MifosConfigurationManager in project head by mifos.
the class AccountingRules method getFinalRoundOffMultiple.
public static BigDecimal getFinalRoundOffMultiple() {
MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
String modeStr = configMgr.getString(AccountingRulesConstants.FINAL_ROUND_OFF_MULTIPLE);
return getRoundOffMultipleFromString(modeStr, DEFAULT_FINAL_ROUNDOFF_MULTIPLE);
}
use of org.mifos.config.business.MifosConfigurationManager in project head by mifos.
the class PasswordRules method getPasswordExpirationDatePrelongationFromConfig.
private static int getPasswordExpirationDatePrelongationFromConfig() throws ConfigurationException {
int passwordExpirationDateProlongation = 90;
MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
if (configMgr.containsKey(PASSWORD_EXPIRATION_DATE_PRELONGATION)) {
passwordExpirationDateProlongation = Integer.parseInt(configMgr.getString(PASSWORD_EXPIRATION_DATE_PRELONGATION));
}
if (passwordExpirationDateProlongation < 0) {
throw new ConfigurationException("The PasswordRules.PasswordExpirationDatePrelongation defined in the " + MifosConfigurationManager.DEFAULT_CONFIG_PROPS_FILENAME + " must be a positive numer.");
}
return passwordExpirationDateProlongation;
}
use of org.mifos.config.business.MifosConfigurationManager in project head by mifos.
the class ProcessFlowRules method initFromDB.
public static void initFromDB() {
MifosConfigurationManager cm = MifosConfigurationManager.getInstance();
CustomerDao customerDao = ApplicationContextProvider.getBean(CustomerDao.class);
LegacyAccountDao ap = ApplicationContextProvider.getBean(LegacyAccountDao.class);
CustomerStatusEntity cse = customerDao.findClientPendingStatus();
cm.setProperty(CLIENT_PENDING_APPROVAL, isClientPendingApprovalStateEnabledOnDatabaseConfiguration(cse));
cse = customerDao.findGroupPendingStatus();
cm.setProperty(GROUP_PENDING_APPROVAL, isGroupPendingApprovalStateEnabledOnDatabaseConfiguration(cse));
AccountStateEntity ase = ap.loadPersistentObject(AccountStateEntity.class, AccountState.LOAN_PENDING_APPROVAL.getValue());
cm.setProperty(LOAN_PENDING_APPROVAL, isLoanPendingApprovalStateEnabledOnDatabaseConfig(ase));
ase = ap.loadPersistentObject(AccountStateEntity.class, AccountState.SAVINGS_PENDING_APPROVAL.getValue());
cm.setProperty(SAVINGS_PENDING_APPROVAL, isSavingPendingApprovalStateEnabledOnDatabaseConfig(ase));
}
use of org.mifos.config.business.MifosConfigurationManager in project head by mifos.
the class GeneralConfig method getOutputIntervalForBatchJobs.
public static int getOutputIntervalForBatchJobs() {
// default value is 1000
int outputRecordIntervalForBatchJobs = 1000;
MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
if (configMgr.containsKey(OutputIntervalForBatchJobs)) {
outputRecordIntervalForBatchJobs = configMgr.getInt(OutputIntervalForBatchJobs);
}
return outputRecordIntervalForBatchJobs;
}
Aggregations