This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new f383ee7c17 FINERACT-2181: Remove command param lower casing
f383ee7c17 is described below
commit f383ee7c176bd12903ffbd54bcf62d742eb59cfd
Author: Adam Saghy <[email protected]>
AuthorDate: Wed Jun 4 18:20:37 2025 +0200
FINERACT-2181: Remove command param lower casing
---
.../investor/api/ExternalAssetOwnersApiResource.java | 17 ++++++++---------
.../account/api/StandingInstructionApiResource.java | 5 ++---
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git
a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java
b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java
index fef390d75f..0b890b3211 100644
---
a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java
+++
b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java
@@ -41,7 +41,6 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
import java.util.Map;
import lombok.RequiredArgsConstructor;
-import org.apache.commons.lang3.StringUtils;
import org.apache.fineract.batch.command.CommandHandlerRegistry;
import org.apache.fineract.commands.domain.CommandWrapper;
import org.apache.fineract.commands.service.CommandWrapperBuilder;
@@ -100,8 +99,8 @@ public class ExternalAssetOwnersApiResource {
@Parameter(hidden = true) ExternalAssetOwnerRequest assetOwnerReq)
{
platformUserRightsContext.isAuthenticated();
final String serializedAssetRequest =
postApiJsonSerializerService.serialize(assetOwnerReq);
- final CommandWrapper commandRequest =
COMMAND_HANDLER_REGISTRY.execute(StringUtils.toRootLowerCase(commandParam),
loanId,
- serializedAssetRequest, new
UnrecognizedQueryParamException("command", commandParam));
+ final CommandWrapper commandRequest =
COMMAND_HANDLER_REGISTRY.execute(commandParam, loanId, serializedAssetRequest,
+ new UnrecognizedQueryParamException("command", commandParam));
return
this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
}
@@ -119,8 +118,8 @@ public class ExternalAssetOwnersApiResource {
platformUserRightsContext.isAuthenticated();
final Long loanId =
loanReadPlatformService.getLoanIdByLoanExternalId(externalLoanId);
final String serializedAssetRequest =
postApiJsonSerializerService.serialize(assetOwnerReq);
- final CommandWrapper commandRequest =
COMMAND_HANDLER_REGISTRY.execute(StringUtils.toRootLowerCase(commandParam),
loanId,
- serializedAssetRequest, new
UnrecognizedQueryParamException("command", commandParam));
+ final CommandWrapper commandRequest =
COMMAND_HANDLER_REGISTRY.execute(commandParam, loanId, serializedAssetRequest,
+ new UnrecognizedQueryParamException("command", commandParam));
return
this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
}
@@ -137,8 +136,8 @@ public class ExternalAssetOwnersApiResource {
@Parameter(hidden = true) ExternalAssetOwnerRequest assetOwnerReq)
{
platformUserRightsContext.isAuthenticated();
final String serializedAssetRequest =
postApiJsonSerializerService.serialize(assetOwnerReq);
- final CommandWrapper commandRequest =
COMMAND_HANDLER_REGISTRY.execute(StringUtils.toRootLowerCase(commandParam), id,
- serializedAssetRequest, new
UnrecognizedQueryParamException("command", commandParam));
+ final CommandWrapper commandRequest =
COMMAND_HANDLER_REGISTRY.execute(commandParam, id, serializedAssetRequest,
+ new UnrecognizedQueryParamException("command", commandParam));
return
this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
}
@@ -155,8 +154,8 @@ public class ExternalAssetOwnersApiResource {
platformUserRightsContext.isAuthenticated();
final Long id =
externalAssetOwnersReadService.retrieveLastTransferIdByExternalId(new
ExternalId(externalId));
final String serializedAssetRequest =
postApiJsonSerializerService.serialize(assetOwnerReq);
- final CommandWrapper commandRequest =
COMMAND_HANDLER_REGISTRY.execute(StringUtils.toRootLowerCase(commandParam), id,
- serializedAssetRequest, new
UnrecognizedQueryParamException("command", commandParam));
+ final CommandWrapper commandRequest =
COMMAND_HANDLER_REGISTRY.execute(commandParam, id, serializedAssetRequest,
+ new UnrecognizedQueryParamException("command", commandParam));
return
this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java
index ab9d02862c..75ca8b3e9e 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java
@@ -43,7 +43,6 @@ import java.util.Arrays;
import java.util.Map;
import java.util.Set;
import lombok.RequiredArgsConstructor;
-import org.apache.commons.lang3.StringUtils;
import org.apache.fineract.batch.command.CommandHandlerRegistry;
import org.apache.fineract.commands.domain.CommandWrapper;
import org.apache.fineract.commands.service.CommandWrapperBuilder;
@@ -138,8 +137,8 @@ public class StandingInstructionApiResource {
@QueryParam("command") @Parameter(description = "command") final
String commandParam) {
final String serializedUpdatesRequest =
toApiJsonSerializer.serialize(updatesRequest);
- final CommandWrapper commandRequest =
COMMAND_HANDLER_REGISTRY.execute(StringUtils.toRootLowerCase(commandParam),
- standingInstructionId, serializedUpdatesRequest, new
UnrecognizedQueryParamException("command", commandParam));
+ final CommandWrapper commandRequest =
COMMAND_HANDLER_REGISTRY.execute(commandParam, standingInstructionId,
+ serializedUpdatesRequest, new
UnrecognizedQueryParamException("command", commandParam));
return
commandsSourceWritePlatformService.logCommandSource(commandRequest);
}