|
249 | 249 |
|
250 | 250 | import java.util.Arrays; |
251 | 251 | import java.util.HashSet; |
| 252 | +import java.util.Locale; |
252 | 253 | import java.util.Set; |
253 | 254 | import org.apache.fineract.commands.domain.CommandWrapper; |
254 | 255 | import org.apache.fineract.infrastructure.accountnumberformat.service.AccountNumberFormatConstants; |
@@ -2822,7 +2823,7 @@ public CommandWrapperBuilder closeRecurringDepositAccount(final Long accountId) |
2822 | 2823 | } |
2823 | 2824 |
|
2824 | 2825 | public CommandWrapperBuilder updateDepositAmountForRecurringDepositAccount(final Long accountId) { |
2825 | | - this.actionName = DepositsApiConstants.UPDATE_DEPOSIT_AMOUNT.toUpperCase(); |
| 2826 | + this.actionName = DepositsApiConstants.UPDATE_DEPOSIT_AMOUNT.toUpperCase(Locale.ROOT); |
2826 | 2827 | this.entityName = ENTITY_RECURRINGDEPOSITACCOUNT; |
2827 | 2828 | this.entityId = accountId; |
2828 | 2829 | this.savingsId = accountId; |
@@ -2955,22 +2956,22 @@ public CommandWrapperBuilder rejectLoanRescheduleRequest(final String entityName |
2955 | 2956 |
|
2956 | 2957 | public CommandWrapperBuilder createAccountNumberFormat() { |
2957 | 2958 | this.actionName = ACTION_CREATE; |
2958 | | - this.entityName = AccountNumberFormatConstants.ENTITY_NAME.toUpperCase(); |
| 2959 | + this.entityName = AccountNumberFormatConstants.ENTITY_NAME.toUpperCase(Locale.ROOT); |
2959 | 2960 | this.href = AccountNumberFormatConstants.resourceRelativeURL; |
2960 | 2961 | return this; |
2961 | 2962 | } |
2962 | 2963 |
|
2963 | 2964 | public CommandWrapperBuilder updateAccountNumberFormat(final Long accountNumberFormatId) { |
2964 | 2965 | this.actionName = ACTION_UPDATE; |
2965 | | - this.entityName = AccountNumberFormatConstants.ENTITY_NAME.toUpperCase(); |
| 2966 | + this.entityName = AccountNumberFormatConstants.ENTITY_NAME.toUpperCase(Locale.ROOT); |
2966 | 2967 | this.entityId = accountNumberFormatId; |
2967 | 2968 | this.href = AccountNumberFormatConstants.resourceRelativeURL + "/" + accountNumberFormatId; |
2968 | 2969 | return this; |
2969 | 2970 | } |
2970 | 2971 |
|
2971 | 2972 | public CommandWrapperBuilder deleteAccountNumberFormat(final Long accountNumberFormatId) { |
2972 | 2973 | this.actionName = ACTION_DELETE; |
2973 | | - this.entityName = AccountNumberFormatConstants.ENTITY_NAME.toUpperCase(); |
| 2974 | + this.entityName = AccountNumberFormatConstants.ENTITY_NAME.toUpperCase(Locale.ROOT); |
2974 | 2975 | this.entityId = accountNumberFormatId; |
2975 | 2976 | this.href = "AccountNumberFormatConstants.resourceRelativeURL" + "/" + accountNumberFormatId; |
2976 | 2977 | this.json = "{}"; |
@@ -3286,46 +3287,46 @@ public CommandWrapperBuilder deleteScheduleExceptions(final Long loanId) { |
3286 | 3287 | } |
3287 | 3288 |
|
3288 | 3289 | public CommandWrapperBuilder createProduct(String productType) { |
3289 | | - this.entityName = productType.toUpperCase() + "PRODUCT"; // To Support |
3290 | | - // different |
3291 | | - // type of |
3292 | | - // products |
| 3290 | + this.entityName = productType.toUpperCase(Locale.ROOT) + "PRODUCT"; // To Support |
| 3291 | + // different |
| 3292 | + // type of |
| 3293 | + // products |
3293 | 3294 | this.actionName = ACTION_CREATE; |
3294 | 3295 | this.entityId = null; |
3295 | 3296 | this.href = "/products/" + productType; |
3296 | 3297 | return this; |
3297 | 3298 | } |
3298 | 3299 |
|
3299 | 3300 | public CommandWrapperBuilder updateProduct(String productType, final Long productId) { |
3300 | | - this.entityName = productType.toUpperCase() + "PRODUCT"; |
| 3301 | + this.entityName = productType.toUpperCase(Locale.ROOT) + "PRODUCT"; |
3301 | 3302 | this.actionName = ACTION_UPDATE; |
3302 | 3303 | this.entityId = productId; |
3303 | 3304 | this.href = "/products/" + productType + "/" + productId; |
3304 | 3305 | return this; |
3305 | 3306 | } |
3306 | 3307 |
|
3307 | 3308 | public CommandWrapperBuilder createAccount(String accountType) { |
3308 | | - this.entityName = accountType.toUpperCase() + "ACCOUNT"; // To Support |
3309 | | - // different |
3310 | | - // type of |
3311 | | - // Accounts |
| 3309 | + this.entityName = accountType.toUpperCase(Locale.ROOT) + "ACCOUNT"; // To Support |
| 3310 | + // different |
| 3311 | + // type of |
| 3312 | + // Accounts |
3312 | 3313 | this.actionName = ACTION_CREATE; |
3313 | 3314 | this.entityId = null; |
3314 | 3315 | this.href = "/accounts/" + accountType; |
3315 | 3316 | return this; |
3316 | 3317 | } |
3317 | 3318 |
|
3318 | 3319 | public CommandWrapperBuilder updateAccount(String accountType, final Long accountId) { |
3319 | | - this.entityName = accountType.toUpperCase() + "ACCOUNT"; |
| 3320 | + this.entityName = accountType.toUpperCase(Locale.ROOT) + "ACCOUNT"; |
3320 | 3321 | this.actionName = ACTION_UPDATE; |
3321 | 3322 | this.entityId = accountId; |
3322 | 3323 | this.href = "/accounts/" + accountType + "/" + accountId; |
3323 | 3324 | return this; |
3324 | 3325 | } |
3325 | 3326 |
|
3326 | 3327 | public CommandWrapperBuilder createProductCommand(String productType, String command, final Long productId) { |
3327 | | - this.entityName = productType.toUpperCase() + "PRODUCT"; |
3328 | | - this.actionName = ACTION_CREATE + "_" + command.toUpperCase(); |
| 3328 | + this.entityName = productType.toUpperCase(Locale.ROOT) + "PRODUCT"; |
| 3329 | + this.actionName = ACTION_CREATE + "_" + command.toUpperCase(Locale.ROOT); |
3329 | 3330 | this.entityId = productId; |
3330 | 3331 | this.href = "/products/" + productType + "/" + productId + "?command=" + command; |
3331 | 3332 | return this; |
@@ -3356,8 +3357,8 @@ public CommandWrapperBuilder deleteShareProductDividendPayoutCommand(final Long |
3356 | 3357 | } |
3357 | 3358 |
|
3358 | 3359 | public CommandWrapperBuilder createAccountCommand(String accountType, final Long accountId, String command) { |
3359 | | - this.entityName = accountType.toUpperCase() + "ACCOUNT"; |
3360 | | - this.actionName = command.toUpperCase(); |
| 3360 | + this.entityName = accountType.toUpperCase(Locale.ROOT) + "ACCOUNT"; |
| 3361 | + this.actionName = command.toUpperCase(Locale.ROOT); |
3361 | 3362 | this.entityId = accountId; |
3362 | 3363 | this.href = "/accounts/" + accountType + "/" + accountId + "?command=" + command; |
3363 | 3364 | return this; |
|
0 commit comments