Search in sources :

Example 6 with MifosConfigurationManager

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

the class GeneralConfig method getMaxPointsPerPPISurvey.

public static int getMaxPointsPerPPISurvey() {
    // default value is 101
    int maxPointsPerPPISurvey = 101;
    MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
    if (configMgr.containsKey(MaxPointsPerPPISurvey)) {
        maxPointsPerPPISurvey = configMgr.getInt(MaxPointsPerPPISurvey);
    }
    return maxPointsPerPPISurvey;
}
Also used : MifosConfigurationManager(org.mifos.config.business.MifosConfigurationManager)

Example 7 with MifosConfigurationManager

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

the class GeneralConfig method getBatchSizeForBatchJobs.

public static int getBatchSizeForBatchJobs() {
    // default value is 40
    int batchSizeForBatchJobs = 40;
    MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
    if (configMgr.containsKey(BatchSizeForBatchJobs)) {
        batchSizeForBatchJobs = configMgr.getInt(BatchSizeForBatchJobs);
    }
    return batchSizeForBatchJobs;
}
Also used : MifosConfigurationManager(org.mifos.config.business.MifosConfigurationManager)

Example 8 with MifosConfigurationManager

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

the class GeneralConfig method getRecordCommittingSizeForBatchJobs.

public static int getRecordCommittingSizeForBatchJobs() {
    // default value is 1000
    int committingRecordSizeForBatchJobs = 1000;
    MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
    if (configMgr.containsKey(RecordCommittingSizeForBatchJobs)) {
        committingRecordSizeForBatchJobs = configMgr.getInt(RecordCommittingSizeForBatchJobs);
    }
    return committingRecordSizeForBatchJobs;
}
Also used : MifosConfigurationManager(org.mifos.config.business.MifosConfigurationManager)

Example 9 with MifosConfigurationManager

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

the class GeneralConfig method getAllowDataPrefetchingWhenSavingCollectionSheets.

public static Boolean getAllowDataPrefetchingWhenSavingCollectionSheets() {
    // default value is true
    Boolean allowDataPrefetching = true;
    MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
    if (configMgr.containsKey(allowDataPrefetchingWhenSavingCollectionSheets)) {
        allowDataPrefetching = configMgr.getBoolean(allowDataPrefetchingWhenSavingCollectionSheets, allowDataPrefetching);
    }
    return allowDataPrefetching;
}
Also used : MifosConfigurationManager(org.mifos.config.business.MifosConfigurationManager)

Example 10 with MifosConfigurationManager

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

the class LocaleSetting method setCountryCodeToConfigFile.

public void setCountryCodeToConfigFile() {
    MifosConfigurationManager configMgr = MifosConfigurationManager.getInstance();
    configMgr.addProperty(COUNTRY_CODE, countryCode);
}
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