Search in sources :

Example 11 with MifosConfigurationManager

use of org.mifos.config.business.MifosConfigurationManager in project head by mifos.

the class ViewOrganizationSettingsServiceFacadeWebTier method getConfigurationContent.

private Properties getConfigurationContent() {
    Properties configContent = new Properties();
    MifosConfigurationManager configuration = MifosConfigurationManager.getInstance();
    String branchMangerRoleName = configuration.getString("RolesAndPermissions.BranchManager.RoleName");
    configContent.put("branchManagerRoleName", branchMangerRoleName);
    return configContent;
}
Also used : Properties(java.util.Properties) MifosConfigurationManager(org.mifos.config.business.MifosConfigurationManager)

Example 12 with MifosConfigurationManager

use of org.mifos.config.business.MifosConfigurationManager in project head by mifos.

the class ViewOrganizationSettingsServiceFacadeWebTier method getMpesa.

private Properties getMpesa() {
    Properties configContent = new Properties();
    MifosConfigurationManager configuration = MifosConfigurationManager.getInstance();
    String disbursalMax = configuration.getString("MPESA.DisbursalMax");
    configContent.put("disbursalMax", disbursalMax);
    return configContent;
}
Also used : Properties(java.util.Properties) MifosConfigurationManager(org.mifos.config.business.MifosConfigurationManager)

Example 13 with MifosConfigurationManager

use of org.mifos.config.business.MifosConfigurationManager in project head by mifos.

the class AccountingRules method getInitialRoundOffMultiple.

public static BigDecimal getInitialRoundOffMultiple() {
    MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
    String modeStr = configMgr.getString(AccountingRulesConstants.INITIAL_ROUND_OFF_MULTIPLE);
    return getRoundOffMultipleFromString(modeStr, DEFAULT_INITIAL_ROUNDOFF_MULTIPLE);
}
Also used : MifosConfigurationManager(org.mifos.config.business.MifosConfigurationManager)

Example 14 with MifosConfigurationManager

use of org.mifos.config.business.MifosConfigurationManager in project head by mifos.

the class AccountingRules method getInitialRoundingMode.

public static RoundingMode getInitialRoundingMode() {
    MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
    String modeStr = configMgr.getString(AccountingRulesConstants.INITIAL_ROUNDING_MODE);
    return getRoundingModeFromString(modeStr, "InitialRoundingMode", DEFAULT_INITIAL_ROUNDING_MODE);
}
Also used : MifosConfigurationManager(org.mifos.config.business.MifosConfigurationManager)

Example 15 with MifosConfigurationManager

use of org.mifos.config.business.MifosConfigurationManager in project head by mifos.

the class AccountingRules method getFinalRoundingMode.

public static RoundingMode getFinalRoundingMode() {
    MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
    String modeStr = configMgr.getString(AccountingRulesConstants.FINAL_ROUNDING_MODE);
    return getRoundingModeFromString(modeStr, "FinalRoundingMode", DEFAULT_FINAL_ROUNDING_MODE);
}
Also used : MifosConfigurationManager(org.mifos.config.business.MifosConfigurationManager)

Aggregations

MifosConfigurationManager (org.mifos.config.business.MifosConfigurationManager)66 Test (org.junit.Test)18 ConfigurationException (org.mifos.config.exceptions.ConfigurationException)8 Properties (java.util.Properties)5 MifosRuntimeException (org.mifos.core.MifosRuntimeException)5 PersistenceException (org.mifos.framework.exceptions.PersistenceException)5 ApplicationException (org.mifos.framework.exceptions.ApplicationException)4 RoundingMode (java.math.RoundingMode)3 ConfigurationPersistence (org.mifos.config.persistence.ConfigurationPersistence)3 CustomerAccountBO (org.mifos.customers.business.CustomerAccountBO)3 SystemException (org.mifos.framework.exceptions.SystemException)3 BigDecimal (java.math.BigDecimal)2 Ignore (org.junit.Ignore)2 AccountBO (org.mifos.accounts.business.AccountBO)2 SavingsBO (org.mifos.accounts.savings.business.SavingsBO)2 ConfigurationKeyValue (org.mifos.config.business.ConfigurationKeyValue)2 CurrencyMismatchException (org.mifos.core.CurrencyMismatchException)2 PersonnelBO (org.mifos.customers.personnel.business.PersonnelBO)2 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1