|
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; |
@@ -2830,7 +2831,7 @@ public CommandWrapperBuilder closeRecurringDepositAccount(final Long accountId) |
2830 | 2831 | } |
2831 | 2832 |
|
2832 | 2833 | public CommandWrapperBuilder updateDepositAmountForRecurringDepositAccount(final Long accountId) { |
2833 | | - this.actionName = DepositsApiConstants.UPDATE_DEPOSIT_AMOUNT.toUpperCase(); |
| 2834 | + this.actionName = DepositsApiConstants.UPDATE_DEPOSIT_AMOUNT.toUpperCase(Locale.ROOT); |
2834 | 2835 | this.entityName = ENTITY_RECURRINGDEPOSITACCOUNT; |
2835 | 2836 | this.entityId = accountId; |
2836 | 2837 | this.savingsId = accountId; |
@@ -2963,22 +2964,22 @@ public CommandWrapperBuilder rejectLoanRescheduleRequest(final String entityName |
2963 | 2964 |
|
2964 | 2965 | public CommandWrapperBuilder createAccountNumberFormat() { |
2965 | 2966 | this.actionName = ACTION_CREATE; |
2966 | | - this.entityName = AccountNumberFormatConstants.ENTITY_NAME.toUpperCase(); |
| 2967 | + this.entityName = AccountNumberFormatConstants.ENTITY_NAME.toUpperCase(Locale.ROOT); |
2967 | 2968 | this.href = AccountNumberFormatConstants.resourceRelativeURL; |
2968 | 2969 | return this; |
2969 | 2970 | } |
2970 | 2971 |
|
2971 | 2972 | public CommandWrapperBuilder updateAccountNumberFormat(final Long accountNumberFormatId) { |
2972 | 2973 | this.actionName = ACTION_UPDATE; |
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 | return this; |
2977 | 2978 | } |
2978 | 2979 |
|
2979 | 2980 | public CommandWrapperBuilder deleteAccountNumberFormat(final Long accountNumberFormatId) { |
2980 | 2981 | this.actionName = ACTION_DELETE; |
2981 | | - this.entityName = AccountNumberFormatConstants.ENTITY_NAME.toUpperCase(); |
| 2982 | + this.entityName = AccountNumberFormatConstants.ENTITY_NAME.toUpperCase(Locale.ROOT); |
2982 | 2983 | this.entityId = accountNumberFormatId; |
2983 | 2984 | this.href = "AccountNumberFormatConstants.resourceRelativeURL" + "/" + accountNumberFormatId; |
2984 | 2985 | this.json = "{}"; |
@@ -3294,46 +3295,46 @@ public CommandWrapperBuilder deleteScheduleExceptions(final Long loanId) { |
3294 | 3295 | } |
3295 | 3296 |
|
3296 | 3297 | public CommandWrapperBuilder createProduct(String productType) { |
3297 | | - this.entityName = productType.toUpperCase() + "PRODUCT"; // To Support |
3298 | | - // different |
3299 | | - // type of |
3300 | | - // products |
| 3298 | + this.entityName = productType.toUpperCase(Locale.ROOT) + "PRODUCT"; // To Support |
| 3299 | + // different |
| 3300 | + // type of |
| 3301 | + // products |
3301 | 3302 | this.actionName = ACTION_CREATE; |
3302 | 3303 | this.entityId = null; |
3303 | 3304 | this.href = "/products/" + productType; |
3304 | 3305 | return this; |
3305 | 3306 | } |
3306 | 3307 |
|
3307 | 3308 | public CommandWrapperBuilder updateProduct(String productType, final Long productId) { |
3308 | | - this.entityName = productType.toUpperCase() + "PRODUCT"; |
| 3309 | + this.entityName = productType.toUpperCase(Locale.ROOT) + "PRODUCT"; |
3309 | 3310 | this.actionName = ACTION_UPDATE; |
3310 | 3311 | this.entityId = productId; |
3311 | 3312 | this.href = "/products/" + productType + "/" + productId; |
3312 | 3313 | return this; |
3313 | 3314 | } |
3314 | 3315 |
|
3315 | 3316 | public CommandWrapperBuilder createAccount(String accountType) { |
3316 | | - this.entityName = accountType.toUpperCase() + "ACCOUNT"; // To Support |
3317 | | - // different |
3318 | | - // type of |
3319 | | - // Accounts |
| 3317 | + this.entityName = accountType.toUpperCase(Locale.ROOT) + "ACCOUNT"; // To Support |
| 3318 | + // different |
| 3319 | + // type of |
| 3320 | + // Accounts |
3320 | 3321 | this.actionName = ACTION_CREATE; |
3321 | 3322 | this.entityId = null; |
3322 | 3323 | this.href = "/accounts/" + accountType; |
3323 | 3324 | return this; |
3324 | 3325 | } |
3325 | 3326 |
|
3326 | 3327 | public CommandWrapperBuilder updateAccount(String accountType, final Long accountId) { |
3327 | | - this.entityName = accountType.toUpperCase() + "ACCOUNT"; |
| 3328 | + this.entityName = accountType.toUpperCase(Locale.ROOT) + "ACCOUNT"; |
3328 | 3329 | this.actionName = ACTION_UPDATE; |
3329 | 3330 | this.entityId = accountId; |
3330 | 3331 | this.href = "/accounts/" + accountType + "/" + accountId; |
3331 | 3332 | return this; |
3332 | 3333 | } |
3333 | 3334 |
|
3334 | 3335 | public CommandWrapperBuilder createProductCommand(String productType, String command, final Long productId) { |
3335 | | - this.entityName = productType.toUpperCase() + "PRODUCT"; |
3336 | | - this.actionName = ACTION_CREATE + "_" + command.toUpperCase(); |
| 3336 | + this.entityName = productType.toUpperCase(Locale.ROOT) + "PRODUCT"; |
| 3337 | + this.actionName = ACTION_CREATE + "_" + command.toUpperCase(Locale.ROOT); |
3337 | 3338 | this.entityId = productId; |
3338 | 3339 | this.href = "/products/" + productType + "/" + productId + "?command=" + command; |
3339 | 3340 | return this; |
@@ -3364,8 +3365,8 @@ public CommandWrapperBuilder deleteShareProductDividendPayoutCommand(final Long |
3364 | 3365 | } |
3365 | 3366 |
|
3366 | 3367 | public CommandWrapperBuilder createAccountCommand(String accountType, final Long accountId, String command) { |
3367 | | - this.entityName = accountType.toUpperCase() + "ACCOUNT"; |
3368 | | - this.actionName = command.toUpperCase(); |
| 3368 | + this.entityName = accountType.toUpperCase(Locale.ROOT) + "ACCOUNT"; |
| 3369 | + this.actionName = command.toUpperCase(Locale.ROOT); |
3369 | 3370 | this.entityId = accountId; |
3370 | 3371 | this.href = "/accounts/" + accountType + "/" + accountId + "?command=" + command; |
3371 | 3372 | return this; |
|
0 commit comments