Merge pull request #1400 from chandrikamohith/MIFOSX-2053
MIFOSX-2053 Able to add/delete/edit tranches.
This commit is contained in:
@@ -292,4 +292,18 @@ public class CommandWrapper {
|
||||
return this.actionName + "_" + this.entityName;
|
||||
}
|
||||
|
||||
public boolean isLoanDisburseDetailResource() {
|
||||
return this.entityName.equalsIgnoreCase("DISBURSEMENTDETAIL");
|
||||
}
|
||||
|
||||
public boolean isUpdateDisbursementDate() {
|
||||
return this.actionName.equalsIgnoreCase("UPDATE") && this.entityName.equalsIgnoreCase("DISBURSEMENTDETAIL")
|
||||
&& this.entityId != null;
|
||||
}
|
||||
|
||||
public boolean addAndDeleteDisbursementDetails() {
|
||||
return this.actionName.equalsIgnoreCase("UPDATE") && this.entityName.equalsIgnoreCase("DISBURSEMENTDETAIL")
|
||||
&& this.entityId == null;
|
||||
}
|
||||
|
||||
}
|
||||
+9
-1
@@ -172,7 +172,15 @@ public class SynchronousCommandProcessingService implements CommandProcessingSer
|
||||
} else {
|
||||
throw new UnsupportedCommandException(wrapper.commandName());
|
||||
}
|
||||
}
|
||||
} else if (wrapper.isLoanDisburseDetailResource()) {
|
||||
if (wrapper.isUpdateDisbursementDate()) {
|
||||
handler = this.applicationContext.getBean("updateLoanDisbuseDateCommandHandler", NewCommandSourceHandler.class);
|
||||
} else if (wrapper.addAndDeleteDisbursementDetails()) {
|
||||
handler = this.applicationContext.getBean("addAndDeleteLoanDisburseDetailsCommandHandler", NewCommandSourceHandler.class);
|
||||
} else {
|
||||
throw new UnsupportedCommandException(wrapper.commandName());
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
handler = this.commandHandlerProvider.getHandler(wrapper.entityName(), wrapper.actionName());
|
||||
|
||||
Reference in New Issue
Block a user