Search in sources :

Example 1 with AccountTypes

use of org.mifos.accounts.util.helpers.AccountTypes in project head by mifos.

the class AccountStateMachines method initializeLoanStates.

public void initializeLoanStates() throws StatesInitializationException {
    AccountTypes accountType = AccountTypes.LOAN_ACCOUNT;
    CustomerLevel level = null;
    String configName = getConfigurationName(accountType, level);
    try {
        statesMapForLoan = loadMap(AccountStates.TRANSITION_CONFIG_FILE_PATH_LOAN, configName);
        accountStateEntityListForLoan = retrieveAllAccountStateList(accountType);
        removeLoanReversalFlagForCancelState();
        populateLoanStatesViewMap();
    } catch (Exception e) {
        throw new StatesInitializationException(SavingsConstants.STATEINITIALIZATION_EXCEPTION, e);
    }
}
Also used : CustomerLevel(org.mifos.customers.api.CustomerLevel) StatesInitializationException(org.mifos.framework.exceptions.StatesInitializationException) AccountTypes(org.mifos.accounts.util.helpers.AccountTypes) ServiceException(org.mifos.framework.exceptions.ServiceException) PersistenceException(org.mifos.framework.exceptions.PersistenceException) StatesInitializationException(org.mifos.framework.exceptions.StatesInitializationException) ApplicationException(org.mifos.framework.exceptions.ApplicationException)

Example 2 with AccountTypes

use of org.mifos.accounts.util.helpers.AccountTypes in project head by mifos.

the class AccountStateMachines method initializeSavingsStates.

public void initializeSavingsStates() throws StatesInitializationException {
    AccountTypes accountType = AccountTypes.SAVINGS_ACCOUNT;
    CustomerLevel level = null;
    String configName = getConfigurationName(accountType, level);
    try {
        statesMapForSavings = loadMap(AccountStates.TRANSITION_CONFIG_FILE_PATH_SAVINGS, configName);
        accountStateEntityListForSavings = retrieveAllAccountStateList(accountType);
        populateSavingsStatesViewMap();
    } catch (Exception e) {
        throw new StatesInitializationException(SavingsConstants.STATEINITIALIZATION_EXCEPTION, e);
    }
}
Also used : CustomerLevel(org.mifos.customers.api.CustomerLevel) StatesInitializationException(org.mifos.framework.exceptions.StatesInitializationException) AccountTypes(org.mifos.accounts.util.helpers.AccountTypes) ServiceException(org.mifos.framework.exceptions.ServiceException) PersistenceException(org.mifos.framework.exceptions.PersistenceException) StatesInitializationException(org.mifos.framework.exceptions.StatesInitializationException) ApplicationException(org.mifos.framework.exceptions.ApplicationException)

Example 3 with AccountTypes

use of org.mifos.accounts.util.helpers.AccountTypes in project head by mifos.

the class AccountStateMachines method initializeCenterStates.

public void initializeCenterStates() throws StatesInitializationException {
    AccountTypes accountType = AccountTypes.CUSTOMER_ACCOUNT;
    CustomerLevel level = CustomerLevel.CENTER;
    String configName = getConfigurationName(accountType, level);
    try {
        statesMapForCenter = loadMap(CustomerConstants.TRANSITION_CONFIG_FILE_PATH_CENTER, configName);
        customerStatusListForCenter = retrieveAllCustomerStatusList(level);
        populateCenterStatesViewMap();
    } catch (Exception e) {
        throw new StatesInitializationException(SavingsConstants.STATEINITIALIZATION_EXCEPTION, e);
    }
}
Also used : CustomerLevel(org.mifos.customers.api.CustomerLevel) StatesInitializationException(org.mifos.framework.exceptions.StatesInitializationException) AccountTypes(org.mifos.accounts.util.helpers.AccountTypes) ServiceException(org.mifos.framework.exceptions.ServiceException) PersistenceException(org.mifos.framework.exceptions.PersistenceException) StatesInitializationException(org.mifos.framework.exceptions.StatesInitializationException) ApplicationException(org.mifos.framework.exceptions.ApplicationException)

Example 4 with AccountTypes

use of org.mifos.accounts.util.helpers.AccountTypes in project head by mifos.

the class AccountStateMachines method initializeGroupStates.

public void initializeGroupStates() throws StatesInitializationException {
    AccountTypes accountType = AccountTypes.CUSTOMER_ACCOUNT;
    CustomerLevel level = CustomerLevel.GROUP;
    String configName = getConfigurationName(accountType, level);
    try {
        statesMapForGroup = loadMap(CustomerConstants.TRANSITION_CONFIG_FILE_PATH_GROUP, configName);
        customerStatusListForGroup = retrieveAllCustomerStatusList(level);
        populateGroupStatesViewMap();
    } catch (Exception e) {
        throw new StatesInitializationException(SavingsConstants.STATEINITIALIZATION_EXCEPTION, e);
    }
}
Also used : CustomerLevel(org.mifos.customers.api.CustomerLevel) StatesInitializationException(org.mifos.framework.exceptions.StatesInitializationException) AccountTypes(org.mifos.accounts.util.helpers.AccountTypes) ServiceException(org.mifos.framework.exceptions.ServiceException) PersistenceException(org.mifos.framework.exceptions.PersistenceException) StatesInitializationException(org.mifos.framework.exceptions.StatesInitializationException) ApplicationException(org.mifos.framework.exceptions.ApplicationException)

Example 5 with AccountTypes

use of org.mifos.accounts.util.helpers.AccountTypes in project head by mifos.

the class AccountStateMachines method initializeClientStates.

public void initializeClientStates() throws StatesInitializationException {
    AccountTypes accountType = AccountTypes.CUSTOMER_ACCOUNT;
    CustomerLevel level = CustomerLevel.CLIENT;
    String configName = getConfigurationName(accountType, level);
    try {
        statesMapForClient = loadMap(CustomerConstants.TRANSITION_CONFIG_FILE_PATH_CLIENT, configName);
        customerStatusListForClient = retrieveAllCustomerStatusList(level);
        populateClientStatesViewMap();
    } catch (Exception e) {
        throw new StatesInitializationException(SavingsConstants.STATEINITIALIZATION_EXCEPTION, e);
    }
}
Also used : CustomerLevel(org.mifos.customers.api.CustomerLevel) StatesInitializationException(org.mifos.framework.exceptions.StatesInitializationException) AccountTypes(org.mifos.accounts.util.helpers.AccountTypes) ServiceException(org.mifos.framework.exceptions.ServiceException) PersistenceException(org.mifos.framework.exceptions.PersistenceException) StatesInitializationException(org.mifos.framework.exceptions.StatesInitializationException) ApplicationException(org.mifos.framework.exceptions.ApplicationException)

Aggregations

AccountTypes (org.mifos.accounts.util.helpers.AccountTypes)5 CustomerLevel (org.mifos.customers.api.CustomerLevel)5 ApplicationException (org.mifos.framework.exceptions.ApplicationException)5 PersistenceException (org.mifos.framework.exceptions.PersistenceException)5 ServiceException (org.mifos.framework.exceptions.ServiceException)5 StatesInitializationException (org.mifos.framework.exceptions.StatesInitializationException)5