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;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+8
@@ -172,6 +172,14 @@ public class SynchronousCommandProcessingService implements CommandProcessingSer
|
|||||||
} else {
|
} else {
|
||||||
throw new UnsupportedCommandException(wrapper.commandName());
|
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 {
|
else {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user