public class LoanRepaymentScheduleTransactionProcessorFactory {
public LoanRepaymentScheduleTransactionProcessor determineProcessor(
final LoanTransactionProcessingStrategy transactionProcessingStrategy) {
LoanRepaymentScheduleTransactionProcessor processor = new PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor();
if (transactionProcessingStrategy != null) {
if (transactionProcessingStrategy.isStandardMifosStrategy()) {
processor = new MifosStyleLoanRepaymentScheduleTransactionProcessor();
}
if (transactionProcessingStrategy.isHeavensfamilyStrategy()) {
processor = new HeavensFamilyLoanRepaymentScheduleTransactionProcessor();
}
if (transactionProcessingStrategy.isEarlyPaymentStrategy()) {
processor = new EarlyPaymentLoanRepaymentScheduleTransactionProcessor();
}
if (transactionProcessingStrategy.isCreocoreStrategy()) {
processor = new CreocoreLoanRepaymentScheduleTransactionProcessor();
}
if (transactionProcessingStrategy.isIndianRBIStrategy()) {
processor = new RBILoanRepaymentScheduleTransactionProcessor();
}
if (transactionProcessingStrategy.isPrincipalInterestPenaltiesFeesOrderStrategy()) {
processor = new PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor();
}
if (transactionProcessingStrategy.isInterestPrincipalPenaltiesFeesOrderStrategy()) {
processor = new InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor();
}