From e363d9dcf2ad0bab7a6615bffe7fa7d22cf1a613 Mon Sep 17 00:00:00 2001 From: Adam Saghy <adamsaghy@gmail.com> Date: Mon, 20 Jan 2025 09:37:40 +0100 Subject: [PATCH] FINERACT-2165: Mark all the RestAssured solutions as deprecated in the integration tests module --- .../integrationtests/common/AuditHelper.java | 32 + .../integrationtests/common/BatchHelper.java | 28 + .../common/BusinessDateHelper.java | 12 + .../BusinessStepConfigurationHelper.java | 32 + .../common/CalendarHelper.java | 28 + .../integrationtests/common/CenterHelper.java | 100 +++ .../integrationtests/common/ClientHelper.java | 332 ++++++++ .../common/CollateralManagementHelper.java | 48 ++ .../CreditBureauConfigurationHelper.java | 57 +- .../common/CreditBureauIntegrationHelper.java | 12 + .../common/CurrenciesHelper.java | 20 + .../ExternalEventConfigurationHelper.java | 20 + .../ExternalServicesConfigurationHelper.java | 16 + .../integrationtests/common/GroupHelper.java | 124 +++ .../common/HolidayHelper.java | 36 + .../integrationtests/common/HookHelper.java | 34 +- .../common/IdempotencyHelper.java | 28 + .../common/LoanRescheduleRequestHelper.java | 24 + .../integrationtests/common/NotesHelper.java | 72 ++ .../common/NotificationHelper.java | 8 + .../integrationtests/common/OfficeHelper.java | 44 ++ .../common/PasswordPreferencesHelper.java | 24 + .../common/PaymentTypeHelper.java | 4 + .../common/ProductMixHelper.java | 12 + .../common/SchedulerJobHelper.java | 48 ++ .../integrationtests/common/SearchHelper.java | 4 + .../common/StandingInstructionsHelper.java | 20 + .../integrationtests/common/SurveyHelper.java | 16 + .../common/TaxComponentHelper.java | 12 + .../common/TaxGroupHelper.java | 16 + .../integrationtests/common/Utils.java | 23 + .../common/WorkingDaysHelper.java | 32 + .../common/accounting/AccountHelper.java | 32 + .../common/accounting/AccountRuleHelper.java | 12 + .../FinancialActivityAccountHelper.java | 20 + .../common/accounting/JournalEntryHelper.java | 32 + .../PeriodicAccrualAccountingHelper.java | 12 + .../common/charges/ChargesHelper.java | 230 +++++- .../common/commands/MakercheckersHelper.java | 16 + .../externalevents/ExternalEventHelper.java | 16 + .../FixedDepositAccountHelper.java | 136 ++++ .../FixedDepositProductHelper.java | 48 ++ .../common/loans/CobHelper.java | 8 + .../common/loans/LoanAccountLockHelper.java | 12 + .../common/loans/LoanTransactionHelper.java | 720 ++++++++++++++++++ .../common/organisation/CampaignsHelper.java | 44 ++ .../common/organisation/CurrencyHelper.java | 16 + .../EntityDatatableChecksHelper.java | 24 + .../common/organisation/StaffHelper.java | 52 ++ .../products/DelinquencyBucketsHelper.java | 36 + .../products/DelinquencyRangesHelper.java | 24 + .../provisioning/ProvisioningHelper.java | 20 + .../ProvisioningTransactionHelper.java | 44 ++ .../common/rates/RatesHelper.java | 32 + .../RecurringDepositAccountHelper.java | 140 ++++ .../RecurringDepositProductHelper.java | 48 ++ .../common/savings/AccountTransferHelper.java | 32 + .../common/savings/SavingsAccountHelper.java | 476 ++++++++++++ .../common/savings/SavingsProductHelper.java | 24 + .../common/shares/ShareAccountHelper.java | 6 +- .../shares/ShareAccountTransactionHelper.java | 16 + .../ShareDividendsTransactionHelper.java | 16 + .../common/shares/ShareProductHelper.java | 12 + .../shares/ShareProductTransactionHelper.java | 12 + .../AccountNumberPreferencesHelper.java | 52 ++ .../common/system/CodeHelper.java | 100 +++ .../common/system/DatatableHelper.java | 100 +++ .../xbrl/XBRLIntegrationTestHelper.java | 12 + .../guarantor/GuarantorHelper.java | 28 + .../inlinecob/InlineLoanCOBHelper.java | 16 + .../interoperation/InteropHelper.java | 84 ++ .../teller/CashierTransactionsHelper.java | 32 + .../instancemode/InstanceModeHelper.java | 4 + .../useradministration/roles/RolesHelper.java | 40 + .../useradministration/users/UserHelper.java | 76 ++ ...bleInstallmentsDecliningBalanceHelper.java | 88 +++ .../VariableInstallmentsFlatHelper.java | 68 ++ .../VariableIntallmentsTransactionHelper.java | 16 + 78 files changed, 4398 insertions(+), 4 deletions(-) diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/AuditHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/AuditHelper.java index 526028b7c09..fdeaba6c7b1 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/AuditHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/AuditHelper.java @@ -49,11 +49,19 @@ public class AuditHelper { private ResponseSpecification responseSpec; private RequestSpecification requestSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public AuditHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List getAuditDetails(final Integer resourceId, final String actionName, final String entityName) { final String AUDIT_URL = AUDIT_BASE_URL + "&entityName=" + entityName + "&resourceId=" + resourceId + "&actionName=" + actionName + "&orderBy=id&sortBy=DSC"; @@ -61,12 +69,20 @@ public List getAuditDetails(final Integer resourceId, final String actionName, f return responseAudits; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List getAuditDetails(final int limit) { final String AUDIT_URL = AUDIT_BASE_URL + "&paged=true&limit=" + Integer.toString(limit); LinkedHashMap responseAudits = Utils.performServerGet(requestSpec, responseSpec, AUDIT_URL, ""); return (List) responseAudits.get("pageItems"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public LinkedHashMap getAuditSearchTemplate() { return Utils.performServerGet(requestSpec, responseSpec, AUDITSEARCH_BASE_URL, "$"); } @@ -75,6 +91,10 @@ public LinkedHashMap getAuditSearchTemplate() { * Some audit actions can only be done once Eg: Creation of a client with id 123, hence we verify number of audits * For such operations is "equal" to 1 always */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyOneAuditOnly(List<HashMap<String, Object>> auditsToCheck, Integer id, String actionName, String entityType) { LOG.info("------------------------------CHECK IF AUDIT CREATED------------------------------------\n"); assertEquals(1, auditsToCheck.size(), "More than one audit created"); @@ -85,6 +105,10 @@ public void verifyOneAuditOnly(List<HashMap<String, Object>> auditsToCheck, Inte assertEquals(expected, actual, "Error in creating audit!"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyMultipleAuditsOnserver(List<HashMap<String, Object>> auditsRecievedInitial, List<HashMap<String, Object>> auditsRecieved, Integer id, String actionName, String entityType) { LOG.info("------------------------------CHECK IF AUDIT CREATED------------------------------------\n"); @@ -102,10 +126,18 @@ public void verifyMultipleAuditsOnserver(List<HashMap<String, Object>> auditsRec assertEquals(expected, actual, "Error in creating audit!"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyLimitParameterfor(final int limit) { assertEquals(limit, getAuditDetails(limit).size(), "Incorrect number of audits recieved for limit: " + Integer.toString(limit)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyOrderBysupported(final String orderByValue) { final String AUDIT_URL = AUDIT_BASE_URL + "&paged=true&orderBy=" + orderByValue; Utils.performServerGet(requestSpec, responseSpec, AUDIT_URL, ""); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BatchHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BatchHelper.java index 6be2a4871f7..f55a1c4d7b6 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BatchHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BatchHelper.java @@ -71,6 +71,10 @@ private BatchHelper() { * @param batchRequests * @return JSON String of BatchRequest */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String toJsonString(final List<BatchRequest> batchRequests) { return new Gson().toJson(batchRequests); } @@ -81,6 +85,10 @@ public static String toJsonString(final List<BatchRequest> batchRequests) { * @param * @return Map */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map generateMapFromJsonString(final String jsonString) { return new Gson().fromJson(jsonString, Map.class); } @@ -91,6 +99,10 @@ public static Map generateMapFromJsonString(final String jsonString) { * @param json * @return {@code List<BatchResponse>} */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static List<BatchResponse> fromJsonString(final String json) { return new Gson().fromJson(json, new TypeToken<List<BatchResponse>>() {}.getType()); } @@ -104,6 +116,10 @@ private static List<BatchResponse> fromJsonString(final String json) { * @param jsonifiedBatchRequests * @return a list of BatchResponse */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<BatchResponse> postBatchRequestsWithoutEnclosingTransaction(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String jsonifiedBatchRequests) { final String response = Utils.performServerPost(requestSpec, responseSpec, BATCH_API_WITHOUT_ENCLOSING_URL_EXT, @@ -112,6 +128,10 @@ public static List<BatchResponse> postBatchRequestsWithoutEnclosingTransaction(f return BatchHelper.fromJsonString(response); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ErrorResponse postBatchRequestsWithoutEnclosingTransactionError(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String jsonifiedBatchRequests) { final String response = Utils.performServerPost(requestSpec, responseSpec, BATCH_API_WITHOUT_ENCLOSING_URL_EXT, @@ -129,6 +149,10 @@ public static ErrorResponse postBatchRequestsWithoutEnclosingTransactionError(fi * @param jsonifiedBatchRequests * @return a list of BatchResponse */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<BatchResponse> postBatchRequestsWithEnclosingTransaction(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String jsonifiedBatchRequests) { final String response = Utils.performServerPost(requestSpec, responseSpec, BATCH_API_URL_EXT, jsonifiedBatchRequests, null); @@ -141,6 +165,10 @@ public static List<BatchResponse> postBatchRequestsWithEnclosingTransaction(fina * @param * @return {@code List<BatchResponse>} */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<BatchResponse> postWithSingleRequest(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final BatchRequest br) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BusinessDateHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BusinessDateHelper.java index ec4b71d9703..62b64971e62 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BusinessDateHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BusinessDateHelper.java @@ -38,6 +38,10 @@ public final class BusinessDateHelper extends IntegrationTest { public BusinessDateHelper() {} + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap updateBusinessDate(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final BusinessDateType type, final LocalDate date) { final String BUSINESS_DATE_API = "/fineract-provider/api/v1/businessdate?" + Utils.TENANT_IDENTIFIER; @@ -52,6 +56,10 @@ public BusinessDateResponse updateBusinessDate(final BusinessDateRequest request return ok(fineract().businessDateManagement.updateBusinessDate(request)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public BusinessDateResponse getBusinessDateByType(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final BusinessDateType type) { final String BUSINESS_DATE_API = "/fineract-provider/api/v1/businessdate/" + type.name() + "?" + Utils.TENANT_IDENTIFIER; @@ -68,6 +76,10 @@ public List<BusinessDateResponse> getBusinessDates() { return ok(fineract().businessDateManagement.getBusinessDates()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String buildBusinessDateRequest(BusinessDateType type, LocalDate date) { final HashMap<String, String> map = new HashMap<>(); map.put("type", type.name()); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BusinessStepConfigurationHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BusinessStepConfigurationHelper.java index a175e9a8f39..0c4e71ad7ab 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BusinessStepConfigurationHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/BusinessStepConfigurationHelper.java @@ -40,22 +40,42 @@ private BusinessStepConfigurationHelper() { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String toJsonString(final List<BusinessStep> batchRequests) { return new Gson().toJson(new BusinessStepWrapper(batchRequests)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static JobBusinessStepConfigData configuredBusinessStepFromJsonString(final String json) { return new Gson().fromJson(json, new TypeToken<JobBusinessStepConfigData>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ApiParameterError configuredApiParameterErrorFromJsonString(final String json) { return new Gson().fromJson(json, new TypeToken<ApiParameterError>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static JobBusinessStepDetail availableBusinessStepFromJsonString(final String json) { return new Gson().fromJson(json, new TypeToken<JobBusinessStepDetail>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static JobBusinessStepConfigData getConfiguredBusinessStepsByJobName(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String jobName) { final String response = Utils.performServerGet(requestSpec, responseSpec, @@ -64,6 +84,10 @@ public static JobBusinessStepConfigData getConfiguredBusinessStepsByJobName(fina return BusinessStepConfigurationHelper.configuredBusinessStepFromJsonString(response); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static JobBusinessStepDetail getAvailableBusinessStepsByJobName(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String jobName) { final String response = Utils.performServerGet(requestSpec, responseSpec, @@ -72,6 +96,10 @@ public static JobBusinessStepDetail getAvailableBusinessStepsByJobName(final Req return BusinessStepConfigurationHelper.availableBusinessStepFromJsonString(response); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void updateBusinessStepOrder(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String jobName, String jsonBodyToSend) { String response = Utils.performServerPut(requestSpec, responseSpec, @@ -79,6 +107,10 @@ public static void updateBusinessStepOrder(final RequestSpecification requestSpe log.info("BusinessStepConfigurationHelper Response: {}", response); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ApiParameterError updateBusinessStepOrderWithError(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String jobName, String jsonBodyToSend) { String response = Utils.performServerPut(requestSpec, responseSpec, diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CalendarHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CalendarHelper.java index 76edbf9bf70..6848caedd67 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CalendarHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CalendarHelper.java @@ -41,6 +41,10 @@ private CalendarHelper() { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createMeetingCalendarForGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer groupId, final String startDate, final String frequency, final String interval, final String repeatsOnDay) { @@ -54,6 +58,10 @@ public static Integer createMeetingCalendarForGroup(final RequestSpecification r getTestCalendarAsJSON(frequency, interval, repeatsOnDay, startDate), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer updateMeetingCalendarForGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer groupId, String calendarID, final String startDate, final String frequency, final String interval, final String repeatsOnDay) { @@ -68,6 +76,10 @@ public static Integer updateMeetingCalendarForGroup(final RequestSpecification r getTestCalendarAsJSON(frequency, interval, repeatsOnDay, startDate), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestCalendarAsJSON(final String frequency, final String interval, final String repeatsOnDay, final String startDate) { @@ -85,6 +97,10 @@ public static String getTestCalendarAsJSON(final String frequency, final String return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyCalendarCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedGroupId, final Integer generatedCalendarId) { LOG.info("------------------------------CHECK CALENDAR DETAILS------------------------------------\n"); @@ -95,6 +111,10 @@ public static void verifyCalendarCreatedOnServer(final RequestSpecification requ assertEquals(generatedCalendarId, responseCalendarId, "ERROR IN CREATING THE CALENDAR"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createMeetingForGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer groupId, final String startDate, final String frequency, final String interval, final String repeatsOnDay) { @@ -108,6 +128,10 @@ public static Integer createMeetingForGroup(final RequestSpecification requestSp getTestCalendarAsJSON(frequency, interval, repeatsOnDay, startDate), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer updateMeetingCalendarForCenter(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, Integer centerId, String calendarID, String oldDate, String startDate) { @@ -123,6 +147,10 @@ public static Integer updateMeetingCalendarForCenter(final RequestSpecification } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String getTestCalendarMeetingAsJSON(String oldDate, String startDate) { final HashMap<String, String> map = new HashMap<>(); map.put("dateFormat", "dd MMMM yyyy"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CenterHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CenterHelper.java index 53bdfc758b1..664d0a690e1 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CenterHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CenterHelper.java @@ -43,6 +43,10 @@ private CenterHelper() { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static CenterDomain retrieveByID(int id, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String GET_CENTER_BY_ID_URL = CENTERS_URL + "/" + id + "?associations=groupMembers&" + Utils.TENANT_IDENTIFIER; LOG.info("------------------------ RETRIEVING CENTER AT {}-------------------------", id); @@ -51,6 +55,10 @@ public static CenterDomain retrieveByID(int id, final RequestSpecification reque return new Gson().fromJson(jsonData, new TypeToken<CenterDomain>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<CenterDomain> paginatedListCenters(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String GET_CENTER = CENTERS_URL + "?paged=true&limit=-1&" + Utils.TENANT_IDENTIFIER; @@ -60,6 +68,10 @@ public static ArrayList<CenterDomain> paginatedListCenters(final RequestSpecific return new Gson().fromJson(jsonData, new TypeToken<ArrayList<CenterDomain>>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<CenterDomain> listCenters(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String GET_CENTER = CENTERS_URL + "?limit=-1&" + Utils.TENANT_IDENTIFIER; LOG.info("------------------------ RETRIEVING CENTERS-------------------------"); @@ -68,6 +80,10 @@ public static ArrayList<CenterDomain> listCenters(final RequestSpecification req return new Gson().fromJson(jsonData, new TypeToken<ArrayList<CenterDomain>>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<CenterDomain> listCentersOrdered(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String GET_CENTER = CENTERS_URL + "?limit=-1&orderBy=id&sortOrder=asc&" + Utils.TENANT_IDENTIFIER; @@ -77,21 +93,37 @@ public static ArrayList<CenterDomain> listCentersOrdered(final RequestSpecificat return new Gson().fromJson(jsonData, new TypeToken<ArrayList<CenterDomain>>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static int createCenter(final String name, final int officeId, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return createCenter(name, officeId, null, -1, null, null, requestSpec, responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static int createCenter(final String name, final int officeId, final String activationDate, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return createCenter(name, officeId, null, -1, null, activationDate, requestSpec, responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static int createCenter(final String name, final int officeId, final String externalId, final int staffId, final int[] groupMembers, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return createCenter(name, officeId, externalId, staffId, groupMembers, null, requestSpec, responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static int createCenter(final String name, final int officeId, final String externalId, final int staffId, final int[] groupMembers, final String activationDate, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { @@ -121,6 +153,10 @@ public static int createCenter(final String name, final int officeId, final Stri return Utils.performServerPost(requestSpec, responseSpec, CREATE_CENTER_URL, new Gson().toJson(hm), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, String> updateCenter(final int id, HashMap request, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String UPDATE_CENTER_URL = CENTERS_URL + "/" + id + "?" + Utils.TENANT_IDENTIFIER; @@ -130,6 +166,10 @@ public static HashMap<String, String> updateCenter(final int id, HashMap request return hash; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static int[] associateGroups(final int id, final int[] groupMembers, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String ASSOCIATE_GROUP_CENTER_URL = CENTERS_URL + "/" + id + "?command=associateGroups&" + Utils.TENANT_IDENTIFIER; @@ -147,30 +187,50 @@ public static int[] associateGroups(final int id, final int[] groupMembers, fina return ret; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void deleteCenter(final int id, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String DELETE_CENTER_URL = CENTERS_URL + "/" + id + "?" + Utils.TENANT_IDENTIFIER; LOG.info("---------------------------------DELETING CENTER AT {}--------------------------------------------", id); Utils.performServerDelete(requestSpec, responseSpec, DELETE_CENTER_URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCenter(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, @SuppressWarnings("unused") final boolean active) { LOG.info("---------------------------------CREATING A CENTER---------------------------------------------"); return createCenter(requestSpec, responseSpec, "CREATED_DATE"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCenter(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate) { LOG.info("---------------------------------CREATING A CENTER---------------------------------------------"); return Utils.performServerPost(requestSpec, responseSpec, CREATE_CENTER_URL, getTestCenterAsJSON(true, activationDate), "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCenter(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("---------------------------------CREATING A CENTER---------------------------------------------"); return Utils.performServerPost(requestSpec, responseSpec, CREATE_CENTER_URL, getTestCenterAsJSON(true, CenterHelper.CREATED_DATE), "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static int createCenterWithStaffId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer staffId) { LOG.info("---------------------------------CREATING A CENTER---------------------------------------------"); @@ -178,6 +238,10 @@ public static int createCenterWithStaffId(final RequestSpecification requestSpec getTestCenterWithStaffAsJSON(true, CenterHelper.CREATED_DATE, staffId), "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyCenterCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedCenterID) { LOG.info("------------------------------CHECK CENTER DETAILS------------------------------------\n"); @@ -186,6 +250,10 @@ public static void verifyCenterCreatedOnServer(final RequestSpecification reques assertEquals(generatedCenterID, responseCenterID, "ERROR IN CREATING THE CENTER"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyCenterActivatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedCenterID, final boolean generatedCenterStatus) { LOG.info("------------------------------CHECK CENTER STATUS------------------------------------\n"); @@ -194,6 +262,10 @@ public static void verifyCenterActivatedOnServer(final RequestSpecification requ assertEquals(generatedCenterStatus, responseCenterStatus, "ERROR IN ACTIVATING THE CENTER"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer activateCenter(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String centerId) { final String CENTER_ASSOCIATE_URL = "/fineract-provider/api/v1/centers/" + centerId + "?command=activate&" @@ -202,6 +274,10 @@ public static Integer activateCenter(final RequestSpecification requestSpec, fin return Utils.performServerPost(requestSpec, responseSpec, CENTER_ASSOCIATE_URL, activateCenterAsJSON(""), "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestCenterWithStaffAsJSON(final boolean active, final String activationDate, final Integer staffId) { Integer id = null; @@ -220,6 +296,10 @@ public static String getTestCenterWithStaffAsJSON(final boolean active, final St externalId, staffId, officeID, officeName, hierarchy, groupMembers); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestCenterAsJSON(final boolean active, final String activationDate) { Integer id = null; @@ -240,6 +320,10 @@ public static String getTestCenterAsJSON(final boolean active, final String acti } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String assignStaffAsJSON(final Long staffId) { final HashMap<String, Object> map = new HashMap<>(); map.put("staffId", staffId); @@ -247,6 +331,10 @@ public static String assignStaffAsJSON(final Long staffId) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String unassignStaffAsJSON(final Long staffId) { final HashMap<String, Object> map = new HashMap<>(); map.put("staffId", staffId); @@ -254,6 +342,10 @@ public static String unassignStaffAsJSON(final Long staffId) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String activateCenterAsJSON(final String activationDate) { final HashMap<String, String> map = new HashMap<>(); map.put("dateFormat", "dd MMMM yyyy"); @@ -272,6 +364,10 @@ public static String randomNameGenerator(final String prefix, final int lenOfRan return Utils.uniqueRandomStringGenerator(prefix, lenOfRandomSuffix); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object assignStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId, final Long staffId) { final String GROUP_ASSIGN_STAFF_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER @@ -280,6 +376,10 @@ public static Object assignStaff(final RequestSpecification requestSpec, final R return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSIGN_STAFF_URL, assignStaffAsJSON(staffId), "changes"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object unassignStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId, final Long staffId) { final String GROUP_ASSIGN_STAFF_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ClientHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ClientHelper.java index 82c8f54f84a..44b1fee6e78 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ClientHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ClientHelper.java @@ -96,6 +96,10 @@ public class ClientHelper extends IntegrationTest { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, PostClientsRequest request) { log.info("---------------------------------CREATING A CLIENT---------------------------------------------"); @@ -143,6 +147,10 @@ public PageClientSearchData searchClients(PagedRequestClientTextSearch request) return ok(fineract().clientSearchV2.searchByText(request)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostClientsResponse addClientAsPerson(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String jsonPayload) { final String response = Utils.performServerPost(requestSpec, responseSpec, CREATE_CLIENT_URL, jsonPayload); @@ -150,6 +158,10 @@ public static PostClientsResponse addClientAsPerson(final RequestSpecification r return GSON.fromJson(response, PostClientsResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PutClientsClientIdResponse updateClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String externalId, final String jsonPayload) { final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "?" + Utils.TENANT_IDENTIFIER; @@ -158,6 +170,10 @@ public static PutClientsClientIdResponse updateClient(final RequestSpecification return GSON.fromJson(response, PutClientsClientIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static DeleteClientsClientIdResponse deleteClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String externalId) { final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "?" + Utils.TENANT_IDENTIFIER; @@ -166,6 +182,10 @@ public static DeleteClientsClientIdResponse deleteClient(final RequestSpecificat return GSON.fromJson(response, DeleteClientsClientIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetClientsClientIdAccountsResponse getClientAccounts(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String externalId) { final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "/accounts?" + Utils.TENANT_IDENTIFIER; @@ -174,6 +194,10 @@ public static GetClientsClientIdAccountsResponse getClientAccounts(final Request return GSON.fromJson(response, GetClientsClientIdAccountsResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetClientTransferProposalDateResponse getProposedTransferDate(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String externalId) { final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "/transferproposaldate?" + Utils.TENANT_IDENTIFIER; @@ -182,6 +206,10 @@ public static GetClientTransferProposalDateResponse getProposedTransferDate(fina return GSON.fromJson(response, GetClientTransferProposalDateResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<GetObligeeData> getObligeeData(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String externalId) { final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "/obligeedetails?" + Utils.TENANT_IDENTIFIER; @@ -190,15 +218,27 @@ public static List<GetObligeeData> getObligeeData(final RequestSpecification req return GSON.fromJson(response, new TypeToken<List<GetObligeeData>>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return createClient(requestSpec, responseSpec, DEFAULT_DATE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate) { return createClient(requestSpec, responseSpec, activationDate, "1"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate, final String officeId) { log.info("---------------------------------CREATING A CLIENT---------------------------------------------"); @@ -206,6 +246,10 @@ public static Integer createClient(final RequestSpecification requestSpec, final "clientId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostClientsResponse createClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate, final String officeId, final String externalId) { log.info("---------------------------------CREATING A CLIENT---------------------------------------------"); @@ -214,6 +258,10 @@ public static PostClientsResponse createClient(final RequestSpecification reques return GSON.fromJson(response, PostClientsResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostClientClientIdAddressesResponse createClientAddress(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, long clientId, long addressTypeId, PostClientClientIdAddressesRequest request) { final String CREATE_CLIENT_ADDRESS_URL = "/fineract-provider/api/v1/client/" + clientId + "/addresses?type=" + addressTypeId + "&" @@ -224,15 +272,27 @@ public static PostClientClientIdAddressesResponse createClientAddress(final Requ return GSON.fromJson(response, PostClientClientIdAddressesResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientPending(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return createClientPending(requestSpec, responseSpec, "04 March 2014"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientPending(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String submittedOnDate) { return createClientPending(requestSpec, responseSpec, submittedOnDate, "1"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientPending(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String submittedOnDate, final String officeId) { log.info("---------------------------------CREATING A CLIENT IN PENDING---------------------------------------------"); @@ -240,12 +300,20 @@ public static Integer createClientPending(final RequestSpecification requestSpec "clientId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object createClientPendingWithError(final String jsonAttributeToGetBack) { log.info("---------------------------------CREATING A CLIENT IN PENDING WITH ERROR---------------------------------------------"); return Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_CLIENT_URL, getTestClientAsJSONPending("04 March 2014", "1"), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientPendingWithDatatable(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String registeredTableName) { log.info("-------------------------- CREATING A CLIENT IN PENDING WITH DATATABLES --------------------------------"); @@ -253,15 +321,27 @@ public static Integer createClientPendingWithDatatable(final RequestSpecificatio getTestPendingClientWithDatatableAsJson(registeredTableName), "clientId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientAsPerson(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return createClientAsPerson(requestSpec, responseSpec, DEFAULT_DATE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientAsPerson(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate) { return createClientAsPerson(requestSpec, responseSpec, activationDate, "1"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientAsPerson(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate, final String officeId) { @@ -271,6 +351,10 @@ public static Integer createClientAsPerson(final RequestSpecification requestSpe "clientId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostClientsResponse createClientAsPersonWithDatatable(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate, final String officeId, final HashMap<String, Object> datatables) { @@ -280,15 +364,27 @@ public static PostClientsResponse createClientAsPersonWithDatatable(final Reques return GSON.fromJson(response, PostClientsResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientAsEntity(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return createClientAsEntity(requestSpec, responseSpec, DEFAULT_DATE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientAsEntity(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate) { return createClientAsEntity(requestSpec, responseSpec, activationDate, "1"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientAsEntity(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate, final String officeId) { @@ -302,6 +398,10 @@ public static Integer createClientAsEntity(final RequestSpecification requestSpe getTestEntityClientAsJSON(activationDate, officeId, soleProprietorCodeValueId), "clientId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientForAccountPreference(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer clientType, String jsonAttributeToGetBack) { final String activationDate = DEFAULT_DATE; @@ -312,6 +412,10 @@ public static Integer createClientForAccountPreference(final RequestSpecificatio getTestClientWithClientTypeAsJSON(activationDate, officeId, clientType.toString()), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object assignStaffToClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String clientId, final String staffId) { final String CLIENT_ASSIGN_STAFF_URL = "/fineract-provider/api/v1/clients/" + clientId + "?" + Utils.TENANT_IDENTIFIER @@ -321,15 +425,27 @@ public static Object assignStaffToClient(final RequestSpecification requestSpec, return Utils.performServerPost(requestSpec, responseSpec, CLIENT_ASSIGN_STAFF_URL, assignStaffToClientAsJson(staffId), "changes"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer getClientsStaffId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String clientId) { return (Integer) getClient(requestSpec, responseSpec, clientId, "staffId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> setInitialClientValues(final String officeId, final Long legalFormId) { return setInitialClientValues(officeId, legalFormId, UUID.randomUUID().toString()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> setInitialClientValues(final String officeId, final Long legalFormId, final String externalId) { HashMap<String, Object> map = new HashMap<>(); map.put("officeId", officeId); @@ -344,6 +460,10 @@ public static HashMap<String, Object> setInitialClientValues(final String office return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getBasicClientAsJSON(final String officeId, final Long legalFormId, final String externalId) { HashMap<String, Object> map = setInitialClientValues(officeId, legalFormId, externalId); map.put("active", "true"); @@ -353,6 +473,10 @@ public static String getBasicClientAsJSON(final String officeId, final Long lega return basicClientAsJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestClientAsJSON(final String dateOfJoining, final String officeId) { HashMap<String, Object> map = setInitialClientValues(officeId, LEGALFORM_ID_PERSON); map.put("active", "true"); @@ -362,6 +486,10 @@ public static String getTestClientAsJSON(final String dateOfJoining, final Strin return testClientAsJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestClientAsJSONPending(final String submittedOnDate, final String officeId) { HashMap<String, Object> map = setInitialClientValues(officeId, LEGALFORM_ID_PERSON); map.put("active", "false"); @@ -370,6 +498,10 @@ public static String getTestClientAsJSONPending(final String submittedOnDate, fi return GSON.toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestPendingClientWithDatatableAsJson(final String registeredTableName) { HashMap<String, Object> map = setInitialClientValues("1", LEGALFORM_ID_PERSON); map.put("active", "false"); @@ -379,6 +511,10 @@ public static String getTestPendingClientWithDatatableAsJson(final String regist return requestJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestDatatableAsJson(HashMap<String, Object> map, final String registeredTableName) { List<HashMap<String, Object>> datatablesListMap = new ArrayList<>(); HashMap<String, Object> datatableMap = new HashMap<>(); @@ -396,6 +532,10 @@ public static String getTestDatatableAsJson(HashMap<String, Object> map, final S return GSON.toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestPersonClientAsJSON(final String dateOfJoining, final String officeId) { final HashMap<String, Object> map = new HashMap<>(); map.put("officeId", officeId); @@ -411,6 +551,10 @@ public static String getTestPersonClientAsJSON(final String dateOfJoining, final return GSON.toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestPersonClientAsJSON(final String dateOfJoining, final String officeId, final HashMap<String, Object> datatables) { final HashMap<String, Object> map = new HashMap<>(); @@ -430,6 +574,10 @@ public static String getTestPersonClientAsJSON(final String dateOfJoining, final return GSON.toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestEntityClientAsJSON(final String dateOfJoining, final String officeId, final Integer soleProprietorCodeValueId) { final HashMap<String, Object> map = new HashMap<>(); @@ -450,6 +598,10 @@ public static String getTestEntityClientAsJSON(final String dateOfJoining, final return GSON.toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestClientWithClientTypeAsJSON(final String dateOfJoining, final String officeId, final String clientType) { HashMap<String, Object> map = setInitialClientValues("1", LEGALFORM_ID_PERSON); map.put("active", "true"); @@ -459,6 +611,10 @@ public static String getTestClientWithClientTypeAsJSON(final String dateOfJoinin return GSON.toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String assignStaffToClientAsJson(final String staffId) { final HashMap<String, String> map = new HashMap<>(); map.put("staffId", staffId); @@ -466,6 +622,10 @@ public static String assignStaffToClientAsJson(final String staffId) { return GSON.toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyClientCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer clientId) { log.info("------------------------------CHECK CLIENT DETAILS------------------------------------\n"); @@ -474,12 +634,20 @@ public static void verifyClientCreatedOnServer(final RequestSpecification reques assertEquals(clientId, responseClientID, "ERROR IN CREATING THE CLIENT"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetClientsClientIdResponse getClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final int clientId) { String clientResponseStr = (String) getClient(requestSpec, responseSpec, Integer.toString(clientId), null); return GSON.fromJson(clientResponseStr, GetClientsClientIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetClientsClientIdResponse getClientByExternalId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String externalId) { final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "?" + Utils.TENANT_IDENTIFIER; @@ -487,6 +655,10 @@ public static GetClientsClientIdResponse getClientByExternalId(final RequestSpec return GSON.fromJson(response, GetClientsClientIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<GetClientClientIdAddressesResponse> getClientAddresses(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final int clientId) { final String GET_CLIENT_ADDRESSES_URL = "/fineract-provider/api/v1/client/" + clientId + "/addresses?" + Utils.TENANT_IDENTIFIER; @@ -495,6 +667,10 @@ public static List<GetClientClientIdAddressesResponse> getClientAddresses(final return GSON.fromJson(clientResponseStr, new TypeToken<List<GetClientClientIdAddressesResponse>>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object getClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String clientId, final String jsonReturn) { final String GET_CLIENT_URL = "/fineract-provider/api/v1/clients/" + clientId + "?" + Utils.TENANT_IDENTIFIER; @@ -502,6 +678,10 @@ public static Object getClient(final RequestSpecification requestSpec, final Res return Utils.performServerGet(requestSpec, responseSpec, GET_CLIENT_URL, jsonReturn); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> getClientAuditFields(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer clientId, final String jsonReturn) { final String GET_CLIENT_URL = "/fineract-provider/api/v1/internal/client/" + clientId + "/audit?" + Utils.TENANT_IDENTIFIER; @@ -509,6 +689,10 @@ public static HashMap<String, Object> getClientAuditFields(final RequestSpecific return Utils.performServerGet(requestSpec, responseSpec, GET_CLIENT_URL, jsonReturn); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) /* Client status is a map.So adding SuppressWarnings */ @SuppressWarnings("unchecked") public static HashMap<String, Object> getClientStatus(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, @@ -516,6 +700,10 @@ public static HashMap<String, Object> getClientStatus(final RequestSpecification return (HashMap<String, Object>) getClient(requestSpec, responseSpec, clientId, "status"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getCloseClientAsJSON() { final HashMap<String, String> map = new HashMap<>(); @@ -538,6 +726,10 @@ public String getCloseClientAsJSON() { return clientJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getReactivateClientAsJSON() { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -548,6 +740,10 @@ public String getReactivateClientAsJSON() { return clientJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getUndoRejectClientAsJSON(final String date) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -559,6 +755,10 @@ private String getUndoRejectClientAsJSON(final String date) { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getUndoWithdrawnClientAsJSON(final String date) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -570,6 +770,10 @@ private String getUndoWithdrawnClientAsJSON(final String date) { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getRejectClientAsJSON() { final HashMap<String, String> map = new HashMap<>(); /* Retrieve Code id for the Code "ClientRejectReason" */ @@ -592,6 +796,10 @@ public String getRejectClientAsJSON() { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getActivateClientAsJSON(String date) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -602,6 +810,10 @@ public static String getActivateClientAsJSON(String date) { return clientJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getWithdrawClientAsJSON() { final HashMap<String, String> map = new HashMap<>(); /* Retrieve Code id for the Code "ClientWithdrawReason" */ @@ -623,6 +835,10 @@ private String getWithdrawClientAsJSON() { return clientJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSpecifiedDueDateChargesClientAsJSON(final String chargeId, final String dueDate) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en_GB"); @@ -634,6 +850,10 @@ public static String getSpecifiedDueDateChargesClientAsJSON(final String chargeI return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getPayChargeJSON(final String date, String amount) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en_GB"); @@ -645,6 +865,10 @@ public static String getPayChargeJSON(final String date, String amount) { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getPayChargeJSONWithExternalId(final String date, String amount, String externalId) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en_GB"); @@ -657,6 +881,10 @@ public static String getPayChargeJSONWithExternalId(final String date, String am return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getWaiveChargeJSON(final String amount, String clientChargeId) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en_GB"); @@ -667,48 +895,84 @@ public static String getWaiveChargeJSON(final String amount, String clientCharge return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> closeClient(final Integer clientId) { log.info("--------------------------------- CLOSE CLIENT -------------------------------"); return performClientActions(createClientOperationURL(CLOSE_CLIENT_COMMAND, clientId), getCloseClientAsJSON(), clientId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> reactivateClient(final Integer clientId) { log.info("--------------------------------- REACTIVATE CLIENT -------------------------------"); return performClientActions(createClientOperationURL(REACTIVATE_CLIENT_COMMAND, clientId), getReactivateClientAsJSON(), clientId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> rejectClient(final Integer clientId) { log.info("--------------------------------- REJECT CLIENT -------------------------------"); return performClientActions(createClientOperationURL(REJECT_CLIENT_COMMAND, clientId), getRejectClientAsJSON(), clientId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> activateClient(final Integer clientId) { log.info("--------------------------------- ACTIVATE CLIENT -------------------------------"); return performClientActions(createClientOperationURL(ACTIVATE_CLIENT_COMMAND, clientId), getActivateClientAsJSON(CREATED_DATE_PLUS_ONE), clientId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> withdrawClient(final Integer clientId) { log.info("--------------------------------- WITHDRAWN CLIENT -------------------------------"); return performClientActions(createClientOperationURL(WITHDRAW_CLIENT_COMMAND, clientId), getWithdrawClientAsJSON(), clientId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createClientOperationURL(final String command, final Integer clientId) { return CLIENT_URL + "/" + clientId + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> undoReject(final Integer clientId) { log.info("--------------------------------- UNDO REJECT CLIENT -------------------------------"); return performClientActions(createClientOperationURL(UNDOREJECT_CLIENT_COMMAND, clientId), getUndoRejectClientAsJSON(CREATED_DATE_PLUS_TWO), clientId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> undoWithdrawn(final Integer clientId) { log.info("--------------------------------- UNDO WITHDRAWN CLIENT -------------------------------"); return performClientActions(createClientOperationURL(UNDOWITHDRAWN_CLIENT_COMMAND, clientId), getUndoWithdrawnClientAsJSON(CREATED_DATE_PLUS_TWO), clientId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList<HashMap<String, Object>> undoRejectedclient(final Integer clientId, final String jsonAttributeToGetBack, final String rejectedDate) { log.info("----------------------------------UNDO REJECT CLIENT ----------------------------------"); @@ -716,6 +980,10 @@ public ArrayList<HashMap<String, Object>> undoRejectedclient(final Integer clien getUndoRejectClientAsJSON(rejectedDate), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList<HashMap<String, Object>> undoWithdrawclient(final Integer clientId, final String jsonAttributeToGetBack, final String rejectedDate) { log.info("----------------------------------UNDO WITHDRAW CLIENT ----------------------------------"); @@ -723,23 +991,39 @@ public ArrayList<HashMap<String, Object>> undoWithdrawclient(final Integer clien getUndoWithdrawnClientAsJSON(rejectedDate), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList<HashMap<String, Object>> activateClient(final Integer clientId, final String jsonAttributeToGetBack) { log.info("--------------------------------- ACTIVATE CLIENT -------------------------------"); return performClientActionsWithValidationErrors(createClientOperationURL(ACTIVATE_CLIENT_COMMAND, clientId), getActivateClientAsJSON(CREATED_DATE_PLUS_ONE), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> activateClientWithDiffDateOption(final Integer clientId, final String activationDate) { log.info("--------------------------------- ACTIVATE CLIENT -------------------------------"); return performClientActions(createClientOperationURL(ACTIVATE_CLIENT_COMMAND, clientId), getActivateClientAsJSON(activationDate), clientId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private ArrayList<HashMap<String, Object>> performClientActionsWithValidationErrors(final String postURLForClient, final String jsonToBeSent, final String jsonAttributeToGetBack) { return Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForClient, jsonToBeSent, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private HashMap<String, Object> performClientActions(final String postURLForClient, final String jsonToBeSent, final Integer clientId) { Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForClient, jsonToBeSent, CommonConstants.RESPONSE_STATUS); HashMap<String, Object> response = ClientHelper.getClientStatus(requestSpec, responseSpec, String.valueOf(clientId)); @@ -747,6 +1031,10 @@ private HashMap<String, Object> performClientActions(final String postURLForClie return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostClientsClientIdResponse performClientActionUsingExternalId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String externalId, final String command, final String jsonPayload) { final String url = CLIENT_EXTERNALID_URL + "/" + externalId + "?" + Utils.TENANT_IDENTIFIER + "&command=" + command; @@ -754,6 +1042,10 @@ public static PostClientsClientIdResponse performClientActionUsingExternalId(fin return GSON.fromJson(response, PostClientsClientIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer addChargesForClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer clientId, final String request) { log.info("--------------------------------- ADD CHARGES FOR Client --------------------------------"); @@ -762,6 +1054,10 @@ public static Integer addChargesForClient(final RequestSpecification requestSpec return (Integer) response.get("resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String payChargesForClients(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer clientId, final Integer clientChargeId, final String json) { log.info("--------------------------------- PAY CHARGES FOR CLIENT --------------------------------"); @@ -771,6 +1067,10 @@ public static String payChargesForClients(final RequestSpecification requestSpec return response.get("transactionId") != null ? response.get("transactionId").toString() : null; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String payChargesForClientsTransactionExternalId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer clientId, final Integer clientChargeId, final String json) { log.info("--------------------------------- PAY CHARGES FOR CLIENT --------------------------------"); @@ -780,6 +1080,10 @@ public static String payChargesForClientsTransactionExternalId(final RequestSpec return response.get("subResourceExternalId") != null ? response.get("subResourceExternalId").toString() : null; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String waiveChargesForClients(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer clientId, final Integer clientChargeId, final String json) { log.info("--------------------------------- WAIVE CHARGES FOR CLIENT --------------------------------"); @@ -790,6 +1094,10 @@ public static String waiveChargesForClients(final RequestSpecification requestSp return response.get("transactionId").toString(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer revertClientChargeTransaction(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String clientId, String clientChargeId) { log.info("---------------------------------UNDO TRANSACTION---------------------------------------------"); @@ -801,6 +1109,10 @@ public static Integer revertClientChargeTransaction(final RequestSpecification r } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object getClientCharge(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String clientId, final String clientChargeId) { log.info("---------------------------------GET CLIENT CHARGE---------------------------------------------"); @@ -809,6 +1121,10 @@ public static Object getClientCharge(final RequestSpecification requestSpec, fin return Utils.performServerGet(requestSpec, responseSpec, CHARGES_URL, "amountOutstanding"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Boolean getClientTransactions(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String clientId, final String transactionId) { log.info("---------------------------------GET CLIENT CHARGE TRANSACTIONS---------------------------------------------"); @@ -841,6 +1157,10 @@ public PostClientsClientIdTransactionsTransactionIdResponse undoClientTransactio return ok(fineract().clientTransactions.undoClientTransaction1(clientId, transactionExternalId, "undo")); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Workbook getClientEntityWorkbook(GlobalEntityType clientsEntity, String dateFormat) throws IOException { requestSpec.header(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel"); byte[] byteArray = Utils.performGetBinaryResponse(requestSpec, responseSpec, CLIENT_URL + "/downloadtemplate" + "?" @@ -850,12 +1170,20 @@ public Workbook getClientEntityWorkbook(GlobalEntityType clientsEntity, String d return workbook; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getOutputTemplateLocation(final String importDocumentId) { requestSpec.header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN); return Utils.performServerOutputTemplateLocationGet(requestSpec, responseSpec, "/fineract-provider/api/v1/imports/getOutputTemplateLocation" + "?" + Utils.TENANT_IDENTIFIER, importDocumentId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String importClientEntityTemplate(File file) { String locale = "en"; String dateFormat = "dd MMMM yyyy"; @@ -865,6 +1193,10 @@ public String importClientEntityTemplate(File file) { legalFormType, file, locale, dateFormat); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List getClientWithStatus(final int limit, final String status) { final String URL = "/fineract-provider/api/v1/clients?paged=true&status=" + status + "&limit=" + Integer.toString(limit) + "&" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CollateralManagementHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CollateralManagementHelper.java index b5ec616174c..d973bb68aed 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CollateralManagementHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CollateralManagementHelper.java @@ -34,11 +34,19 @@ public class CollateralManagementHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public CollateralManagementHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientCollateral(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String clientId, final Integer collateralId) { LOG.info("---------------------------------CREATING A CLIENT_COLLATERAL---------------------------------------------"); @@ -48,6 +56,10 @@ public static Integer createClientCollateral(final RequestSpecification requestS clientCollateralAsJson(collateralId, BigDecimal.valueOf(100)), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object getClientCollateralData(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer collateralId, final String clientId) { final String CLIENT_COLLATERAL_URL = "/fineract-provider/api/v1/clients" + clientId + "/collaterals/" + collateralId + "?" @@ -55,6 +67,10 @@ public static Object getClientCollateralData(final RequestSpecification requestS return Utils.performServerGet(requestSpec, responseSpec, CLIENT_COLLATERAL_URL, "quantity"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String clientCollateralAsJson(final Integer collateralId, final BigDecimal quantity) { final HashMap<String, String> map = new HashMap<>(); map.put("collateralId", collateralId.toString()); @@ -64,6 +80,10 @@ public static String clientCollateralAsJson(final Integer collateralId, final Bi return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCollateralProduct(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("---------------------------------CREATING A COLLATERAL_PRODUCT---------------------------------------------"); final String COLLATERAL_PRODUCT_URL = "/fineract-provider/api/v1/collateral-management" + "?" + Utils.TENANT_IDENTIFIER; @@ -73,6 +93,10 @@ public static Integer createCollateralProduct(final RequestSpecification request "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String collateralProductAsJson(final String name, final String currency, final String unitType, final String quality, final BigDecimal pctToBase, final BigDecimal baseAmount, final String locale) { final HashMap<String, String> map = new HashMap<>(); @@ -87,6 +111,10 @@ public static String collateralProductAsJson(final String name, final String cur return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer updateCollateralProduct(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer collateralId) { LOG.info("---------------------------------UPDATING A COLLATERAL_PRODUCT---------------------------------------------"); @@ -98,6 +126,10 @@ public static Integer updateCollateralProduct(final RequestSpecification request "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updateCollateralProductAsString(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer collateralId) { @@ -111,6 +143,10 @@ public static String updateCollateralProductAsString(final RequestSpecification return value; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updateCollateralProductAsJson(final String name, final String currency, final String unitType, final String quality, final BigDecimal pctToBase, final BigDecimal baseAmount, final String locale) { final HashMap<String, String> map = new HashMap<>(); @@ -124,6 +160,10 @@ public static String updateCollateralProductAsJson(final String name, final Stri return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap updateClientCollateral(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer collateralId) { final Integer clientID = ClientHelper.createClient(requestSpec, responseSpec); @@ -135,6 +175,10 @@ public static HashMap updateClientCollateral(final RequestSpecification requestS "changes"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updateClientCollateralAsString(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer collateralId) { @@ -148,6 +192,10 @@ public static String updateClientCollateralAsString(final RequestSpecification r return value; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updateClientCollateralAsJson(final BigDecimal quantity) { final HashMap<String, String> map = new HashMap<>(); map.put("quantity", quantity.toString()); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CreditBureauConfigurationHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CreditBureauConfigurationHelper.java index 70bb3b43b9f..01943334791 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CreditBureauConfigurationHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CreditBureauConfigurationHelper.java @@ -38,11 +38,19 @@ public class CreditBureauConfigurationHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public CreditBureauConfigurationHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<Map<String, Object>> getCreditBureauConfiguration(RequestSpecification requestSpec, ResponseSpecification responseSpec, String creditBureauId) { LOG.info("---------------------------------GET A CREDIT_BUREAU_CONFIGURATION---------------------------------------------"); @@ -51,11 +59,19 @@ public static List<Map<String, Object>> getCreditBureauConfiguration(RequestSpec return JsonPath.from(Utils.performServerGet(requestSpec, responseSpec, CREDITBUREAU_CONFIGURATION_URL)).getList(""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCreditBureauConfiguration(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String configKey) { return createCreditBureauConfiguration(requestSpec, responseSpec, "1", configKey); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCreditBureauConfiguration(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String creditBureauId, String configKey, String value, String description) { LOG.info("---------------------------------CREATING A CREDIT_BUREAU_CONFIGURATION---------------------------------------------"); @@ -65,6 +81,10 @@ public static Integer createCreditBureauConfiguration(final RequestSpecification creditBureauConfigurationAsJson(configKey, value, description), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCreditBureauConfiguration(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String creditBureauId, String configKey) { LOG.info("---------------------------------CREATING A CREDIT_BUREAU_CONFIGURATION---------------------------------------------"); @@ -76,7 +96,10 @@ public static Integer createCreditBureauConfiguration(final RequestSpecification * ResponseSpecification responseSpec, final Integer ConfigurationId) { return * updateCreditBureauConfiguration(requestSpec, responseSpec, ConfigurationId); } */ - + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updateCreditBureauConfiguration(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer ConfigurationId) { @@ -91,6 +114,10 @@ public static String updateCreditBureauConfiguration(final RequestSpecification return value; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updateCreditBureauConfiguration(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer ConfigurationId, String configKey, final String updateConfigKeyValue) { LOG.info("---------------------------------UPDATING A CREDIT_BUREAU_CONFIGURATION---------------------------------------------"); @@ -100,6 +127,10 @@ public static Object updateCreditBureauConfiguration(final RequestSpecification updateCreditBureauConfigurationAsJson(configKey, updateConfigKeyValue), "changes"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object getOrganizationCreditBureauConfiguration(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("---------------------------------GETTING A CREDIT_BUREAU_CONFIGURATION---------------------------------------------"); @@ -108,6 +139,10 @@ public static Object getOrganizationCreditBureauConfiguration(final RequestSpeci return Utils.performServerGet(requestSpec, responseSpec, CREDITBUREAU_CONFIGURATION_URL, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object addOrganisationCreditBureau(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String creditBureauId, String alias, boolean isActive) { LOG.info("---------------------------------CREATING A CREDIT_BUREAU_CONFIGURATION---------------------------------------------"); @@ -116,6 +151,10 @@ public static Object addOrganisationCreditBureau(final RequestSpecification requ return Utils.performServerPost(requestSpec, responseSpec, URL, addOrganizationCreditBureauCreateAsJson(alias, isActive), null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updateOrganisationCreditBureau(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String creditBureauId, boolean isActive) { LOG.info("---------------------------------CREATING A CREDIT_BUREAU_CONFIGURATION---------------------------------------------"); @@ -124,6 +163,10 @@ public static Object updateOrganisationCreditBureau(final RequestSpecification r null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String addOrganizationCreditBureauCreateAsJson(final String alias, final boolean isActive) { final HashMap<String, Object> map = new HashMap<>(); map.put("alias", alias); @@ -132,6 +175,10 @@ public static String addOrganizationCreditBureauCreateAsJson(final String alias, return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updateOrganizationCreditBureauCreateAsJson(final String creditBureauId, final boolean isActive) { final HashMap<String, Object> map = new HashMap<>(); map.put("creditBureauId", creditBureauId); @@ -140,6 +187,10 @@ public static String updateOrganizationCreditBureauCreateAsJson(final String cre return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String creditBureauConfigurationAsJson(final String configkey, final String value, final String description) { final HashMap<String, String> map = new HashMap<>(); map.put("configkey", configkey); @@ -149,6 +200,10 @@ public static String creditBureauConfigurationAsJson(final String configkey, fin return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updateCreditBureauConfigurationAsJson(final String configKey, final String value) { final HashMap<String, String> map = new HashMap<>(); if (configKey != null) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CreditBureauIntegrationHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CreditBureauIntegrationHelper.java index 4e19d0bfe0a..974f25bb255 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CreditBureauIntegrationHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CreditBureauIntegrationHelper.java @@ -34,11 +34,19 @@ public class CreditBureauIntegrationHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public CreditBureauIntegrationHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object getCreditReport(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String creditBureauId, String nrc) { LOG.info("---------------------------------CREATING A CREDIT_BUREAU_CONFIGURATION---------------------------------------------"); @@ -58,6 +66,10 @@ public static String uploadCreditReport(final RequestSpecification requestSpec, .asString(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createGetCreditReportAsJson(final String creditBureauId, final String nrc) { final HashMap<String, String> map = new HashMap<>(); map.put("creditBureauID", creditBureauId); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CurrenciesHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CurrenciesHelper.java index 5dbec8c1c39..e7556a71c2c 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CurrenciesHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/CurrenciesHelper.java @@ -37,6 +37,10 @@ private CurrenciesHelper() { private static final Logger LOG = LoggerFactory.getLogger(CurrenciesHelper.class); private static final String CURRENCIES_URL = "/fineract-provider/api/v1/currencies"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<CurrencyDomain> getAllCurrencies(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String GET_ALL_CURRENCIES_URL = CURRENCIES_URL + "?" + Utils.TENANT_IDENTIFIER; @@ -49,6 +53,10 @@ public static ArrayList<CurrencyDomain> getAllCurrencies(final RequestSpecificat return new Gson().fromJson(jsonData, new TypeToken<ArrayList<CurrencyDomain>>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<CurrencyDomain> getSelectedCurrencies(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String GET_ALL_SELECTED_CURRENCIES_URL = CURRENCIES_URL + "?fields=selectedCurrencyOptions" + "&" + Utils.TENANT_IDENTIFIER; @@ -58,6 +66,10 @@ public static ArrayList<CurrencyDomain> getSelectedCurrencies(final RequestSpeci return new Gson().fromJson(jsonData, new TypeToken<ArrayList<CurrencyDomain>>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static CurrencyDomain getCurrencybyCode(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String code) { ArrayList<CurrencyDomain> currenciesList = getAllCurrencies(requestSpec, responseSpec); @@ -69,6 +81,10 @@ public static CurrencyDomain getCurrencybyCode(final RequestSpecification reques return null; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<String> updateSelectedCurrencies(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final ArrayList<String> currencies) { final String CURRENCIES_UPDATE_URL = CURRENCIES_URL + "?" + Utils.TENANT_IDENTIFIER; @@ -77,6 +93,10 @@ public static ArrayList<String> updateSelectedCurrencies(final RequestSpecificat return (ArrayList<String>) hash.get("currencies"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String currenciesToJSON(final ArrayList<String> currencies) { HashMap map = new HashMap<>(); map.put("currencies", currencies); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalEventConfigurationHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalEventConfigurationHelper.java index 908f1b70f65..2a9cfc1320b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalEventConfigurationHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalEventConfigurationHelper.java @@ -35,6 +35,10 @@ protected ExternalEventConfigurationHelper() {} private static final String EXTERNAL_EVENT_CONFIGURATION_URL = "/fineract-provider/api/v1/externalevents/configuration?" + Utils.TENANT_IDENTIFIER; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<Map<String, Object>> getAllExternalEventConfigurations(RequestSpecification requestSpec, ResponseSpecification responseSpec) { Map<String, ArrayList<Map<String, Object>>> response = Utils.performServerGet(requestSpec, responseSpec, @@ -42,6 +46,10 @@ public static ArrayList<Map<String, Object>> getAllExternalEventConfigurations(R return response.get(EXTERNAL_EVENT_CONFIGURATION); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<Map<String, Object>> getDefaultExternalEventConfigurations() { ArrayList<Map<String, Object>> defaults = new ArrayList<>(); @@ -578,6 +586,10 @@ public static ArrayList<Map<String, Object>> getDefaultExternalEventConfiguratio return defaults; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getExternalEventConfigurationsForUpdateJSON() { Map<String, Map<String, Boolean>> configurationsForUpdate = new HashMap<>(); @@ -593,6 +605,10 @@ public static String getExternalEventConfigurationsForUpdateJSON() { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Boolean> updateExternalEventConfigurations(RequestSpecification requestSpec, ResponseSpecification responseSpec, String json) { Map<String, Map<String, Boolean>> response = Utils.performServerPut(requestSpec, responseSpec, EXTERNAL_EVENT_CONFIGURATION_URL, @@ -600,6 +616,10 @@ public static Map<String, Boolean> updateExternalEventConfigurations(RequestSpec return response.get(EXTERNAL_EVENT_CONFIGURATION_RESPONSE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void resetDefaultConfigurations(RequestSpecification requestSpec, ResponseSpecification responseSpec) { Map<String, Map<String, Boolean>> configurationsForReset = new HashMap<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalServicesConfigurationHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalServicesConfigurationHelper.java index bb6a840b3b7..6da372ed121 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalServicesConfigurationHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalServicesConfigurationHelper.java @@ -29,11 +29,19 @@ public class ExternalServicesConfigurationHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ExternalServicesConfigurationHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<HashMap> getExternalServicesConfigurationByServiceName(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String serviceName) { final String GET_EXTERNAL_SERVICES_CONFIG_BY_SERVICE_NAME_URL = "/fineract-provider/api/v1/externalservice/" + serviceName + "?" @@ -44,6 +52,10 @@ public static ArrayList<HashMap> getExternalServicesConfigurationByServiceName(f return Utils.performServerGet(requestSpec, responseSpec, GET_EXTERNAL_SERVICES_CONFIG_BY_SERVICE_NAME_URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap updateValueForExternaServicesConfiguration(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String serviceName, final String name, final String value) { final String EXTERNAL_SERVICES_CONFIG_UPDATE_URL = "/fineract-provider/api/v1/externalservice/" + serviceName + "?" @@ -57,6 +69,10 @@ public static HashMap updateValueForExternaServicesConfiguration(final RequestSp return (HashMap) map.get("changes"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updateExternalServicesConfigUpdateValueAsJSON(final String name, final String value) { final HashMap<String, String> map = new HashMap<>(); map.put(name, value); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/GroupHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/GroupHelper.java index 8b2a97ada41..eb6e9d11952 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/GroupHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/GroupHelper.java @@ -43,34 +43,58 @@ public class GroupHelper { public static final String DATE_FORMAT = "dd MMMM yyyy"; public static final String DATE_TIME_FORMAT = "dd MMMM yyyy HH:mm"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public GroupHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, @SuppressWarnings("unused") final boolean active) { LOG.info("---------------------------------CREATING A GROUP---------------------------------------------"); return createGroup(requestSpec, responseSpec, "04 March 2011"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate) { LOG.info("---------------------------------CREATING A GROUP---------------------------------------------"); return Utils.performServerPost(requestSpec, responseSpec, CREATE_GROUP_URL, getTestGroupAsJSON(true, activationDate), "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("---------------------------------CREATING A GROUP---------------------------------------------"); return Utils.performServerPost(requestSpec, responseSpec, CREATE_GROUP_URL, getTestGroupAsJSON(false, ""), "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object createGroupWithError(final String jsonAttributeToGetBack) { LOG.info("---------------------------------CREATING A GROUP WITH ERROR---------------------------------------------"); return Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_GROUP_URL, getTestGroupAsJSON(false, ""), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createGroupPendingWithDatatable(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String registeredTableName) { LOG.info("-------------------------- CREATING A GROUP WITH DATATABLES --------------------------------"); @@ -78,6 +102,10 @@ public static Integer createGroupPendingWithDatatable(final RequestSpecification "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer associateClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId, final String clientMember) { final String GROUP_ASSOCIATE_URL = "/fineract-provider/api/v1/groups/" + groupId + "?command=associateClients&" @@ -86,6 +114,10 @@ public static Integer associateClient(final RequestSpecification requestSpec, fi return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, associateClientAsJSON(clientMember), "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer disAssociateClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId, final String clientMember) { final String GROUP_ASSOCIATE_URL = "/fineract-provider/api/v1/groups/" + groupId + "?command=disassociateClients&" @@ -94,6 +126,10 @@ public static Integer disAssociateClient(final RequestSpecification requestSpec, return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, associateClientAsJSON(clientMember), "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer activateGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId) { final String GROUP_ASSOCIATE_URL = "/fineract-provider/api/v1/groups/" + groupId + "?command=activate&" + Utils.TENANT_IDENTIFIER; @@ -101,6 +137,10 @@ public static Integer activateGroup(final RequestSpecification requestSpec, fina return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, activateGroupAsJSON(""), "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer updateGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String name, final String groupId) { final String GROUP_ASSOCIATE_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER; @@ -108,6 +148,10 @@ public static Integer updateGroup(final RequestSpecification requestSpec, final return Utils.performServerPut(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, updateGroupAsJSON(name), "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer deleteGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId) { final String GROUP_ASSOCIATE_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER; @@ -115,6 +159,10 @@ public static Integer deleteGroup(final RequestSpecification requestSpec, final return Utils.performServerDelete(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, "groupId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object assignStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId, final Long staffId) { final String GROUP_ASSIGN_STAFF_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER @@ -123,6 +171,10 @@ public static Object assignStaff(final RequestSpecification requestSpec, final R return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSIGN_STAFF_URL, assignStaffAsJSON(staffId), "changes"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object assignStaffInheritStaffForClientAccounts(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId, final String staffId) { final String GROUP_ASSIGN_STAFF_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER @@ -132,6 +184,10 @@ public static Object assignStaffInheritStaffForClientAccounts(final RequestSpeci assignStaffAndInheritStaffForClientAccountsAsJSON(staffId), "changes"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestGroupAsJSON(final boolean active, final String activationDate) { final HashMap<String, String> map = new HashMap<>(); map.put("officeId", "1"); @@ -151,6 +207,10 @@ public static String getTestGroupAsJSON(final boolean active, final String activ return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String associateClientAsJSON(final String clientMember) { final HashMap<String, List<String>> map = new HashMap<>(); final List<String> list = new ArrayList<>(); @@ -160,6 +220,10 @@ public static String associateClientAsJSON(final String clientMember) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String activateGroupAsJSON(final String activationDate) { final HashMap<String, String> map = new HashMap<>(); map.put("dateFormat", "dd MMMM yyyy"); @@ -174,6 +238,10 @@ public static String activateGroupAsJSON(final String activationDate) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updateGroupAsJSON(final String name) { final HashMap<String, String> map = new HashMap<>(); map.put("name", name); @@ -181,6 +249,10 @@ public static String updateGroupAsJSON(final String name) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String assignStaffAsJSON(final Long staffId) { final HashMap<String, Object> map = new HashMap<>(); map.put("staffId", staffId); @@ -188,6 +260,10 @@ public static String assignStaffAsJSON(final Long staffId) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String assignStaffAndInheritStaffForClientAccountsAsJSON(final String staffId) { final HashMap<String, String> map = new HashMap<>(); map.put("staffId", staffId); @@ -196,6 +272,10 @@ public static String assignStaffAndInheritStaffForClientAccountsAsJSON(final Str return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyGroupCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedGroupID) { LOG.info("------------------------------CHECK GROUP DETAILS------------------------------------\n"); @@ -204,6 +284,10 @@ public static void verifyGroupCreatedOnServer(final RequestSpecification request assertEquals(generatedGroupID, responseGroupID, "ERROR IN CREATING THE GROUP"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyGroupDetails(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedGroupID, final String field, final String expectedValue) { LOG.info("------------------------------CHECK GROUP DETAILS------------------------------------\n"); @@ -212,6 +296,10 @@ public static void verifyGroupDetails(final RequestSpecification requestSpec, fi assertEquals(expectedValue, responseValue, "ERROR IN CREATING THE GROUP"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyGroupActivatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedGroupID, final boolean generatedGroupStatus) { LOG.info("------------------------------CHECK GROUP STATUS------------------------------------\n"); @@ -220,6 +308,10 @@ public static void verifyGroupActivatedOnServer(final RequestSpecification reque assertEquals(generatedGroupStatus, responseGroupStatus, "ERROR IN ACTIVATING THE GROUP"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyGroupMembers(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedGroupID, final Integer groupMember) { List<String> list = new ArrayList<>(); @@ -231,6 +323,10 @@ public static void verifyGroupMembers(final RequestSpecification requestSpec, fi assertTrue(list.toString().contains("id=" + groupMember.toString()), "ERROR IN GROUP MEMBER"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyOrphanGroupDetails(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, int officeId) { LOG.info("------------------------------CHECK ORPHAN GROUP DETAILS------------------------------------\n"); @@ -240,6 +336,10 @@ public static void verifyOrphanGroupDetails(final RequestSpecification requestSp assertEquals("[]", responseValue); // Since, all groups got center as Parent, OrphanGroups is null. } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyEmptyGroupMembers(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedGroupID) { List<String> list = new ArrayList<>(); @@ -251,6 +351,10 @@ public static void verifyEmptyGroupMembers(final RequestSpecification requestSpe assertEquals(list, null, "GROUP MEMBER LIST NOT EMPTY"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyGroupDeleted(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedGroupID) { List<String> list = new ArrayList<>(); @@ -260,6 +364,10 @@ public static void verifyGroupDeleted(final RequestSpecification requestSpec, fi assertFalse(list.toString().contains("id=" + generatedGroupID.toString()), "GROUP NOT DELETED"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) // Glim_Gsim_testing public static List<String> verifyRetrieveGlimAccountsByGroupId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer groupID) { @@ -271,6 +379,10 @@ public static List<String> verifyRetrieveGlimAccountsByGroupId(final RequestSpec return list; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<String> verifyRetrieveGlimAccountsByGlimId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer glimId) { List<String> list = new ArrayList<>(); @@ -281,6 +393,10 @@ public static List<String> verifyRetrieveGlimAccountsByGlimId(final RequestSpeci return list; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<String> verifyRetrieveGsimAccounts(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer groupID) { List<String> list = new ArrayList<>(); @@ -295,6 +411,10 @@ public static String randomNameGenerator(final String prefix, final int lenOfRan return Utils.uniqueRandomStringGenerator(prefix, lenOfRandomSuffix); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestGroupWithDatatableAsJson(final String registeredTableName) { final HashMap<String, Object> map = new HashMap<>(); map.put("officeId", "1"); @@ -309,6 +429,10 @@ public static String getTestGroupWithDatatableAsJson(final String registeredTabl return requestJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestDatatableAsJson(HashMap<String, Object> map, final String registeredTableName) { List<HashMap<String, Object>> datatablesListMap = new ArrayList<>(); HashMap<String, Object> datatableMap = new HashMap<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HolidayHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HolidayHelper.java index dd66b21be88..ed94cd18a8a 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HolidayHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HolidayHelper.java @@ -39,11 +39,19 @@ public class HolidayHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HolidayHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getCreateHolidayDataAsJSON() { final HashMap<String, Object> map = new HashMap<>(); List<HashMap<String, String>> offices = new ArrayList<HashMap<String, String>>(); @@ -64,6 +72,10 @@ public static String getCreateHolidayDataAsJSON() { return HolidayCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getCreateType1HolidayDataAsJSON() { final HashMap<String, Object> map = new HashMap<>(); List<HashMap<String, String>> offices = new ArrayList<HashMap<String, String>>(); @@ -83,6 +95,10 @@ public static String getCreateType1HolidayDataAsJSON() { return HolidayCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getActivateHolidayDataAsJSON() { final HashMap<String, String> map = new HashMap<>(); String activateHoliday = new Gson().toJson(map); @@ -90,20 +106,36 @@ public static String getActivateHolidayDataAsJSON() { return activateHoliday; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createHolidays(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_HOLIDAY_URL, getCreateHolidayDataAsJSON(), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createTyoe1Holidays(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_HOLIDAY_URL, getCreateType1HolidayDataAsJSON(), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer activateHolidays(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String holidayID) { final String ACTIVATE_HOLIDAY_URL = HOLIDAYS_URL + "/" + holidayID + "?command=activate&" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, ACTIVATE_HOLIDAY_URL, getActivateHolidayDataAsJSON(), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap getHolidayById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String holidayID) { final String GET_HOLIDAY_BY_ID_URL = HOLIDAYS_URL + "/" + holidayID + "?" + Utils.TENANT_IDENTIFIER; @@ -112,6 +144,10 @@ public static HashMap getHolidayById(final RequestSpecification requestSpec, fin return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer deleteHoliday(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer holidayID) { final String DELETE_HOLIDAY_URL = HOLIDAYS_URL + "/" + holidayID + "?" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HookHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HookHelper.java index 326b34938ef..3f4b675957c 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HookHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HookHelper.java @@ -37,17 +37,29 @@ public class HookHelper { private static final String CREATE_HOOK_URL = "/fineract-provider/api/v1/hooks?" + Utils.TENANT_IDENTIFIER; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HookHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createHook(final String payloadURL) { LOG.info("---------------------------------CREATING A HOOK---------------------------------------------"); return Utils.performServerPost(requestSpec, responseSpec, CREATE_HOOK_URL, getTestHookAsJson(payloadURL), "resourceId"); } - public String getTestHookAsJson(final String payloadURL) { + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) + private String getTestHookAsJson(final String payloadURL) { final HashMap<String, Object> map = new HashMap<>(); map.put("name", "Web"); map.put("displayName", Utils.randomStringGenerator("Hook_DisplayName_", 5)); @@ -66,18 +78,30 @@ public String getTestHookAsJson(final String payloadURL) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer updateHook(final String payloadURL, final Long hookId) { LOG.info("---------------------------------UPDATING HOOK---------------------------------------------"); final String UPDATE_HOOK_URL = "/fineract-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPut(this.requestSpec, this.responseSpec, UPDATE_HOOK_URL, getTestHookAsJson(payloadURL), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer deleteHook(final Long hookId) { LOG.info("---------------------------------DELETING HOOK---------------------------------------------"); final String DELETE_HOOK_URL = "/fineract-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerDelete(this.requestSpec, this.responseSpec, DELETE_HOOK_URL, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyHookCreatedOnServer(final Long hookId) { LOG.info("------------------------------CHECK CREATE HOOK DETAILS------------------------------------\n"); final String GET_URL = "/fineract-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER; @@ -85,6 +109,10 @@ public void verifyHookCreatedOnServer(final Long hookId) { assertEquals(hookId.toString(), responseHookId.toString()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyUpdateHook(final String updateURL, final Long hookId) { LOG.info("------------------------------CHECK UPDATE HOOK DETAILS------------------------------------\n"); final String GET_URL = "/fineract-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER; @@ -94,6 +122,10 @@ public void verifyUpdateHook(final String updateURL, final Long hookId) { assertEquals(updateURL, hash.get("fieldValue")); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyDeleteHook(final Long hookId) { LOG.info("------------------------------CHECK DELETE HOOK DETAILS------------------------------------\n"); final String GET_URL = "/fineract-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/IdempotencyHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/IdempotencyHelper.java index b10eb5d5660..8fa0277e359 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/IdempotencyHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/IdempotencyHelper.java @@ -40,18 +40,34 @@ private IdempotencyHelper() { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String toJsonString(final List<BusinessStep> batchRequests) { return new Gson().toJson(new BusinessStepWrapper(batchRequests)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static JobBusinessStepConfigData configuredBusinessStepFromJsonString(final String json) { return new Gson().fromJson(json, new TypeToken<JobBusinessStepConfigData>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static JobBusinessStepDetail availableBusinessStepFromJsonString(final String json) { return new Gson().fromJson(json, new TypeToken<JobBusinessStepDetail>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static JobBusinessStepConfigData getConfiguredBusinessStepsByJobName(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String jobName) { final String response = Utils.performServerGet(requestSpec, responseSpec, @@ -60,6 +76,10 @@ public static JobBusinessStepConfigData getConfiguredBusinessStepsByJobName(fina return configuredBusinessStepFromJsonString(response); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static JobBusinessStepDetail getAvailableBusinessStepsByJobName(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String jobName) { final String response = Utils.performServerGet(requestSpec, responseSpec, @@ -68,6 +88,10 @@ public static JobBusinessStepDetail getAvailableBusinessStepsByJobName(final Req return availableBusinessStepFromJsonString(response); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Response updateBusinessStepOrder(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String jobName, String jsonBodyToSend, String idempotencyKey) { Response response = Utils.performServerPutRaw(requestSpec, responseSpec, @@ -77,6 +101,10 @@ public static Response updateBusinessStepOrder(final RequestSpecification reques return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Response updateBusinessStepOrderWithError(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String jobName, String jsonBodyToSend, String idempotencyKey) { String url = BUSINESS_STEPS_API_URL_START + jobName + BUSINESS_STEPS_API_URL_END; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/LoanRescheduleRequestHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/LoanRescheduleRequestHelper.java index 432a99301b3..f36bed95c4d 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/LoanRescheduleRequestHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/LoanRescheduleRequestHelper.java @@ -41,34 +41,58 @@ public LoanRescheduleRequestHelper(final RequestSpecification requestSpec, final this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createLoanRescheduleRequest(final String requestJSON) { final String URL = LOAN_RESCHEDULE_REQUEST_URL + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(this.requestSpec, this.responseSpec, URL, requestJSON, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap createLoanRescheduleRequestWithFullResponse(final String requestJSON) { final String URL = LOAN_RESCHEDULE_REQUEST_URL + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(this.requestSpec, this.responseSpec, URL, requestJSON, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer rejectLoanRescheduleRequest(final Integer requestId, final String requestJSON) { final String URL = LOAN_RESCHEDULE_REQUEST_URL + "/" + requestId + "?" + Utils.TENANT_IDENTIFIER + "&command=reject"; return Utils.performServerPost(this.requestSpec, this.responseSpec, URL, requestJSON, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer approveLoanRescheduleRequest(final Integer requestId, final String requestJSON) { final String URL = LOAN_RESCHEDULE_REQUEST_URL + "/" + requestId + "?" + Utils.TENANT_IDENTIFIER + "&command=approve"; return Utils.performServerPost(this.requestSpec, this.responseSpec, URL, requestJSON, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getLoanRescheduleRequest(final Integer requestId, final String param) { final String URL = LOAN_RESCHEDULE_REQUEST_URL + "/" + requestId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, URL, param); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyCreationOfLoanRescheduleRequest(final Integer requestId) { final String URL = LOAN_RESCHEDULE_REQUEST_URL + "/" + requestId + "?" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/NotesHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/NotesHelper.java index e333f3fa180..399d4212891 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/NotesHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/NotesHelper.java @@ -36,24 +36,40 @@ private NotesHelper() { private static final String CLIENT_URL = "/fineract-provider/api/v1/clients"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createClientNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer clientId, String request) { String createClientNoteURL = CLIENT_URL + "/" + clientId + "/notes?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, createClientNoteURL, request, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getClientNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer clientId, Integer noteId) { String getClientNoteURL = CLIENT_URL + "/" + clientId + "/notes/" + noteId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, getClientNoteURL, "note"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer updateClientNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer clientId, Integer noteId, String request) { String updateClientNoteURL = CLIENT_URL + "/" + clientId + "/notes/" + noteId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPut(requestSpec, responseSpec, updateClientNoteURL, request, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void deleteClientNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer clientId, Integer noteId) { String deleteClientNoteURL = CLIENT_URL + "/" + clientId + "/notes/" + noteId + "?" + Utils.TENANT_IDENTIFIER; @@ -62,24 +78,40 @@ public static void deleteClientNote(RequestSpecification requestSpec, ResponseSp private static final String GROUP_URL = "/fineract-provider/api/v1/groups"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createGroupNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer groupId, String request) { String createGroupNoteURL = GROUP_URL + "/" + groupId + "/notes?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, createGroupNoteURL, request, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getGroupNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer groupId, Integer noteId) { String getGroupNoteURL = GROUP_URL + "/" + groupId + "/notes/" + noteId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, getGroupNoteURL, "note"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer updateGroupNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer groupId, Integer noteId, String request) { String updateGroupNoteURL = GROUP_URL + "/" + groupId + "/notes/" + noteId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPut(requestSpec, responseSpec, updateGroupNoteURL, request, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void deleteGroupNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer groupId, Integer noteId) { String deleteGroupNoteURL = GROUP_URL + "/" + groupId + "/notes/" + noteId + "?" + Utils.TENANT_IDENTIFIER; @@ -88,23 +120,39 @@ public static void deleteGroupNote(RequestSpecification requestSpec, ResponseSpe private static final String LOAN_URL = "/fineract-provider/api/v1/loans"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createLoanNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer loanId, String request) { String createLoanNoteURL = LOAN_URL + "/" + loanId + "/notes?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, createLoanNoteURL, request, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer loanId, Integer noteId) { String getLoanNoteURL = LOAN_URL + "/" + loanId + "/notes/" + noteId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, getLoanNoteURL, "note"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer updateLoanNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer loanId, Integer noteId, String updateRequest) { String updateLoanNoteURL = LOAN_URL + "/" + loanId + "/notes/" + noteId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPut(requestSpec, responseSpec, updateLoanNoteURL, updateRequest, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void deleteLoanNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer loanId, Integer noteId) { String deleteLoanNoteURL = LOAN_URL + "/" + loanId + "/notes/" + noteId + "?" + Utils.TENANT_IDENTIFIER; @@ -113,12 +161,20 @@ public static void deleteLoanNote(RequestSpecification requestSpec, ResponseSpec private static final String LOAN_TRANSACTION_URL = "/fineract-provider/api/v1/loanTransactions"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createLoanTransactionNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer loanTransactionId, String request) { String createLoanTransactionNoteURL = LOAN_TRANSACTION_URL + "/" + loanTransactionId + "/notes?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, createLoanTransactionNoteURL, request, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanTransactionNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer loanTransactionId, Integer noteId) { String getLoanTransactionNoteURL = LOAN_TRANSACTION_URL + "/" + loanTransactionId + "/notes/" + noteId + "?" @@ -126,6 +182,10 @@ public static String getLoanTransactionNote(RequestSpecification requestSpec, Re return Utils.performServerGet(requestSpec, responseSpec, getLoanTransactionNoteURL, "note"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer updateLoanTransactionNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer loanTransactionId, Integer noteId, String updateRequest) { String updateLoanTransactionNoteURL = LOAN_TRANSACTION_URL + "/" + loanTransactionId + "/notes/" + noteId + "?" @@ -133,6 +193,10 @@ public static Integer updateLoanTransactionNote(RequestSpecification requestSpec return Utils.performServerPut(requestSpec, responseSpec, updateLoanTransactionNoteURL, updateRequest, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void deleteLoanTransactionNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer loanTransactionId, Integer noteId) { String deleteLoanTransactionNoteURL = LOAN_TRANSACTION_URL + "/" + loanTransactionId + "/notes/" + noteId + "?" @@ -142,6 +206,10 @@ public static void deleteLoanTransactionNote(RequestSpecification requestSpec, R private static final String SAVINGS_URL = "/fineract-provider/api/v1/savings"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostResourceTypeResourceIdNotesResponse createSavingsNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer savingsId, String request) { final String noteURL = SAVINGS_URL + "/" + savingsId + "/notes?" + Utils.TENANT_IDENTIFIER; @@ -149,6 +217,10 @@ public static PostResourceTypeResourceIdNotesResponse createSavingsNote(RequestS return GSON.fromJson(response, PostResourceTypeResourceIdNotesResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetResourceTypeResourceIdNotesNoteIdResponse getSavingsNote(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer savingsId, Integer noteId) { final String noteURL = SAVINGS_URL + "/" + savingsId + "/notes/" + noteId + "?" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/NotificationHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/NotificationHelper.java index 9182e1f27bf..745f933a976 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/NotificationHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/NotificationHelper.java @@ -36,6 +36,10 @@ public final class NotificationHelper { private NotificationHelper() {} + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetNotificationsResponse getNotifications(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String GET_NOTIFICATIONS_URL = NOTIFICATION_API_URL; @@ -44,6 +48,10 @@ public static GetNotificationsResponse getNotifications(final RequestSpecificati return GSON.fromJson(response, GetNotificationsResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static boolean areNotificationsAvailable(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return getNotifications(requestSpec, responseSpec).getPageItems().size() > 0; } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/OfficeHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/OfficeHelper.java index 2b611d6648b..8ae48479d1b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/OfficeHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/OfficeHelper.java @@ -50,35 +50,59 @@ public class OfficeHelper extends IntegrationTest { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public OfficeHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public OfficeDomain retrieveOfficeByID(int id) { Object get = Utils.performServerGet(requestSpec, responseSpec, OFFICE_URL + "/" + id + "?" + Utils.TENANT_IDENTIFIER, ""); final String json = new Gson().toJson(get); return new Gson().fromJson(json, new TypeToken<OfficeDomain>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetOfficesResponse getHeadOffice(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String response = Utils.performServerGet(requestSpec, responseSpec, OFFICE_URL + "/" + HEAD_OFFICE_ID + "?" + Utils.TENANT_IDENTIFIER); return GSON.fromJson(response, GetOfficesResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createOffice(final String openingDate) { String json = getAsJSON(openingDate); return Utils.performServerPost(this.requestSpec, this.responseSpec, OFFICE_URL + "?" + Utils.TENANT_IDENTIFIER, json, CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createOfficeWithExternalId(String externalId, final String openingDate) { String json = getAsJSON(externalId, openingDate); return Utils.performServerPost(this.requestSpec, this.responseSpec, OFFICE_URL + "?" + Utils.TENANT_IDENTIFIER, json, CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer updateOffice(int id, String name, String openingDate) { final HashMap<String, String> map = new HashMap<String, String>(); map.put("name", name); @@ -104,10 +128,18 @@ public Response<PutOfficesOfficeIdResponse> updateOfficeUsingExternalId(String e .execute(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getAsJSON(final String openingDate) { return getAsJSON(null, openingDate); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getAsJSON(String externalId, final String openingDate) { final HashMap<String, String> map = new HashMap<>(); map.put("parentId", "1"); @@ -122,6 +154,10 @@ public static String getAsJSON(String externalId, final String openingDate) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String importOfficeTemplate(File file) { String locale = "en"; String dateFormat = "dd MMMM yyyy"; @@ -131,12 +167,20 @@ public String importOfficeTemplate(File file) { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getOutputTemplateLocation(final String importDocumentId) { requestSpec.header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN); return Utils.performServerOutputTemplateLocationGet(requestSpec, responseSpec, "/fineract-provider/api/v1/imports/getOutputTemplateLocation" + "?" + Utils.TENANT_IDENTIFIER, importDocumentId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Workbook getOfficeWorkBook(final String dateFormat) throws IOException { requestSpec.header(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel"); byte[] byteArray = Utils.performGetBinaryResponse(requestSpec, responseSpec, diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/PasswordPreferencesHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/PasswordPreferencesHelper.java index fd72e739814..67590de137b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/PasswordPreferencesHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/PasswordPreferencesHelper.java @@ -31,6 +31,10 @@ private PasswordPreferencesHelper() { private static final String PASSWORD_PREFERENCES_URL = "/fineract-provider/api/v1/passwordpreferences"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updatePasswordPreferences(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String validationPolicyId) { final String UPDATE_PASSWORD_PREFERENCES_URL = PASSWORD_PREFERENCES_URL + "?" + Utils.TENANT_IDENTIFIER; @@ -40,6 +44,10 @@ public static Object updatePasswordPreferences(final RequestSpecification reques updatePreferencesAsJson(validationPolicyId), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updateWithInvalidValidationPolicyId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String invalidValidationPolicyId, String jsonAttributeToGetback) { final String UPDATE_PASSWORD_PREFERENCES_URL = PASSWORD_PREFERENCES_URL + "?" + Utils.TENANT_IDENTIFIER; @@ -51,22 +59,38 @@ public static Object updateWithInvalidValidationPolicyId(final RequestSpecificat updatePreferencesWithInvalidId(invalidValidationPolicyId), jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updatePreferencesAsJson(String validationPolicyId) { final HashMap<String, Object> map = new HashMap<>(); map.put("validationPolicyId", validationPolicyId); return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String updatePreferencesWithInvalidId(String invalidValidationPolicyId) { final HashMap<String, Object> map = new HashMap<>(); map.put("validationPolicyId", invalidValidationPolicyId); return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static int getActivePasswordPreference(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return Utils.performServerGet(requestSpec, responseSpec, PASSWORD_PREFERENCES_URL + "?" + Utils.TENANT_IDENTIFIER, "id"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> getAllPreferences(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/PaymentTypeHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/PaymentTypeHelper.java index 53465ed3410..e8d306fc1fb 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/PaymentTypeHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/PaymentTypeHelper.java @@ -68,6 +68,10 @@ public GetPaymentTypesPaymentTypeIdResponse retrieveById(final Long paymentTypeI return ok(fineract().paymentTypes.retrieveOnePaymentType(paymentTypeId)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PaymentTypeDomain retrieveById(RequestSpecification requestSpec, ResponseSpecification responseSpec, final Long paymentTypeId) { final String GET_PAYMENTTYPE_URL = PAYMENTTYPE_URL + "/" + paymentTypeId + "?" + Utils.TENANT_IDENTIFIER; log.info("-------------------------------GETTING PAYMENT TYPE-------------------------------------------"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ProductMixHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ProductMixHelper.java index 56912044fee..65ff1f00e67 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ProductMixHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ProductMixHelper.java @@ -33,17 +33,29 @@ public class ProductMixHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ProductMixHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList getProductsMixList() { final String GET_PRODUCT_MIX_URL = PRODUCT_MIX_URL + "?" + Utils.TENANT_IDENTIFIER; LOG.info("------------------------ RETRIEVING PRODUCT MIX -------------------------"); return Utils.performServerGet(this.requestSpec, this.responseSpec, GET_PRODUCT_MIX_URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getProductMixTemplate() { final String GET_PRODUCT_MIX_URL = PRODUCT_MIX_URL + "/template?isProductMixTemplate=true&" + Utils.TENANT_IDENTIFIER; LOG.info("-------------------- RETRIEVING PRODUCT MIX TEMPLATE ---------------------"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SchedulerJobHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SchedulerJobHelper.java index c81a2f07e88..61bb6639620 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SchedulerJobHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SchedulerJobHelper.java @@ -58,12 +58,20 @@ public class SchedulerJobHelper extends IntegrationTest { private final ResponseSpecification response200Spec; private final ResponseSpecification response202Spec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public SchedulerJobHelper(final RequestSpecification requestSpec) { this.requestSpec = requestSpec; this.response200Spec = new ResponseSpecBuilder().expectStatusCode(200).build(); this.response202Spec = new ResponseSpecBuilder().expectStatusCode(202).build(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private List<Map<String, Object>> getAllSchedulerJobs() { final String GET_ALL_SCHEDULER_JOBS_URL = "/fineract-provider/api/v1/jobs?" + Utils.TENANT_IDENTIFIER; LOG.info("------------------------ RETRIEVING ALL SCHEDULER JOBS -------------------------"); @@ -84,6 +92,10 @@ public List<String> getAllSchedulerJobNames() { return getAllSchedulerJobDetails(map -> (String) map.get("displayName")); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Map<String, Object> getSchedulerJobById(int jobId) { final String GET_SCHEDULER_JOB_BY_ID_URL = "/fineract-provider/api/v1/jobs/" + jobId + "?" + Utils.TENANT_IDENTIFIER; LOG.info("------------------------ RETRIEVING SCHEDULER JOB BY ID -------------------------"); @@ -93,6 +105,10 @@ public Map<String, Object> getSchedulerJobById(int jobId) { return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Map<String, Object> getSchedulerJobByShortName(String shortName) { final String GET_SCHEDULER_JOB_URL = "/fineract-provider/api/v1/jobs/" + SHORT_NAME_PARAM + "/" + shortName + "?" + Utils.TENANT_IDENTIFIER; @@ -102,6 +118,10 @@ private Map<String, Object> getSchedulerJobByShortName(String shortName) { return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Boolean getSchedulerStatus() { final String GET_SCHEDULER_STATUS_URL = "/fineract-provider/api/v1/scheduler?" + Utils.TENANT_IDENTIFIER; LOG.info("------------------------ RETRIEVING SCHEDULER STATUS -------------------------"); @@ -114,6 +134,10 @@ public void updateSchedulerStatus(final boolean on) { ok(fineract().jobsScheduler.changeSchedulerStatus(command)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Map<String, Object> updateSchedulerJob(int jobId, final boolean active) { final String UPDATE_SCHEDULER_JOB_URL = "/fineract-provider/api/v1/jobs/" + jobId + "?" + Utils.TENANT_IDENTIFIER; LOG.info("------------------------ UPDATING SCHEDULER JOB -------------------------"); @@ -126,6 +150,10 @@ public void updateSchedulerJob(long jobId, PutJobsJobIDRequest request) { ok(fineract().jobs.updateJobDetail(jobId, request)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String updateSchedulerJobAsJSON(final boolean active) { final Map<String, String> map = new HashMap<>(); map.put("active", Boolean.toString(active)); @@ -138,17 +166,29 @@ public void runSchedulerJob(int jobId) { runSchedulerJob(jobId, responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void runSchedulerJob(int jobId, ResponseSpecification responseSpec) { final String RUN_SCHEDULER_JOB_URL = "/fineract-provider/api/v1/jobs/" + jobId + "?command=executeJob&" + Utils.TENANT_IDENTIFIER; LOG.info("------------------------ RUN SCHEDULER JOB -------------------------"); Utils.performServerPost(requestSpec, responseSpec, RUN_SCHEDULER_JOB_URL, runSchedulerJobAsJSON(), null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void runSchedulerJobByShortName(String shortName) { final ResponseSpecification responseSpec = new ResponseSpecBuilder().expectStatusCode(202).build(); runSchedulerJobByShortName(shortName, responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void runSchedulerJobByShortName(String shortName, ResponseSpecification responseSpec) { final String RUN_SCHEDULER_JOB_URL = "/fineract-provider/api/v1/jobs/" + SHORT_NAME_PARAM + "/" + shortName + "?command=executeJob&" + Utils.TENANT_IDENTIFIER; @@ -156,6 +196,10 @@ public void runSchedulerJobByShortName(String shortName, ResponseSpecification r Utils.performServerPost(requestSpec, responseSpec, RUN_SCHEDULER_JOB_URL, runSchedulerJobAsJSON(), null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String runSchedulerJobAsJSON() { final Map<String, String> map = new HashMap<>(); String runSchedulerJob = new Gson().toJson(map); @@ -174,6 +218,10 @@ public int getSchedulerJobIdByName(String jobName) { "No such named Job (see org.apache.fineract.infrastructure.jobs.service.JobName enum):" + jobName); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public int getSchedulerJobIdByShortName(String shortName) { Map<String, Object> jobMap = getSchedulerJobByShortName(shortName); final String GET_SCHEDULER_JOB_URL = "/fineract-provider/api/v1/jobs/" + SHORT_NAME_PARAM + "/" + shortName + "?" diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SearchHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SearchHelper.java index bb42744c45a..f82cff502d6 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SearchHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SearchHelper.java @@ -39,6 +39,10 @@ private SearchHelper() { private static final String SEARCH_URL = "/fineract-provider/api/v1/search?" + Utils.TENANT_IDENTIFIER; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<GetSearchResponse> getSearch(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String query, final Boolean exactMatch, final String resources) { final String urlSearch = SEARCH_URL + "&exactMatch=" + exactMatch.toString() + "&query=" + query + "&resource=" + resources; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/StandingInstructionsHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/StandingInstructionsHelper.java index 2cc61ccd14a..848a8330146 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/StandingInstructionsHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/StandingInstructionsHelper.java @@ -57,11 +57,19 @@ public class StandingInstructionsHelper { private RequestSpecification requestSpec; private ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public StandingInstructionsHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String build(final String clientId, final String fromAccountId, final String toAccountId, final String fromAccountType, final String toAccountType, final String validFrom, final String validTo, final String monthDay) { @@ -94,6 +102,10 @@ public String build(final String clientId, final String fromAccountId, final Str return savingsApplicationJSON; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createStandingInstruction(final String clientId, final String fromAccountId, final String toAccountId, final String fromAccountType, final String toAccountType, final String validFrom, final String validTo, final String monthDay) { log.info("-------------------------------- CREATE STANDING INSTRUCTIONS --------------------------------"); @@ -103,6 +115,10 @@ public Integer createStandingInstruction(final String clientId, final String fro standingInstructionAsJSON, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getStandingInstructionById(final String standingInstructionId) { log.info("----------------------------- RETRIEVING STANDING INSTRUCTION BY ID---------------------------"); @@ -111,6 +127,10 @@ public HashMap getStandingInstructionById(final String standingInstructionId) { return Utils.performServerGet(this.requestSpec, this.responseSpec, GET_STANDING_INSTRUCTION_BY_ID_URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap> getStandingInstructionHistory(Integer fromSavingsId, Integer fromAccountType, Integer fromClientId, Integer transferType) { final String STANDING_INSTRUCTIONS_HISTORY_URL = STANDING_INSTRUCTIONS_RUN_HISTORY_URL + "?" + Utils.TENANT_IDENTIFIER diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SurveyHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SurveyHelper.java index 1c72041b250..21cda0635e2 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SurveyHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SurveyHelper.java @@ -36,16 +36,28 @@ private SurveyHelper() { private static final Logger LOG = LoggerFactory.getLogger(SurveyHelper.class); private static final String FULFIL_SURVEY_URL = "/fineract-provider/api/v1/survey/ppi_kenya_2009/clientId?" + Utils.TENANT_IDENTIFIER; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer fulfilSurvey(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return fulfilSurvey(requestSpec, responseSpec, "04 March 2011"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer fulfilSurvey(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String activationDate) { LOG.info("---------------------------------FULFIL PPI ---------------------------------------------"); return Utils.performServerPost(requestSpec, responseSpec, FULFIL_SURVEY_URL, getTestPPIAsJSON(), "clientId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestPPIAsJSON() { final HashMap<String, String> map = new HashMap<>(); @@ -68,6 +80,10 @@ public static String getTestPPIAsJSON() { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifySurveyCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedClientID) { LOG.info("------------------------------CHECK CLIENT DETAILS------------------------------------\n"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxComponentHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxComponentHelper.java index 8127d7caff6..889af4a889f 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxComponentHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxComponentHelper.java @@ -35,6 +35,10 @@ private TaxComponentHelper() { private static final Logger LOG = LoggerFactory.getLogger(TaxComponentHelper.class); private static final String CREATE_TAX_COMPONENT_URL = "/fineract-provider/api/v1/taxes/component?" + Utils.TENANT_IDENTIFIER; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createTaxComponent(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String percentage, final Integer liabilityAccountId) { LOG.info("---------------------------------CREATING A TAX COMPONENT---------------------------------------------"); @@ -42,6 +46,10 @@ public static Integer createTaxComponent(final RequestSpecification requestSpec, getTaxComponentAsJSON(percentage, liabilityAccountId), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTaxComponentAsJSON(final String percentage, final Integer creditAccountId) { final HashMap<String, String> map = getBasicTaxComponentMap(percentage); if (creditAccountId != null) { @@ -52,6 +60,10 @@ public static String getTaxComponentAsJSON(final String percentage, final Intege return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, String> getBasicTaxComponentMap(final String percentage) { final HashMap<String, String> map = new HashMap<>(); map.put("name", randomNameGenerator("Tax_component_Name_", 5)); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxGroupHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxGroupHelper.java index cf7423e90ca..6bf2ee3134b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxGroupHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxGroupHelper.java @@ -37,6 +37,10 @@ private TaxGroupHelper() { private static final Logger LOG = LoggerFactory.getLogger(TaxGroupHelper.class); private static final String CREATE_TAX_COMPONENT_URL = "/fineract-provider/api/v1/taxes/group?" + Utils.TENANT_IDENTIFIER; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createTaxGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Collection<Integer> taxComponentIds) { LOG.info("---------------------------------CREATING A TAX GROUP---------------------------------------------"); @@ -44,6 +48,10 @@ public static Integer createTaxGroup(final RequestSpecification requestSpec, fin "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTaxGroupAsJSON(final Collection<Integer> taxComponentIds) { final HashMap<String, Object> map = new HashMap<>(); map.put("name", randomNameGenerator("Tax_component_Name_", 5)); @@ -53,6 +61,10 @@ public static String getTaxGroupAsJSON(final Collection<Integer> taxComponentIds return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<HashMap<String, String>> getTaxGroupComponents(final Collection<Integer> taxComponentIds) { List<HashMap<String, String>> taxGroupComponents = new ArrayList<>(); for (Integer taxComponentId : taxComponentIds) { @@ -61,6 +73,10 @@ public static List<HashMap<String, String>> getTaxGroupComponents(final Collecti return taxGroupComponents; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, String> getTaxComponentMap(final Integer taxComponentId) { final HashMap<String, String> map = new HashMap<>(); map.put("taxComponentId", String.valueOf(taxComponentId)); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/Utils.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/Utils.java index 45b8e46662a..8b764cc2c1b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/Utils.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/Utils.java @@ -101,6 +101,7 @@ public final class Utils { private Utils() {} + @Deprecated(forRemoval = true) public static void initializeRESTAssured() { RestAssured.baseURI = ConfigProperties.Backend.PROTOCOL + "://" + ConfigProperties.Backend.HOST; RestAssured.port = ConfigProperties.Backend.PORT; @@ -108,12 +109,14 @@ public static void initializeRESTAssured() { RestAssured.useRelaxedHTTPSValidation(); } + @Deprecated(forRemoval = true) public static RequestSpecification initializeDefaultRequestSpecification() { RequestSpecification requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build(); requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey()); return requestSpec; } + @Deprecated(forRemoval = true) public static ResponseSpecification initializeDefaultResponseSpecification() { return new ResponseSpecBuilder().expectStatusCode(200).build(); } @@ -176,10 +179,12 @@ private static void sleep(int seconds) { } } + @Deprecated(forRemoval = true) public static String loginIntoServerAndGetBase64EncodedAuthenticationKey() { return loginIntoServerAndGetBase64EncodedAuthenticationKey(ConfigProperties.Backend.USERNAME, ConfigProperties.Backend.PASSWORD); } + @Deprecated(forRemoval = true) public static String loginIntoServerAndGetBase64EncodedAuthenticationKey(String username, String password) { awaitSpringBootActuatorHealthyUp(); try { @@ -202,16 +207,19 @@ public static String loginIntoServerAndGetBase64EncodedAuthenticationKey(String } } + @Deprecated(forRemoval = true) public static String performServerGet(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String url) { return performServerGet(requestSpec, responseSpec, url, null); } + @Deprecated(forRemoval = true) public static Response performServerGetRaw(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String getURL, Function<RequestSpecification, RequestSpecification> requestMapper) { return requestMapper.apply(given().spec(requestSpec)).expect().spec(responseSpec).log().ifError().when().get(getURL).andReturn(); } + @Deprecated(forRemoval = true) public static <T> T performServerGet(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String getURL, final String jsonAttributeToGetBack) { final String json = given().spec(requestSpec).expect().spec(responseSpec).log().ifError().when().get(getURL).andReturn().asString(); @@ -221,6 +229,7 @@ public static <T> T performServerGet(final RequestSpecification requestSpec, fin return (T) JsonPath.from(json).get(jsonAttributeToGetBack); } + @Deprecated(forRemoval = true) public static <T> T performServerPatch(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String getURL, final String jsonAttributeToGetBack) { final String json = given().spec(requestSpec).expect().spec(responseSpec).log().ifError().when().patch(getURL).andReturn() @@ -231,6 +240,7 @@ public static <T> T performServerPatch(final RequestSpecification requestSpec, f return (T) JsonPath.from(json).get(jsonAttributeToGetBack); } + @Deprecated(forRemoval = true) public static List<String> performServerGetList(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String getURL, final String jsonAttributeToGetBack) { final JsonPath jsonPath = given().spec(requestSpec).expect().spec(responseSpec).log().ifError().when().get(getURL).jsonPath(); @@ -238,6 +248,7 @@ public static List<String> performServerGetList(final RequestSpecification reque return items; } + @Deprecated(forRemoval = true) public static JsonElement performServerGetArray(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String getURL, final int position, final String jsonAttributeToGetBack) { final JsonPath jsonPath = given().spec(requestSpec).expect().spec(responseSpec).log().ifError().when().get(getURL).jsonPath(); @@ -245,21 +256,25 @@ public static JsonElement performServerGetArray(final RequestSpecification reque return gson.fromJson(((ArrayList) items.get(position).get(jsonAttributeToGetBack)).toString(), JsonArray.class); } + @Deprecated(forRemoval = true) public static String performGetTextResponse(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String getURL) { return given().spec(requestSpec).expect().spec(responseSpec).log().ifError().when().get(getURL).andReturn().asString(); } + @Deprecated(forRemoval = true) public static byte[] performGetBinaryResponse(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String getURL) { return given().spec(requestSpec).expect().spec(responseSpec).log().ifError().when().get(getURL).andReturn().asByteArray(); } + @Deprecated(forRemoval = true) public static String performServerPost(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String postURL, final String jsonBodyToSend) { return performServerPost(requestSpec, responseSpec, postURL, jsonBodyToSend, null); } + @Deprecated(forRemoval = true) public static <T> T performServerPost(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String postURL, final String jsonBodyToSend, final String jsonAttributeToGetBack) { LOG.info("JSON {}", jsonBodyToSend); @@ -274,16 +289,19 @@ public static <T> T performServerPost(final RequestSpecification requestSpec, fi return (T) JsonPath.from(json).get(jsonAttributeToGetBack); } + @Deprecated(forRemoval = true) public static Response performServerPutRaw(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String putURL, Function<RequestSpecification, RequestSpecification> bodyMapper) { return bodyMapper.apply(given().spec(requestSpec)).expect().spec(responseSpec).log().ifError().when().put(putURL).andReturn(); } + @Deprecated(forRemoval = true) public static String performServerPut(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String putURL, final String jsonBodyToSend) { return performServerPut(requestSpec, responseSpec, putURL, jsonBodyToSend, null); } + @Deprecated(forRemoval = true) public static <T> T performServerPut(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String putURL, final String jsonBodyToSend, final String jsonAttributeToGetBack) { final String json = given().spec(requestSpec).body(jsonBodyToSend).expect().spec(responseSpec).log().ifError().when().put(putURL) @@ -294,6 +312,7 @@ public static <T> T performServerPut(final RequestSpecification requestSpec, fin return (T) JsonPath.from(json).get(jsonAttributeToGetBack); } + @Deprecated(forRemoval = true) public static <T> T performServerDelete(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String deleteURL, final String jsonAttributeToGetBack) { final String json = given().spec(requestSpec).expect().spec(responseSpec).log().ifError().when().delete(deleteURL).andReturn() @@ -304,6 +323,7 @@ public static <T> T performServerDelete(final RequestSpecification requestSpec, return (T) JsonPath.from(json).get(jsonAttributeToGetBack); } + @Deprecated(forRemoval = true) public static <T> T performServerDelete(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String deleteURL, final String jsonBodyToSend, final String jsonAttributeToGetBack) { final String json = given().spec(requestSpec).body(jsonBodyToSend).expect().spec(responseSpec).log().ifError().when() @@ -440,6 +460,7 @@ public static Date convertJsonElementAsDate(JsonElement jsonElement) { return null; } + @Deprecated(forRemoval = true) public static String performServerTemplatePost(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String postURL, final String legalFormType, final File file, final String locale, final String dateFormat) { @@ -449,6 +470,7 @@ public static String performServerTemplatePost(final RequestSpecification reques return importDocumentId; } + @Deprecated(forRemoval = true) public static String performServerOutputTemplateLocationGet(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String getURL, final String importDocumentId) { final String templateLocation = given().spec(requestSpec).queryParam("importDocumentId", importDocumentId).expect() @@ -456,6 +478,7 @@ public static String performServerOutputTemplateLocationGet(final RequestSpecifi return templateLocation.substring(1, templateLocation.length() - 1); } + @Deprecated(forRemoval = true) public static String emptyJson() { return "{}"; } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/WorkingDaysHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/WorkingDaysHelper.java index 1c73d927ae9..94482cc069c 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/WorkingDaysHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/WorkingDaysHelper.java @@ -37,12 +37,20 @@ private WorkingDaysHelper() { private static final String WORKINGDAYS_URL = "/fineract-provider/api/v1/workingdays"; private static final SecureRandom random = new SecureRandom(); + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updateWorkingDays(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String UPDATE_WORKINGDAYS_URL = WORKINGDAYS_URL + "?" + Utils.TENANT_IDENTIFIER; LOG.info("---------------------------------UPDATE WORKINGDAY---------------------------------------------"); return Utils.performServerPut(requestSpec, responseSpec, UPDATE_WORKINGDAYS_URL, updateWorkingDaysAsJson(), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updateWorkingDaysWithWrongRecurrence(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String jsonAttributeToGetback) { final String UPDATE_WORKINGDAYS_URL = WORKINGDAYS_URL + "?" + Utils.TENANT_IDENTIFIER; @@ -51,12 +59,20 @@ public static Object updateWorkingDaysWithWrongRecurrence(final RequestSpecifica jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updateWorkingDaysWeekDays(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String UPDATE_WORKINGDAYS_URL = WORKINGDAYS_URL + "?" + Utils.TENANT_IDENTIFIER; LOG.info("---------------------------------UPDATE WORKINGDAY---------------------------------------------"); return Utils.performServerPut(requestSpec, responseSpec, UPDATE_WORKINGDAYS_URL, updateWorkingWeekDaysDaysAsJson(), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) @SuppressFBWarnings(value = { "DMI_RANDOM_USED_ONLY_ONCE" }, justification = "False positive for random object created and used only once") public static String updateWorkingWeekDaysDaysAsJson() { @@ -69,6 +85,10 @@ public static String updateWorkingWeekDaysDaysAsJson() { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) @SuppressFBWarnings(value = { "DMI_RANDOM_USED_ONLY_ONCE" }, justification = "False positive for random object created and used only once") public static String updateWorkingDaysAsJson() { @@ -81,6 +101,10 @@ public static String updateWorkingDaysAsJson() { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) @SuppressFBWarnings(value = { "DMI_RANDOM_USED_ONLY_ONCE" }, justification = "False positive for random object created and used only once") public static String updateWorkingDayWithWrongRecur() { @@ -93,11 +117,19 @@ public static String updateWorkingDayWithWrongRecur() { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static int workingDaysId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { HashMap<String, Object> workingDays = getAllWorkingDays(requestSpec, responseSpec); return (int) workingDays.get("id"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> getAllWorkingDays(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountHelper.java index 10044737288..a3f8cd18387 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountHelper.java @@ -36,6 +36,10 @@ public class AccountHelper extends IntegrationTest { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public AccountHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; @@ -61,6 +65,10 @@ public Account createEquityAccount() { return this.createEquityAccount(null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Account createAssetAccount(String accountName) { final String assetAccountJSON = new GLAccountBuilder().withName(accountName).withAccountTypeAsAsset().build(); final Integer accountID = Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_GL_ACCOUNT_URL, assetAccountJSON, @@ -68,6 +76,10 @@ public Account createAssetAccount(String accountName) { return new Account(accountID, Account.AccountType.ASSET); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Account createIncomeAccount(String accountName) { final String assetAccountJSON = new GLAccountBuilder().withName(accountName).withAccountTypeAsIncome().build(); final Integer accountID = Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_GL_ACCOUNT_URL, assetAccountJSON, @@ -75,6 +87,10 @@ public Account createIncomeAccount(String accountName) { return new Account(accountID, Account.AccountType.INCOME); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Account createExpenseAccount(String accountName) { final String assetAccountJSON = new GLAccountBuilder().withName(accountName).withAccountTypeAsExpense().build(); final Integer accountID = Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_GL_ACCOUNT_URL, assetAccountJSON, @@ -82,6 +98,10 @@ public Account createExpenseAccount(String accountName) { return new Account(accountID, Account.AccountType.EXPENSE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Account createLiabilityAccount(String accountName) { final String liabilityAccountJSON = new GLAccountBuilder().withName(accountName).withAccountTypeAsLiability().build(); final Integer accountID = Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_GL_ACCOUNT_URL, liabilityAccountJSON, @@ -89,6 +109,10 @@ public Account createLiabilityAccount(String accountName) { return new Account(accountID, Account.AccountType.LIABILITY); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Account createEquityAccount(String accountName) { final String equityAccountJSON = new GLAccountBuilder().withName(accountName).withAccountTypeAsAsEquity().build(); final Integer accountID = Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_GL_ACCOUNT_URL, equityAccountJSON, @@ -96,6 +120,10 @@ public Account createEquityAccount(String accountName) { return new Account(accountID, Account.AccountType.EQUITY); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList getAccountingWithRunningBalances() { final String GET_RUNNING_BALANCE_URL = "/fineract-provider/api/v1/glaccounts?fetchRunningBalance=true"; final ArrayList<HashMap> accountRunningBalance = Utils.performServerGet(this.requestSpec, this.responseSpec, @@ -103,6 +131,10 @@ public ArrayList getAccountingWithRunningBalances() { return accountRunningBalance; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getAccountingWithRunningBalanceById(final String accountId) { final String GET_RUNNING_BALANCE_URL = "/fineract-provider/api/v1/glaccounts/" + accountId + "?fetchRunningBalance=true"; final HashMap accountRunningBalance = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_RUNNING_BALANCE_URL, ""); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountRuleHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountRuleHelper.java index f0acd38076b..a725931c911 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountRuleHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountRuleHelper.java @@ -38,17 +38,29 @@ public class AccountRuleHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public AccountRuleHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList<GetAccountRulesResponse> getAccountingRules() { final String response = Utils.performServerGet(this.requestSpec, this.responseSpec, ACCOUNTINGRULES_URL); Type accountRuleListType = new TypeToken<ArrayList<GetAccountRulesResponse>>() {}.getType(); return GSON.fromJson(response, accountRuleListType); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostAccountingRulesResponse createAccountRule(final Long officeId, final Account accountToCredit, final Account accountToDebit) { final String assetAccountJSON = new AccountingRuleBuilder() .withGLAccounts(accountToCredit.getAccountID(), accountToDebit.getAccountID()).withOffice(officeId).build(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/FinancialActivityAccountHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/FinancialActivityAccountHelper.java index d47d93a302c..dc83ccad930 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/FinancialActivityAccountHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/FinancialActivityAccountHelper.java @@ -39,6 +39,10 @@ public FinancialActivityAccountHelper(final RequestSpecification requestSpec) { this.requestSpec = requestSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object createFinancialActivityAccount(Integer financialActivityId, Integer glAccountId, final ResponseSpecification responseSpecification, String jsonBack) { String json = FinancialActivityAccountsMappingBuilder.build(financialActivityId, glAccountId); @@ -46,6 +50,10 @@ public Object createFinancialActivityAccount(Integer financialActivityId, Intege FINANCIAL_ACTIVITY_ACCOUNT_MAPPING_URL + "?" + Utils.TENANT_IDENTIFIER, json, jsonBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object updateFinancialActivityAccount(Integer financialActivityAccountId, Integer financialActivityId, Integer glAccountId, final ResponseSpecification responseSpecification, String jsonBack) { String json = FinancialActivityAccountsMappingBuilder.build(financialActivityId, glAccountId); @@ -53,17 +61,29 @@ public Object updateFinancialActivityAccount(Integer financialActivityAccountId, FINANCIAL_ACTIVITY_ACCOUNT_MAPPING_URL + "/" + financialActivityAccountId + "?" + Utils.TENANT_IDENTIFIER, json, jsonBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getFinancialActivityAccount(final Integer financialActivityAccountId, final ResponseSpecification responseSpecification) { final String url = FINANCIAL_ACTIVITY_ACCOUNT_MAPPING_URL + "/" + financialActivityAccountId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpecification, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap> getAllFinancialActivityAccounts(final ResponseSpecification responseSpecification) { final String url = FINANCIAL_ACTIVITY_ACCOUNT_MAPPING_URL + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(this.requestSpec, responseSpecification, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer deleteFinancialActivityAccount(final Integer financialActivityAccountId, final ResponseSpecification responseSpecification, String jsonBack) { final String url = FINANCIAL_ACTIVITY_ACCOUNT_MAPPING_URL + "/" + financialActivityAccountId + "?" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/JournalEntryHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/JournalEntryHelper.java index 8eaf1b42faa..1282791e712 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/JournalEntryHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/JournalEntryHelper.java @@ -39,6 +39,10 @@ public class JournalEntryHelper { private final ResponseSpecification responseSpec; private static final Gson GSON = new JSON().getGson(); + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public JournalEntryHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; @@ -80,6 +84,10 @@ public String getJournalEntryTransactionIdByAccount(final Account account, final return getJournalEntryTransactionId(account, date, accountEntries); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private void checkJournalEntry(final Integer officeId, final Account account, final String date, final JournalEntry... accountEntries) { final String url = createURLForGettingAccountEntries(account, date, officeId); final ArrayList<HashMap> response = Utils.performServerGet(this.requestSpec, this.responseSpec, url, "pageItems"); @@ -99,6 +107,10 @@ private void checkJournalEntry(final Integer officeId, final Account account, fi } } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getJournalEntryTransactionId(final Account account, final String date, final JournalEntry... accountEntries) { final String url = createURLForGettingAccountEntries(account, date, null); final ArrayList<HashMap> response = Utils.performServerGet(this.requestSpec, this.responseSpec, url, "pageItems"); @@ -115,6 +127,10 @@ private String getJournalEntryTransactionId(final Account account, final String return ""; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createURLForGettingAccountEntries(final Account account, final String date, final Integer officeId) { String url = new String("/fineract-provider/api/v1/journalentries?glAccountId=" + account.getAccountID() + "&type=" + account.getAccountType() + "&fromDate=" + date + "&toDate=" + date + "&tenantIdentifier=default" @@ -125,17 +141,29 @@ private String createURLForGettingAccountEntries(final Account account, final St return url; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList<HashMap> getJournalEntriesByTransactionId(final String transactionId) { final String url = createURLForGettingAccountEntriesByTransactionId(transactionId); final ArrayList<HashMap> response = Utils.performServerGet(this.requestSpec, this.responseSpec, url, "pageItems"); return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createURLForGettingAccountEntriesByTransactionId(final String transactionId) { return new String("/fineract-provider/api/v1/journalentries?transactionId=" + transactionId + "&tenantIdentifier=default" + "&orderBy=id&sortOrder=desc&locale=en&dateFormat=dd MMMM yyyy"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public GetJournalEntriesTransactionIdResponse getJournalEntries(final String transactionId) { log.info("Getting GL Journal entries for transaction id {}", transactionId); final String url = createURLForGettingAccountEntriesByTransactionId(transactionId); @@ -144,6 +172,10 @@ public GetJournalEntriesTransactionIdResponse getJournalEntries(final String tra return GSON.fromJson(response, GetJournalEntriesTransactionIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public GetJournalEntriesTransactionIdResponse getJournalEntriesForLoan(final Long loanId) { log.info("Getting GL Journal entries for loan id {}", loanId); final String url = "/fineract-provider/api/v1/journalentries?loanId=" + loanId + "&tenantIdentifier=default" diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/PeriodicAccrualAccountingHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/PeriodicAccrualAccountingHelper.java index 3bdecfdcfd2..6b654f80c3b 100755 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/PeriodicAccrualAccountingHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/PeriodicAccrualAccountingHelper.java @@ -30,16 +30,28 @@ public class PeriodicAccrualAccountingHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PeriodicAccrualAccountingHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object runPeriodicAccrualAccounting(String date) { String json = getRunPeriodicAccrual(date); return Utils.performServerPost(this.requestSpec, this.responseSpec, PERIODIC_ACCRUAL_URL + "?" + Utils.TENANT_IDENTIFIER, json, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getRunPeriodicAccrual(String date) { final HashMap<String, String> map = new HashMap<>(); map.put("dateFormat", "dd MMMM yyyy"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/charges/ChargesHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/charges/ChargesHelper.java index f702389914a..70053fd3ac8 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/charges/ChargesHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/charges/ChargesHelper.java @@ -89,6 +89,10 @@ public ChargesHelper() { private static final Gson GSON = new JSON().getGson(); + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSavingsSpecifiedDueDateJSON() { final HashMap<String, Object> map = populateDefaultsForSavings(); map.put("chargeTimeType", CHARGE_SPECIFIED_DUE_DATE); @@ -98,18 +102,34 @@ public static String getSavingsSpecifiedDueDateJSON() { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSavingsActivationFeeJSON() { return getSavingsJSON(AMOUNT, CURRENCY_CODE, ChargeTimeType.SAVINGS_ACTIVATION); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSavingsNoActivityFeeJSON() { return getSavingsJSON(AMOUNT, CURRENCY_CODE, ChargeTimeType.SAVINGS_NOACTIVITY_FEE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSavingsWithdrawalFeeJSON() { return getSavingsJSON(AMOUNT, CURRENCY_CODE, ChargeTimeType.WITHDRAWAL_FEE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSavingsJSON(String amount, String currencyCode, ChargeTimeType timeType) { final HashMap<String, Object> map = populateDefaultsForSavings(amount.toString(), currencyCode); map.put("chargeTimeType", timeType.getValue()); @@ -118,6 +138,10 @@ public static String getSavingsJSON(String amount, String currencyCode, ChargeTi return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSavingsAnnualFeeJSON() { final HashMap<String, Object> map = populateDefaultsForSavings(); map.put("feeOnMonthDay", ChargesHelper.FEE_ON_MONTH_DAY); @@ -127,6 +151,10 @@ public static String getSavingsAnnualFeeJSON() { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSavingsMonthlyFeeJSON() { final HashMap<String, Object> map = populateDefaultsForSavings(); map.put("feeOnMonthDay", ChargesHelper.FEE_ON_MONTH_DAY); @@ -137,6 +165,10 @@ public static String getSavingsMonthlyFeeJSON() { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSavingsWeeklyFeeJSON() { final HashMap<String, Object> map = populateDefaultsForSavings(); map.put("chargeTimeType", WEEKLY_FEE); @@ -146,6 +178,10 @@ public static String getSavingsWeeklyFeeJSON() { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSavingsOverdraftFeeJSON() { final HashMap<String, Object> map = populateDefaultsForSavings(); map.put("chargeTimeType", CHARGE_OVERDRAFT_FEE); @@ -154,10 +190,14 @@ public static String getSavingsOverdraftFeeJSON() { return chargesCreateJson; } - public static HashMap<String, Object> populateDefaultsForSavings() { + private static HashMap<String, Object> populateDefaultsForSavings() { return populateDefaultsForSavings(AMOUNT, CURRENCY_CODE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> populateDefaultsForSavings(String amount, String currencyCode) { final HashMap<String, Object> map = new HashMap<>(); map.put("active", ChargesHelper.ACTIVE); @@ -171,18 +211,34 @@ public static HashMap<String, Object> populateDefaultsForSavings(String amount, return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanDisbursementJSON() { return getLoanDisbursementJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, ChargesHelper.AMOUNT); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanDisbursementJSON(final Integer chargeCalculationType, final String amount) { return getLoanDisbursementJSON(chargeCalculationType, amount, ChargesHelper.CHARGE_PAYMENT_MODE_REGULAR); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanDisbursementAccountTransferJSON(final Integer chargeCalculationType, final String amount) { return getLoanDisbursementJSON(chargeCalculationType, amount, ChargesHelper.CHARGE_PAYMENT_MODE_ACCOUNT_TRANSFER); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanDisbursementJSON(final Integer chargeCalculationType, final String amount, final Integer paymentmode) { final HashMap<String, Object> map = populateDefaultsForLoan(); map.put("chargeTimeType", CHARGE_DISBURSEMENT_FEE); @@ -194,10 +250,18 @@ public static String getLoanDisbursementJSON(final Integer chargeCalculationType return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String paymentTypeCharge(Integer amount, final boolean enablePaymentType, final Long paymentTypeId) { return paymentTypeChargeJSON(amount, enablePaymentType, paymentTypeId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String paymentTypeChargeJSON(Integer amount, final boolean enablePaymentType, final Long paymentTypeId) { final HashMap<String, Object> map = new HashMap<>(); map.put("active", ChargesHelper.ACTIVE); @@ -215,24 +279,44 @@ public static String paymentTypeChargeJSON(Integer amount, final boolean enableP return paymentTypeJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanSpecifiedDueDateJSON() { return getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, ChargesHelper.AMOUNT, ChargesHelper.PENALTY); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanSpecifiedDueDateJSON(final Integer chargeCalculationType, final String amount, boolean penalty) { return getLoanSpecifiedDueDateJSON(chargeCalculationType, amount, penalty, ChargesHelper.CHARGE_PAYMENT_MODE_REGULAR); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanSpecifiedDueDateJSON(final Integer chargeCalculationType, final String amount, boolean penalty, String currencyCode) { return getLoanSpecifiedDueDateJSON(chargeCalculationType, amount, penalty, ChargesHelper.CHARGE_PAYMENT_MODE_REGULAR, currencyCode); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanSpecifiedDueDateJSON(final Integer chargeCalculationType, final String amount, final boolean penalty, final Integer paymentMode) { return getLoanSpecifiedDueDateJSON(chargeCalculationType, amount, penalty, paymentMode, ChargesHelper.CURRENCY_CODE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanSpecifiedDueDateJSON(final Integer chargeCalculationType, final String amount, final boolean penalty, final Integer paymentMode, final String currencyCode) { final HashMap<String, Object> map = populateDefaultsForLoan(); @@ -248,6 +332,10 @@ public static String getLoanSpecifiedDueDateJSON(final Integer chargeCalculation return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanSpecificInstallmentFeeJSON() { final HashMap<String, Object> map = populateDefaultsForLoan(); map.put("chargeTimeType", CHARGE_INSTALLMENT_FEE); @@ -261,20 +349,36 @@ public static String getLoanSpecificInstallmentFeeJSON() { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanSpecifiedDueDateWithAccountTransferJSON(final Integer chargeCalculationType, final String amount, boolean penalty) { return getLoanSpecifiedDueDateJSON(chargeCalculationType, amount, penalty, ChargesHelper.CHARGE_PAYMENT_MODE_ACCOUNT_TRANSFER); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanSpecifiedDueDateWithAccountTransferJSON() { return getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, ChargesHelper.AMOUNT, ChargesHelper.PENALTY, ChargesHelper.CHARGE_PAYMENT_MODE_ACCOUNT_TRANSFER); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanInstallmentJSON(final Integer chargeCalculationType, final String amount, boolean penalty) { return getLoanInstallmentJSON(chargeCalculationType, amount, penalty, ChargesHelper.CHARGE_PAYMENT_MODE_REGULAR); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanOverdueInstallmentJSON(final String amount) { final HashMap<String, Object> map = populateDefaultsForLoan(); map.put("chargeId", CHARGE_OVERDUE_INSTALLMENT_FEE); @@ -285,6 +389,10 @@ public static String getLoanOverdueInstallmentJSON(final String amount) { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanInstallmentJSON(final Integer chargeCalculationType, final String amount, final boolean penalty, final Integer paymentMode) { final HashMap<String, Object> map = populateDefaultsForLoan(); @@ -299,15 +407,27 @@ public static String getLoanInstallmentJSON(final Integer chargeCalculationType, return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanInstallmentWithAccountTransferJSON(final Integer chargeCalculationType, final String amount, boolean penalty) { return getLoanInstallmentJSON(chargeCalculationType, amount, penalty, ChargesHelper.CHARGE_PAYMENT_MODE_ACCOUNT_TRANSFER); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanInstallmentFeeJSON() { return getLoanInstallmentJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, ChargesHelper.AMOUNT, ChargesHelper.PENALTY); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getShareAccountActivationChargeJson() { HashMap<String, Object> map = populateDefaultsShareActivationCharge(); String chargesCreateJson = new Gson().toJson(map); @@ -315,6 +435,10 @@ public static String getShareAccountActivationChargeJson() { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getShareAccountPurchaseChargeJson() { HashMap<String, Object> map = populateDefaultsSharePurchaseFlatCharge(); String chargesCreateJson = new Gson().toJson(map); @@ -322,6 +446,10 @@ public static String getShareAccountPurchaseChargeJson() { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getShareAccountRedeemChargeJson() { HashMap<String, Object> map = populateDefaultsShareRedeemFlatCharge(); String chargesCreateJson = new Gson().toJson(map); @@ -329,6 +457,10 @@ public static String getShareAccountRedeemChargeJson() { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanOverdueFeeJSON() { final HashMap<String, Object> map = populateDefaultsForLoan(); map.put("penalty", ChargesHelper.PENALTY); @@ -342,6 +474,10 @@ public static String getLoanOverdueFeeJSON() { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanOverdueFeeJSONWithCalculationTypePercentage(String penaltyPercentageAmount) { final HashMap<String, Object> map = populateDefaultsForLoan(); map.put("penalty", ChargesHelper.PENALTY); @@ -354,6 +490,10 @@ public static String getLoanOverdueFeeJSONWithCalculationTypePercentage(String p return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> populateDefaultsForLoan() { final HashMap<String, Object> map = new HashMap<>(); map.put("active", ChargesHelper.ACTIVE); @@ -367,6 +507,10 @@ public static HashMap<String, Object> populateDefaultsForLoan() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> populateDefaultsClientCharge() { final HashMap<String, Object> map = new HashMap<>(); map.put("active", ChargesHelper.ACTIVE); @@ -381,6 +525,10 @@ public static HashMap<String, Object> populateDefaultsClientCharge() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> populateDefaultsShareActivationCharge() { final HashMap<String, Object> map = new HashMap<>(); map.put("active", ChargesHelper.ACTIVE); @@ -394,6 +542,10 @@ public static HashMap<String, Object> populateDefaultsShareActivationCharge() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> populateDefaultsSharePurchaseFlatCharge() { final HashMap<String, Object> map = new HashMap<>(); map.put("active", ChargesHelper.ACTIVE); @@ -407,6 +559,10 @@ public static HashMap<String, Object> populateDefaultsSharePurchaseFlatCharge() return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> populateDefaultsShareRedeemFlatCharge() { final HashMap<String, Object> map = new HashMap<>(); map.put("active", ChargesHelper.ACTIVE); @@ -420,44 +576,76 @@ public static HashMap<String, Object> populateDefaultsShareRedeemFlatCharge() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCharges(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String request) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_CHARGES_URL, request, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostChargesResponse createLoanCharge(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String payload) { final String response = Utils.performServerPost(requestSpec, responseSpec, CREATE_CHARGES_URL, payload, null); return GSON.fromJson(response, PostChargesResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<HashMap> getCharges(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return (ArrayList) Utils.performServerGet(requestSpec, responseSpec, CHARGES_URL + "?" + Utils.TENANT_IDENTIFIER, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap getChargeById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer chargeId) { return Utils.performServerGet(requestSpec, responseSpec, CHARGES_URL + "/" + chargeId + "?" + Utils.TENANT_IDENTIFIER, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap getChargeChanges(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer chargeId) { return Utils.performServerGet(requestSpec, responseSpec, CHARGES_URL + "/" + chargeId + "?" + Utils.TENANT_IDENTIFIER, CommonConstants.RESPONSE_CHANGES); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap updateCharges(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer chargeId, final String request) { return Utils.performServerPut(requestSpec, responseSpec, CHARGES_URL + "/" + chargeId + "?" + Utils.TENANT_IDENTIFIER, request, CommonConstants.RESPONSE_CHANGES); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer deleteCharge(final ResponseSpecification responseSpec, final RequestSpecification requestSpec, final Integer chargeId) { return Utils.performServerDelete(requestSpec, responseSpec, CHARGES_URL + "/" + chargeId + "?" + Utils.TENANT_IDENTIFIER, CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getModifyChargeJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -467,6 +655,10 @@ public static String getModifyChargeJSON() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getModifyWithdrawalFeeSavingsChargeJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -476,6 +668,10 @@ public static String getModifyWithdrawalFeeSavingsChargeJSON() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getModifyChargeAsPecentageAmountJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -486,6 +682,10 @@ public static String getModifyChargeAsPecentageAmountJSON() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getModifyChargeAsPecentageLoanAmountWithInterestJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -496,6 +696,10 @@ public static String getModifyChargeAsPecentageLoanAmountWithInterestJSON() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getModifyChargeAsPercentageInterestJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -506,6 +710,10 @@ public static String getModifyChargeAsPercentageInterestJSON() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getModifyChargeFeeFrequencyAsDaysJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -516,6 +724,10 @@ public static String getModifyChargeFeeFrequencyAsDaysJSON() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getModifyChargeFeeFrequencyAsWeeksJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -526,6 +738,10 @@ public static String getModifyChargeFeeFrequencyAsWeeksJSON() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getModifyChargeFeeFrequencyAsMonthsJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -536,6 +752,10 @@ public static String getModifyChargeFeeFrequencyAsMonthsJSON() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getModifyChargeFeeFrequencyAsYearsJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -546,6 +766,10 @@ public static String getModifyChargeFeeFrequencyAsYearsJSON() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getChargeSpecifiedDueDateJSON() { final HashMap<String, Object> map = populateDefaultsClientCharge(); String chargesCreateJson = new Gson().toJson(map); @@ -553,6 +777,10 @@ public static String getChargeSpecifiedDueDateJSON() { return chargesCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String applyCharge(RequestSpecification requestSpec, ResponseSpecification responseSpec, String chargeId, String json) { return Utils.performServerPost(requestSpec, responseSpec, CHARGES_URL + "/" + chargeId + "?" + Utils.TENANT_IDENTIFIER, json, "status"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/commands/MakercheckersHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/commands/MakercheckersHelper.java index 0e1039c78c9..9e3c740d7b3 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/commands/MakercheckersHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/commands/MakercheckersHelper.java @@ -38,11 +38,19 @@ public class MakercheckersHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public MakercheckersHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<Map<String, Object>> getMakerCheckerList(Map<String, String> queryParams) { StringBuilder url = new StringBuilder(MAKERCHECKER_URL).append("?").append(Utils.TENANT_IDENTIFIER); if (queryParams != null) { @@ -55,10 +63,18 @@ public List<Map<String, Object>> getMakerCheckerList(Map<String, String> queryPa return GSON.fromJson(response, makerCheckerList); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void approveMakerCheckerEntry(Long auditId) { approveMakerCheckerEntry(this.requestSpec, this.responseSpec, auditId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<?, ?> approveMakerCheckerEntry(RequestSpecification requestSpec, ResponseSpecification responseSpec, Long auditId) { String url = MAKERCHECKER_URL + "/" + auditId + "?command=approve&" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/externalevents/ExternalEventHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/externalevents/ExternalEventHelper.java index 81ff1ec4902..8b09d312f3f 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/externalevents/ExternalEventHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/externalevents/ExternalEventHelper.java @@ -70,6 +70,10 @@ public String toQueryParams() { } } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<ExternalEventDTO> getAllExternalEvents(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String url = "/fineract-provider/api/v1/internal/externalevents?" + Utils.TENANT_IDENTIFIER; @@ -78,6 +82,10 @@ public static List<ExternalEventDTO> getAllExternalEvents(final RequestSpecifica return GSON.fromJson(response, new TypeToken<List<ExternalEventDTO>>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<ExternalEventDTO> getAllExternalEvents(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, Filter filter) { final String url = "/fineract-provider/api/v1/internal/externalevents?" + filter.toQueryParams() + Utils.TENANT_IDENTIFIER; @@ -86,12 +94,20 @@ public static List<ExternalEventDTO> getAllExternalEvents(final RequestSpecifica return GSON.fromJson(response, new TypeToken<List<ExternalEventDTO>>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void deleteAllExternalEvents(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String url = "/fineract-provider/api/v1/internal/externalevents?" + Utils.TENANT_IDENTIFIER; log.info("-----------------------------DELETE ALL EXTERNAL EVENTS PARTITIONS----------------------------------------"); Utils.performServerDelete(requestSpec, responseSpec, url, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void changeEventState(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String eventName, boolean status) { final Map<String, Boolean> updatedConfigurations = ExternalEventConfigurationHelper.updateExternalEventConfigurations(requestSpec, diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/fixeddeposit/FixedDepositAccountHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/fixeddeposit/FixedDepositAccountHelper.java index 67860327bc9..68a29fc49cf 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/fixeddeposit/FixedDepositAccountHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/fixeddeposit/FixedDepositAccountHelper.java @@ -37,6 +37,10 @@ public class FixedDepositAccountHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public FixedDepositAccountHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; @@ -100,6 +104,10 @@ public FixedDepositAccountHelper(final RequestSpecification requestSpec, final R private Integer maturityInstructionId; private List<HashMap<String, String>> charges; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String build(final String clientId, final String productId, final String penalInterestType) { final HashMap<String, Object> map = new HashMap<>(); @@ -138,6 +146,10 @@ public String build(final String clientId, final String productId, final String return fixedDepositAccountJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer applyFixedDepositApplicationGetId(final String fixedDepositAccountAsJson, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("--------------------- APPLYING FOR FIXED DEPOSIT ACCOUNT ------------------------"); @@ -145,12 +157,20 @@ public static Integer applyFixedDepositApplicationGetId(final String fixedDeposi CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String applyFixedDepositApplication(final String fixedDepositAccountAsJson, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("--------------------- APPLYING FOR FIXED DEPOSIT ACCOUNT ------------------------"); return Utils.performServerPost(requestSpec, responseSpec, APPLY_FIXED_DEPOSIT_ACCOUNT_URL, fixedDepositAccountAsJson); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap getFixedDepositAccountById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer accountID) { final String GET_FIXED_DEPOSIT_BY_ID_URL = FIXED_DEPOSIT_ACCOUNT_URL + "/" + accountID + "?" + Utils.TENANT_IDENTIFIER; @@ -158,20 +178,36 @@ public static HashMap getFixedDepositAccountById(final RequestSpecification requ return Utils.performServerGet(requestSpec, responseSpec, GET_FIXED_DEPOSIT_BY_ID_URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getFixedDepositSummary(final Integer accountID) { return getFixedDepositDetails(accountID, "summary"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getFixedDepositDetails(final Integer accountID) { return getFixedDepositDetails(accountID, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private HashMap getFixedDepositDetails(final Integer accountID, final String jsonAttributeToGetBack) { final String URL = FIXED_DEPOSIT_ACCOUNT_URL + "/" + accountID + "?" + Utils.TENANT_IDENTIFIER; final HashMap response = Utils.performServerGet(requestSpec, responseSpec, URL, jsonAttributeToGetBack); return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Float getInterestRate(ArrayList<ArrayList<HashMap>> interestSlabData, Integer depositPeriod) { Float annualInterestRate = 0.0f; @@ -187,6 +223,10 @@ public static Float getInterestRate(ArrayList<ArrayList<HashMap>> interestSlabDa return annualInterestRate; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Float getPrincipalAfterCompoundingInterest(Calendar currentDate, Float principal, Integer depositPeriod, double interestPerDay, Integer compoundingInterval, Integer postingInterval) { @@ -217,6 +257,10 @@ public static Float getPrincipalAfterCompoundingInterest(Calendar currentDate, F return principal; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap updateFixedDepositAccount(final String clientID, final String productID, final String accountID, final String validFrom, final String validTo, final String penalInterestType, final String submittedOnDate) { @@ -229,6 +273,10 @@ public HashMap updateFixedDepositAccount(final String clientID, final String pro CommonConstants.RESPONSE_CHANGES); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap updateInterestCalculationConfigForFixedDeposit(final String clientID, final String productID, final String accountID, final String submittedOnDate, final String validFrom, final String validTo, final String numberOfDaysPerYear, final String penalInterestType, final String interestCalculationType, final String interestCompoundingPeriodType, @@ -247,12 +295,20 @@ public HashMap updateInterestCalculationConfigForFixedDeposit(final String clien CommonConstants.RESPONSE_CHANGES); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap approveFixedDeposit(final Integer fixedDepositAccountID, final String approvedOnDate) { LOG.info("--------------------------------- APPROVING FIXED DEPOSIT APPLICATION ------------------------------------"); return performFixedDepositApplicationActions(createFixedDepositOperationURL(APPROVE_FIXED_DEPOSIT_COMMAND, fixedDepositAccountID), getApproveFixedDepositAccountAsJSON(approvedOnDate)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap undoApproval(final Integer fixedDepositAccountID) { LOG.info("--------------------------------- UNDO APPROVING FIXED DEPOSIT APPLICATION -------------------------------"); final String undoBodyJson = "{'note':'UNDO APPROVAL'}"; @@ -260,12 +316,20 @@ public HashMap undoApproval(final Integer fixedDepositAccountID) { createFixedDepositOperationURL(UNDO_APPROVAL_FIXED_DEPOSIT_COMMAND, fixedDepositAccountID), undoBodyJson); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap rejectApplication(final Integer fixedDepositAccountID, final String rejectedOnDate) { LOG.info("--------------------------------- REJECT FIXED DEPOSIT APPLICATION -------------------------------"); return performFixedDepositApplicationActions(createFixedDepositOperationURL(REJECT_FIXED_DEPOSIT_COMMAND, fixedDepositAccountID), getRejectedFixedDepositAsJSON(rejectedOnDate)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap withdrawApplication(final Integer fixedDepositAccountID, final String withdrawApplicationOnDate) { LOG.info("--------------------------------- Withdraw FIXED DEPOSIT APPLICATION -------------------------------"); return performFixedDepositApplicationActions( @@ -273,12 +337,20 @@ public HashMap withdrawApplication(final Integer fixedDepositAccountID, final St getWithdrawnFixedDepositAccountAsJSON(withdrawApplicationOnDate)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap activateFixedDeposit(final Integer fixedDepositAccountID, final String activationDate) { LOG.info("---------------------------------- ACTIVATING FIXED DEPOSIT APPLICATION ----------------------------------"); return performFixedDepositApplicationActions(createFixedDepositOperationURL(ACTIVATE_FIXED_DEPOSIT_COMMAND, fixedDepositAccountID), getActivatedFixedDepositAccountAsJSON(activationDate)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object deleteFixedDepositApplication(final Integer fixedDepositAccountID, final String jsonAttributeToGetBack) { LOG.info("---------------------------------- DELETE FIXED DEPOSIT APPLICATION ----------------------------------"); return Utils.performServerDelete(this.requestSpec, this.responseSpec, @@ -286,6 +358,10 @@ public Object deleteFixedDepositApplication(final Integer fixedDepositAccountID, } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer calculateInterestForFixedDeposit(final Integer fixedDepositAccountId) { LOG.info("--------------------------------- CALCULATING INTEREST FOR FIXED DEPOSIT --------------------------------"); return (Integer) performFixedDepositActions( @@ -293,6 +369,10 @@ public Integer calculateInterestForFixedDeposit(final Integer fixedDepositAccoun getCalculatedInterestForFixedDepositApplicationAsJSON(), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer postInterestForFixedDeposit(final Integer fixedDepositAccountId) { LOG.info("--------------------------------- POST INTEREST FOR FIXED DEPOSIT --------------------------------"); return (Integer) performFixedDepositActions( @@ -300,6 +380,10 @@ public Integer postInterestForFixedDeposit(final Integer fixedDepositAccountId) getCalculatedInterestForFixedDepositApplicationAsJSON(), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap calculatePrematureAmountForFixedDeposit(final Integer fixedDepositAccountId, final String closedOnDate) { LOG.info("--------------------- CALCULATING PREMATURE AMOUNT FOR FIXED DEPOSIT ----------------------------"); return (HashMap) performFixedDepositActions( @@ -307,6 +391,10 @@ public HashMap calculatePrematureAmountForFixedDeposit(final Integer fixedDeposi getCalculatedPrematureAmountForFixedDepositAccountAsJSON(closedOnDate), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object prematureCloseForFixedDeposit(final Integer fixedDepositAccountId, final String closedOnDate, final String closureType, final Integer toSavingsId, final String jsonAttributeToGetBack) { LOG.info("--------------------- PREMATURE CLOSE FOR FIXED DEPOSIT ----------------------------"); @@ -314,6 +402,10 @@ public Object prematureCloseForFixedDeposit(final Integer fixedDepositAccountId, getPrematureCloseForFixedDepositAccountAsJSON(closedOnDate, closureType, toSavingsId), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getApproveFixedDepositAccountAsJSON(final String approvedOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -325,6 +417,10 @@ private String getApproveFixedDepositAccountAsJSON(final String approvedOnDate) return fixedDepositAccountApproveJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getRejectedFixedDepositAsJSON(final String rejectedOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -336,6 +432,10 @@ private String getRejectedFixedDepositAsJSON(final String rejectedOnDate) { return fixedDepositAccountJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getWithdrawnFixedDepositAccountAsJSON(final String withdrawnApplicationOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -347,6 +447,10 @@ private String getWithdrawnFixedDepositAccountAsJSON(final String withdrawnAppli return fixedDepositAccountJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getActivatedFixedDepositAccountAsJSON(final String activationDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -357,6 +461,10 @@ private String getActivatedFixedDepositAccountAsJSON(final String activationDate return fixedDepositAccountActivateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getCalculatedInterestForFixedDepositApplicationAsJSON() { final HashMap<String, String> map = new HashMap<>(); String fixedDepositAccountCalculatedInterestJson = new Gson().toJson(map); @@ -364,6 +472,10 @@ private String getCalculatedInterestForFixedDepositApplicationAsJSON() { return fixedDepositAccountCalculatedInterestJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getCalculatedPrematureAmountForFixedDepositAccountAsJSON(final String closedOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -374,6 +486,10 @@ private String getCalculatedPrematureAmountForFixedDepositAccountAsJSON(final St return fixedDepositAccountPrematureClosureJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getPrematureCloseForFixedDepositAccountAsJSON(final String closedOnDate, final String closureType, final Integer toSavingsId) { final HashMap<String, Object> map = new HashMap<>(); @@ -390,15 +506,27 @@ private String getPrematureCloseForFixedDepositAccountAsJSON(final String closed return fixedDepositAccountPrematureCloseJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createFixedDepositOperationURL(final String command, final Integer fixedDepositAccountID) { return FIXED_DEPOSIT_ACCOUNT_URL + "/" + fixedDepositAccountID + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Object performFixedDepositActions(final String postURLForFixedDeposit, final String jsonToBeSent, final String jsonAttributeToGetBack) { return Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForFixedDeposit, jsonToBeSent, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private HashMap performFixedDepositApplicationActions(final String postURLForFixedDepositAction, final String jsonToBeSent) { HashMap status = null; final HashMap response = Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForFixedDepositAction, jsonToBeSent, @@ -409,10 +537,18 @@ private HashMap performFixedDepositApplicationActions(final String postURLForFix return status; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createFixedDepositCalculateInterestURL(final String command, final Integer fixedDepositAccountID) { return FIXED_DEPOSIT_ACCOUNT_URL + "/" + fixedDepositAccountID + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList retrieveAllFixedDepositAccounts(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("-------------------- RETRIEVING ALL FIXED DEPOSIT ACCOUNTS ---------------------"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/fixeddeposit/FixedDepositProductHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/fixeddeposit/FixedDepositProductHelper.java index f502d1b5769..20cf1a91ea2 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/fixeddeposit/FixedDepositProductHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/fixeddeposit/FixedDepositProductHelper.java @@ -38,6 +38,10 @@ public class FixedDepositProductHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public FixedDepositProductHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; @@ -98,10 +102,18 @@ public FixedDepositProductHelper(final RequestSpecification requestSpec, final R private Boolean withHoldTax = false; private String taxGroupId = null; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String build(final String validFrom, final String validTo) { return build(validFrom, validTo, true); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String build(final String validFrom, final String validTo, final boolean withCharts) { final HashMap<String, Object> map = new HashMap<>(); @@ -157,6 +169,10 @@ public String build(final String validFrom, final String validTo, final boolean return FixedDepositProductCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap<String, String>> constructChartSlabWithPeriodRange() { List<HashMap<String, String>> chartSlabs = new ArrayList<HashMap<String, String>>(); HashMap<String, String> chartSlabsMap1 = new HashMap<>(); @@ -196,6 +212,10 @@ public List<HashMap<String, String>> constructChartSlabWithPeriodRange() { return chartSlabs; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap<String, String>> constructChartSlabWithPeriodAndAmountRange() { List<HashMap<String, String>> chartSlabs = new ArrayList<HashMap<String, String>>(); HashMap<String, String> chartSlabsMap1 = new HashMap<>(); @@ -283,6 +303,10 @@ public List<HashMap<String, String>> constructChartSlabWithPeriodAndAmountRange( return chartSlabs; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap<String, String>> constructChartSlabWithAmountAndPeriodRange() { this.isPrimaryGroupingByAmount = true; List<HashMap<String, String>> chartSlabs = new ArrayList<HashMap<String, String>>(); @@ -329,6 +353,10 @@ public List<HashMap<String, String>> constructChartSlabWithAmountAndPeriodRange( return chartSlabs; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap<String, String>> constructChartSlabWithAmountRange() { this.isPrimaryGroupingByAmount = true; List<HashMap<String, String>> chartSlabs = new ArrayList<HashMap<String, String>>(); @@ -397,6 +425,10 @@ public FixedDepositProductHelper withWithHoldTax(final String taxGroupId) { return this; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Map<String, String> getAccountMappingForCashBased() { final Map<String, String> map = new HashMap<>(); if (accountList != null) { @@ -424,6 +456,10 @@ private Map<String, String> getAccountMappingForCashBased() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createFixedDepositProduct(final String fixedDepositProductCreateJson, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("--------------------- CREATING FIXED DEPOSIT PRODUCT ------------------------"); @@ -431,6 +467,10 @@ public static Integer createFixedDepositProduct(final String fixedDepositProduct CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList retrieveAllFixedDepositProducts(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("-------------------- RETRIEVING ALL FIXED DEPOSIT PRODUCTS ---------------------"); @@ -439,6 +479,10 @@ public static ArrayList retrieveAllFixedDepositProducts(final RequestSpecificati return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap retrieveFixedDepositProductById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String productId) { LOG.info("------------------------ RETRIEVING FIXED DEPOSIT PRODUCT BY ID ------------------------"); @@ -447,6 +491,10 @@ public static HashMap retrieveFixedDepositProductById(final RequestSpecification return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList getInterestRateChartSlabsByProductId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer productId) { LOG.info("-------------------- RETRIEVE INTEREST CHART BY PRODUCT ID ---------------------"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/CobHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/CobHelper.java index e2dc7276f48..fcc3adf37e5 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/CobHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/CobHelper.java @@ -30,6 +30,10 @@ public final class CobHelper { private CobHelper() {} + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<Map<String, Object>> getCobPartitions(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, int partitionSize, final String jsonReturn) { final String url = "/fineract-provider/api/v1/internal/cob/partitions/" + partitionSize + "?" + Utils.TENANT_IDENTIFIER; @@ -37,6 +41,10 @@ public static List<Map<String, Object>> getCobPartitions(final RequestSpecificat return Utils.performServerGet(requestSpec, responseSpec, url, jsonReturn); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void fastForwardLoansLastCOBDate(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanId, final String cobDate) { final String url = "/fineract-provider/api/v1/internal/cob/fast-forward-cob-date-of-loan/" + loanId + "?" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanAccountLockHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanAccountLockHelper.java index a9b9f52a49c..225155e5990 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanAccountLockHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanAccountLockHelper.java @@ -32,15 +32,27 @@ public class LoanAccountLockHelper extends IntegrationTest { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public LoanAccountLockHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String placeSoftLockOnLoanAccount(Integer loanId, String lockOwner) { return placeSoftLockOnLoanAccount(loanId, lockOwner, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String placeSoftLockOnLoanAccount(Integer loanId, String lockOwner, String error) { return Utils.performServerPost(requestSpec, responseSpec, INTERNAL_PLACE_LOCK_ON_LOAN_ACCOUNT_URL + loanId + "/place-lock/" + lockOwner + "?" + Utils.TENANT_IDENTIFIER, error); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanTransactionHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanTransactionHelper.java index ed8aadb9516..67ca63554b7 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanTransactionHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanTransactionHelper.java @@ -129,84 +129,152 @@ public class LoanTransactionHelper extends IntegrationTest { private final ResponseSpecification responseSpec; private PaymentTypeHelper paymentTypeHelper; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public LoanTransactionHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; this.paymentTypeHelper = new PaymentTypeHelper(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public GetLoanProductsProductIdResponse getLoanProduct(final Integer loanProductId) { final String GET_LOANPRODUCT_URL = "/fineract-provider/api/v1/loanproducts/" + loanProductId + "?" + Utils.TENANT_IDENTIFIER; final String response = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_LOANPRODUCT_URL); return GSON.fromJson(response, GetLoanProductsProductIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public GetLoanProductsResponse[] listAllLoanProducts() { final String GET_LOANPRODUCT_URL = "/fineract-provider/api/v1/loanproducts?" + Utils.TENANT_IDENTIFIER; final String response = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_LOANPRODUCT_URL); return GSON.fromJson(response, GetLoanProductsResponse[].class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer getLoanProductId(final String loanProductJSON) { return Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_LOAN_PRODUCT_URL, loanProductJSON, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public <T> T getLoanProductError(final String loanProductJSON, final String jsonAttributeToGetBack) { return Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_LOAN_PRODUCT_URL, loanProductJSON, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer getLoanId(final String loanApplicationJSON) { return this.getLoanId(loanApplicationJSON, this.requestSpec, this.responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getLoanId(final String loanApplicationJSON, final String responseAttribute) { return (HashMap) this.getLoanId(loanApplicationJSON, responseAttribute, this.requestSpec, this.responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getLoanId(final String loanApplicationJSON, final String responseAttribute, RequestSpecification requestSpec, ResponseSpecification responseSpec) { return Utils.performServerPost(requestSpec, responseSpec, APPLY_LOAN_URL, loanApplicationJSON, responseAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer getLoanId(final String loanApplicationJSON, RequestSpecification requestSpec, ResponseSpecification responseSpec) { return (Integer) getLoanId(loanApplicationJSON, "loanId", requestSpec, responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Integer> getGlimId(final String loanApplicationJSON) { return Utils.performServerPost(this.requestSpec, this.responseSpec, APPLY_LOAN_URL, loanApplicationJSON, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getGlimLoanId(final String glimId) { final String GET_LOAN_URL = "/fineract-provider/api/v1/loans/glimAccount/" + glimId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(this.requestSpec, this.responseSpec, GET_LOAN_URL, "childLoanId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getLoanError(final String loanApplicationJSON, final String responseAttribute) { return Utils.performServerPost(this.requestSpec, this.responseSpec, APPLY_LOAN_URL, loanApplicationJSON, responseAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer getLoanOfficerId(final String loanId) { final String GET_LOAN_URL = "/fineract-provider/api/v1/loans/" + loanId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(this.requestSpec, this.responseSpec, GET_LOAN_URL, "loanOfficerId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object createLoanAccount(final String loanApplicationJSON, final String responseAttribute) { return Utils.performServerPost(this.requestSpec, this.responseSpec, APPLY_LOAN_URL, loanApplicationJSON, responseAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer updateLoan(final Integer id, final String loanApplicationJSON) { return Utils.performServerPut(this.requestSpec, this.responseSpec, "/fineract-provider/api/v1/loans/" + id + "?" + Utils.TENANT_IDENTIFIER, loanApplicationJSON, "loanId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PutLoansLoanIdResponse modifyLoanApplication(final Integer id, final String loanApplicationJSON) { final String response = Utils.performServerPut(this.requestSpec, this.responseSpec, "/fineract-provider/api/v1/loans/" + id + "?" + Utils.TENANT_IDENTIFIER, loanApplicationJSON, null); return GSON.fromJson(response, PutLoansLoanIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PutLoansLoanIdResponse modifyLoanCommand(final Integer loanId, final String command, final String payload, ResponseSpecification responseSpec) { final String url = "/fineract-provider/api/v1/loans/" + loanId + "?" + Utils.TENANT_IDENTIFIER + "&command=" + command; @@ -219,6 +287,10 @@ public PutLoansLoanIdResponse modifyLoanApplication(final String loanExternalId, return ok(fineract().loans.modifyLoanApplication1(loanExternalId, request, command)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList getLoanRepaymentSchedule(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "?associations=repaymentSchedule&" + Utils.TENANT_IDENTIFIER; @@ -226,18 +298,30 @@ public ArrayList getLoanRepaymentSchedule(final RequestSpecification requestSpec return (ArrayList) response.get("periods"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList getLoanCharges(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "?associations=charges&" + Utils.TENANT_IDENTIFIER; return (ArrayList) Utils.performServerGet(requestSpec, responseSpec, URL, "charges"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList getLoanTransactions(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "?associations=transactions&" + Utils.TENANT_IDENTIFIER; return (ArrayList) Utils.performServerGet(requestSpec, responseSpec, URL, "transactions"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList getLoanFutureRepaymentSchedule(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "?associations=repaymentSchedule,futureSchedule&" @@ -246,18 +330,30 @@ public ArrayList getLoanFutureRepaymentSchedule(final RequestSpecification reque return (ArrayList) response.get("futurePeriods"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getLoanSummary(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "?" + Utils.TENANT_IDENTIFIER; final HashMap response = Utils.performServerGet(requestSpec, responseSpec, URL, "summary"); return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public <T> T getLoanDetail(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID, final String param) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "?associations=all&" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, URL, param); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public GetLoansLoanIdResponse getLoan(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanId) { final String URL = "/fineract-provider/api/v1/loans/" + loanId + "?associations=all&" + Utils.TENANT_IDENTIFIER; @@ -265,6 +361,10 @@ public GetLoansLoanIdResponse getLoan(final RequestSpecification requestSpec, fi return GSON.fromJson(response, GetLoansLoanIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getLoanDetailExcludeFutureSchedule(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID, final String param) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "?associations=all&exclude=guarantors,futureSchedule&" @@ -272,11 +372,19 @@ public Object getLoanDetailExcludeFutureSchedule(final RequestSpecification requ return Utils.performServerGet(requestSpec, responseSpec, URL, param); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getLoanDetails(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "?associations=all&" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, URL, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList<GetDelinquencyTagHistoryResponse> getLoanDelinquencyTags(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "/delinquencytags?" + Utils.TENANT_IDENTIFIER; @@ -313,18 +421,30 @@ public PostLoansDelinquencyActionResponse createLoanDelinquencyAction(final Long return createLoanDelinquencyAction(loanid, action, startDate, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getLoanProductDetail(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanProductId, final String jsonAttributeToGetBack) { final String URL = "/fineract-provider/api/v1/loanproducts/" + loanProductId + "?associations=all&" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, URL, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getLoanProductDetails(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanProductId) { final String URL = "/fineract-provider/api/v1/loanproducts/" + loanProductId + "?associations=all&" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, URL, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList getLoanCharges(final Integer loanId) { final String GET_LOAN_CHARGES_URL = "/fineract-provider/api/v1/loans/" + loanId + "/charges?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, GET_LOAN_CHARGES_URL, ""); @@ -346,23 +466,39 @@ public GetLoansLoanIdChargesTemplateResponse getLoanChargeTemplate(final String return ok(fineract().loanCharges.retrieveTemplate9(loanExternalId)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap applyLoan(final String payload, final ResponseSpecification responseSpec) { final String postURLForLoan = "/fineract-provider/api/v1/loans?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForLoan, payload, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List getRepaymentTemplate(final Integer loanId) { final String GET_REPAYMENTS_URL = "/fineract-provider/api/v1/loans/" + loanId + "/transactions/template?command=repayment&" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, GET_REPAYMENTS_URL, "$"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList<HashMap> getRepayments(final Integer loanId) { final String GET_REPAYMENTS_URL = "/fineract-provider/api/v1/loans/" + loanId + "/transactions/template?command=disburse&" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, GET_REPAYMENTS_URL, "loanRepaymentScheduleInstallments"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdTransactionsResponse applyLoanTransactionCommand(final Integer loanId, final Integer transactionId, final String command, final String payload, final ResponseSpecification responseSpec) { final String LOAN_TRANSACTION_URL = "/fineract-provider/api/v1/loans/" + loanId + "/transactions/" + transactionId + "?command=" @@ -371,6 +507,10 @@ public PostLoansLoanIdTransactionsResponse applyLoanTransactionCommand(final Int return GSON.fromJson(response, PostLoansLoanIdTransactionsResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap approveLoan(final String approvalDate, final Integer loanID) { String loanApprovalCommand = createLoanOperationURL(APPROVE_LOAN_COMMAND, loanID); String loanApprovalRequest = getApproveLoanAsJSON(approvalDate); @@ -379,18 +519,30 @@ public HashMap approveLoan(final String approvalDate, final Integer loanID) { return performLoanTransaction(loanApprovalCommand, loanApprovalRequest); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap approveLoanWithApproveAmount(final String approvalDate, final String expectedDisbursementDate, final String approvalAmount, final Integer loanID, List<HashMap> tranches) { return performLoanTransaction(createLoanOperationURL(APPROVE_LOAN_COMMAND, loanID), getApproveLoanAsJSON(approvalDate, expectedDisbursementDate, approvalAmount, tranches)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap<String, Object>> approveLoanForTranches(final String approvalDate, final String expectedDisbursementDate, final String approvalAmount, final Integer loanID, List<HashMap> tranches, final String responseAttribute) { return (List<HashMap<String, Object>>) performLoanTransaction(createLoanOperationURL(APPROVE_LOAN_COMMAND, loanID), getApproveLoanAsJSON(approvalDate, expectedDisbursementDate, approvalAmount, tranches), responseAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object approveLoan(final String approvalDate, final String approvalAmount, final Integer loanID, final String responseAttribute) { @@ -400,44 +552,76 @@ public Object approveLoan(final String approvalDate, final String approvalAmount return performLoanTransaction(approvalURL, approvalJSONData, responseAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap undoApproval(final Integer loanID) { final String undoBodyJson = "{'note':'UNDO APPROVAL'}"; return performLoanTransaction(createLoanOperationURL(UNDO_APPROVAL_LOAN_COMMAND, loanID), undoBodyJson); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap disburseLoanWithNetDisbursalAmount(final String date, final Integer loanID, final String netDisbursalAmount) { return performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_COMMAND, loanID), getDisburseLoanAsJSON(date, null, netDisbursalAmount)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap disburseLoan(final String date, final Integer loanID, final String transactionAmount, final String externalId) { return (HashMap) performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_COMMAND, loanID), getDisburseLoanAsJSON(date, transactionAmount, null, externalId), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object disburseLoanWithTransactionAmount(final String date, final Integer loanID, final String transactionAmount, ResponseSpecification responseSpec) { return performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_COMMAND, loanID), getDisburseLoanAsJSON(date, transactionAmount, null), responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap disburseLoanWithTransactionAmount(final String date, final Integer loanID, final String transactionAmount) { return performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_COMMAND, loanID), getDisburseLoanAsJSON(date, transactionAmount, null)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap disburseLoanWithTransactionAmountAndWithoutAutoPayment(final String date, final Integer loanID, final String transactionAmount) { return performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_WITHOUT_AUTO_PAYMENT_COMMAND, loanID), getDisburseLoanAsJSON(date, transactionAmount, null)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap disburseLoanWithPostDatedChecks(final String date, final Integer loanId, final BigDecimal transactionAmount, final List<HashMap> postDatedChecks) { return performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_COMMAND, loanId), getDisburseLoanWithPostDatedChecksAsJSON(date, transactionAmount.toString(), postDatedChecks)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getDisburseLoanWithPostDatedChecksAsJSON(final String actualDisbursementDate, final String transactionAmount, final List<HashMap> postDatedChecks) { final HashMap<String, Object> map = new HashMap<String, Object>(); @@ -454,28 +638,48 @@ private String getDisburseLoanWithPostDatedChecksAsJSON(final String actualDisbu return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap disburseLoanWithRepaymentReschedule(final String date, final Integer loanID, String adjustRepaymentDate) { return performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_COMMAND, loanID), getDisburseLoanWithRepaymentRescheduleAsJSON(date, null, adjustRepaymentDate)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap disburseLoanWithNetDisbursalAmount(final String date, final Integer loanID, final String disburseAmt, final String netDisbursalAmount) { return performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_COMMAND, loanID), getDisburseLoanAsJSON(date, disburseAmt, netDisbursalAmount)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object disburseLoanWithNetDisbursalAmount(final String date, final Integer loanID, ResponseSpecification responseValidationError, final String netDisbursalAmount) { return performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_COMMAND, loanID), getDisburseLoanAsJSON(date, null, netDisbursalAmount), responseValidationError); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap disburseLoanToSavings(final String date, final Integer loanID, final String netDisbursalAmount) { return performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_TO_SAVINGS_COMMAND, loanID), getDisburseLoanAsJSON(date, null, netDisbursalAmount)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdResponse applyLoanCommand(final Integer loanId, final String command) { String undoBodyJson = "{}"; String url = ""; @@ -490,6 +694,10 @@ public PostLoansLoanIdResponse applyLoanCommand(final Integer loanId, final Stri return GSON.fromJson(response, PostLoansLoanIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap undoDisbursal(final Integer loanID) { final String undoDisburseJson = "{'note' : 'UNDO DISBURSAL'}"; log.info("IN DISBURSE LOAN"); @@ -498,6 +706,10 @@ public HashMap undoDisbursal(final Integer loanID) { return performLoanTransaction(createLoanOperationURL(UNDO_DISBURSE_LOAN_COMMAND, loanID), undoDisburseJson); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Float undoLastDisbursal(final Integer loanID) { final String undoLastDisburseJson = "{'note' : 'UNDO LAST DISBURSAL'}"; final String url = createLoanOperationURL(UNDO_LAST_DISBURSE_LOAN_COMMAND, loanID); @@ -506,6 +718,10 @@ public Float undoLastDisbursal(final Integer loanID) { undoLastDisburseJson); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap approveGlimAccount(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final List<Map<String, Object>> approvalFormData, final Integer glimID) { String approvalForm = new LoanApplicationTestBuilder() // @@ -515,85 +731,149 @@ public HashMap approveGlimAccount(final RequestSpecification requestSpec, final return performLoanTransaction(approvalURL, approvalForm); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap disburseGlimAccount(final String date, final Integer glimID) { log.info("--------------------------------- GLIM DISBURSEMENT APPLICATION -------------------------------"); return performLoanTransaction(createGlimAccountURL(DISBURSE_LOAN_COMMAND, glimID), getDisbursementAsJSON(date)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap undoDisburseGlimAccount(final Integer glimID) { log.info("--------------------------------- UNDO DISBURSAL GLIM APPLICATION -------------------------------"); final String undoBodyJson = "{'note':'UNDO DISBURSAL'}"; return performLoanTransaction(createGlimAccountURL(UNDO_DISBURSE_LOAN_COMMAND, glimID), undoBodyJson); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap undoApprovalGlimAccount(final Integer glimID) { log.info("--------------------------------- UNDO APPROVAL GLIM APPLICATION -------------------------------"); final String undoBodyJson = "{'note':'UNDO APPROVAL'}"; return performLoanTransaction(createGlimAccountURL(UNDO_APPROVAL_LOAN_COMMAND, glimID), undoBodyJson); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap rejectGlimAccount(final String date, final Integer glimID) { log.info("--------------------------------- REJECT GLIM APPLICATION -------------------------------"); return performLoanTransaction(createGlimAccountURL(REJECT_LOAN_COMMAND, glimID), getRejectAsJSON(date)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void recoverFromGuarantor(final Integer loanID) { performLoanTransaction(createLoanOperationURL(RECOVER_FROM_GUARANTORS_COMMAND, loanID), "", ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap writeOffLoan(final String date, final Integer loanID) { return performLoanTransaction(createLoanTransactionURL(WRITE_OFF_LOAN_COMMAND, loanID), getWriteOffBodyAsJSON(date)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap waiveInterest(final String date, final String amountToBeWaived, final Integer loanID) { return performLoanTransaction(createLoanTransactionURL(WAIVE_INTEREST_COMMAND, loanID), getWaiveBodyAsJSON(date, amountToBeWaived)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer waiveInterestAndReturnTransactionId(final String date, final String amountToBeWaived, final Integer loanID) { Integer resourceId = Utils.performServerPost(this.requestSpec, this.responseSpec, createLoanTransactionURL(WAIVE_INTEREST_COMMAND, loanID), getWaiveBodyAsJSON(date, amountToBeWaived), "resourceId"); return resourceId; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object creditBalanceRefund(final String date, final Float amountToBePaid, final String externalId, final Integer loanID, String jsonAttributeToGetback) { return performLoanTransaction(createLoanTransactionURL(CREDIT_BALANCE_REFUND_COMMAND, loanID), getCreditBalanceRefundBodyAsJSON(date, amountToBePaid, externalId), jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object loanChargeRefund(final Integer loanChargeId, final Integer installmentNumber, final Float amountToBePaid, final String externalId, final Integer loanID, String jsonAttributeToGetback) { return performLoanTransaction(createLoanTransactionURL(LOANCHARGE_REFUND_REPAYMENT_COMMAND, loanID), getLoanChargeRefundBodyAsJSON(loanChargeId, installmentNumber, amountToBePaid, externalId), jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object makeRepaymentTypePayment(final String repaymentTypeCommand, final String date, final Float amountToBePaid, final Integer loanID, String jsonAttributeToGetback) { return performLoanTransaction(createLoanTransactionURL(repaymentTypeCommand, loanID), getRepaymentBodyAsJSON(date, amountToBePaid), jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap makeRepayment(final String date, final Float amountToBePaid, final Integer loanID) { return (HashMap) performLoanTransaction(createLoanTransactionURL(MAKE_REPAYMENT_COMMAND, loanID), getRepaymentBodyAsJSON(date, amountToBePaid), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap makeRepaymentWithAccountNo(final String date, final Float amountToBePaid, final String accountNo) { return (HashMap) performLoanTransaction(createInteroperationLoanTransactionURL(accountNo), getRepaymentBodyAsJSON(date, amountToBePaid), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap reverseRepayment(final Integer loanId, final Integer transactionId, String date) { return (HashMap) performLoanTransaction(createLoanTransactionURL(UNDO, loanId, transactionId), getAdjustTransactionJsonBody(date, "0"), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdTransactionsResponse makeLoanRepayment(final String repaymentTypeCommand, final String date, final Float amountToBePaid, final Integer loanID) { log.info("Repayment with amount {} in {} for Loan {}", amountToBePaid, date, loanID); return postLoanTransaction(createLoanTransactionURL(repaymentTypeCommand, loanID), getRepaymentBodyAsJSON(date, amountToBePaid)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdTransactionsResponse makeLoanRepayment(final String date, final Float amountToBePaid, final Integer loanID) { log.info("Repayment with amount {} in {} for Loan {}", amountToBePaid, date, loanID); return postLoanTransaction(createLoanTransactionURL(MAKE_REPAYMENT_COMMAND, loanID), getRepaymentBodyAsJSON(date, amountToBePaid)); @@ -608,6 +888,10 @@ public PostLoansLoanIdTransactionsResponse makeLoanRepayment(final Long loanId, return ok(newFineract(user, pass).loanTransactions.executeLoanTransaction(loanId, request, "repayment")); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdTransactionsResponse createInterestPauseByLoanId(final String startDate, final String endDate, final String dateFormat, final String locale, final Integer loanID) { log.info("Creating interest pause for Loan {} from {} to {} with dateFormat {} and locale {}", loanID, startDate, endDate, @@ -616,6 +900,10 @@ public PostLoansLoanIdTransactionsResponse createInterestPauseByLoanId(final Str return postLoanTransaction(createInterestPause(INTEREST_PAUSE_COMMAND, loanID), body); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdTransactionsResponse createInterestPauseByExternalId(final String startDate, final String endDate, final String dateFormat, final String locale, final String externalId) { log.info("Creating interest pause for Loan {} from {} to {} with dateFormat {} and locale {}", externalId, startDate, endDate, @@ -624,6 +912,10 @@ public PostLoansLoanIdTransactionsResponse createInterestPauseByExternalId(final return postLoanTransaction(createInterestPause(INTEREST_PAUSE_COMMAND, externalId), body); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdTransactionsResponse updateInterestPauseByLoanId(final Long termVariationId, final String startDate, final String endDate, final String dateFormat, final String locale, final Integer loanID) { log.info("Updating interest pause for Loan {} with Term Variation ID {}: startDate={} endDate={} dateFormat={} locale={}", loanID, @@ -656,6 +948,10 @@ public String retrieveInterestPauseByLoanId(final Integer loanID) { return Utils.performServerGet(requestSpec, responseSpec, url); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String retrieveInterestPauseByExternalId(final String externalId) { log.info("Retrieving interest pauses for External ID {}", externalId); String url = retrieveInterestPause(externalId); @@ -883,12 +1179,20 @@ public PostLoansLoanIdTransactionsResponse adjustLoanTransaction(final Long loan return ok(fineract().loanTransactions.adjustLoanTransaction(loanId, transactionId, request, "adjust")); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdTransactionsResponse adjustLoanTransaction(final Integer loanId, final Long transactionId, String date, ResponseSpecification responseSpec) { return postLoanTransaction(createLoanTransactionURL(null, loanId, transactionId.intValue()), getAdjustTransactionJsonBody(date, "10"), responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdTransactionsResponse reverseLoanTransaction(final Integer loanId, final Long transactionId, String date, ResponseSpecification responseSpec) { return postLoanTransaction(createLoanTransactionURL(UNDO, loanId, transactionId.intValue()), @@ -905,11 +1209,19 @@ public HashMap makeRepaymentWithPDC(final String date, final Float amountToBePai getRepaymentWithPDCBodyAsJSON(date, amountToBePaid, paymentType), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap forecloseLoan(final String transactionDate, final Integer loanID) { return (HashMap) performLoanTransaction(createLoanTransactionURL(FORECLOSURE_COMMAND, loanID), getForeclosureBodyAsJSON(transactionDate, loanID), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap withdrawLoanApplicationByClient(final String date, final Integer loanID) { return performLoanTransaction(createLoanOperationURL(WITHDRAW_LOAN_APPLICATION_COMMAND, loanID), getWithdrawLoanApplicationBodyAsJSON(date)); @@ -923,6 +1235,10 @@ public PostLoansLoanIdChargesResponse addLoanCharge(final String loanExternalId, return ok(fineract().loanCharges.executeLoanCharge1(loanExternalId, request, "")); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer addChargesForLoan(final Integer loanId, final String request) { log.info("--------------------------------- ADD CHARGES FOR LOAN --------------------------------"); final String ADD_CHARGES_URL = LOAN_ACCOUNT_URL + "/" + loanId + "/charges?" + Utils.TENANT_IDENTIFIER; @@ -930,12 +1246,20 @@ public Integer addChargesForLoan(final Integer loanId, final String request) { return (Integer) response.get("resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap addChargesForLoanGetFullResponse(final Integer loanId, final String request) { log.info("--------------------------------- ADD CHARGES FOR LOAN --------------------------------"); final String ADD_CHARGES_URL = LOAN_ACCOUNT_URL + "/" + loanId + "/charges?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, ADD_CHARGES_URL, request, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer addChargesForLoan(final Integer loanId, final String request, final ResponseSpecification responseSpecParam) { log.info("--------------------------------- ADD CHARGES FOR LOAN --------------------------------"); final String ADD_CHARGES_URL = LOAN_ACCOUNT_URL + "/" + loanId + "/charges?" + Utils.TENANT_IDENTIFIER; @@ -947,6 +1271,10 @@ public PostLoansLoanIdChargesResponse addChargesForLoan(final Long loanId, PostL return ok(fineract().loanCharges.executeLoanCharge(loanId, request, null)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdChargesResponse addChargeForLoan(final Integer loanId, final String payload, final ResponseSpecification responseSpecParam) { log.info("--------------------------------- ADD CHARGES FOR LOAN --------------------------------"); @@ -955,12 +1283,20 @@ public PostLoansLoanIdChargesResponse addChargeForLoan(final Integer loanId, fin return GSON.fromJson(response, PostLoansLoanIdChargesResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object addChargesForAllreadyDisursedLoan(final Integer loanId, final String request, final ResponseSpecification responseSpecification) { final String ADD_CHARGES_URL = "/fineract-provider/api/v1/loans/" + loanId + "/charges?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(this.requestSpec, responseSpecification, ADD_CHARGES_URL, request, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer updateChargesForLoan(final Integer loanId, final Integer loanchargeId, final String request) { log.info("--------------------------------- ADD CHARGES FOR LOAN --------------------------------"); final String UPDATE_CHARGES_URL = "/fineract-provider/api/v1/loans/" + loanId + "/charges/" + loanchargeId + "?" @@ -1005,6 +1341,10 @@ public DeleteLoansLoanIdChargesChargeIdResponse deleteLoanCharge(final String lo return ok(fineract().loanCharges.deleteLoanCharge3(loanExternalId, loanChargeExternalId)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer deleteChargesForLoan(final Integer loanId, final Integer loanchargeId) { log.info("--------------------------------- DELETE CHARGES FOR LOAN --------------------------------"); final String DELETE_CHARGES_URL = "/fineract-provider/api/v1/loans/" + loanId + "/charges/" + loanchargeId + "?" @@ -1013,6 +1353,10 @@ public Integer deleteChargesForLoan(final Integer loanId, final Integer loanchar return (Integer) response.get("resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostLoansLoanIdChargesChargeIdResponse applyLoanChargeCommand(final Integer loanId, final Long loanchargeId, final String commad, final String json) { log.info("--------------------------------- WAIVE CHARGES FOR LOAN --------------------------------"); @@ -1022,6 +1366,10 @@ public PostLoansLoanIdChargesChargeIdResponse applyLoanChargeCommand(final Integ return GSON.fromJson(response, PostLoansLoanIdChargesChargeIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer waiveChargesForLoan(final Integer loanId, final Integer loanchargeId, final String json) { log.info("--------------------------------- WAIVE CHARGES FOR LOAN --------------------------------"); final String CHARGES_URL = "/fineract-provider/api/v1/loans/" + loanId + "/charges/" + loanchargeId + "?command=waive&" @@ -1030,6 +1378,10 @@ public Integer waiveChargesForLoan(final Integer loanId, final Integer loancharg return (Integer) response.get("resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap undoWaiveChargesForLoan(final Integer loanId, final Integer transactionId, final String body) { log.info("--------------------------------- UNDO WAIVE CHARGES FOR LOAN --------------------------------"); final String TRANSAC_URL = "/fineract-provider/api/v1/loans/" + loanId + "/transactions/" + transactionId + "?" @@ -1047,6 +1399,10 @@ public PostLoansLoanIdChargesChargeIdResponse chargeAdjustment(final String loan return ok(fineract().loanCharges.executeLoanCharge5(loanExternalId, loanChargeExternalId, request, "adjustment")); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer undoWaiveChargesForLoanReturnResourceId(final Integer loanId, final Integer transactionId, final String body) { log.info("--------------------------------- UNDO WAIVE CHARGES FOR LOAN --------------------------------"); final String TRANSAC_URL = "/fineract-provider/api/v1/loans/" + loanId + "/transactions/" + transactionId + "?" @@ -1055,6 +1411,10 @@ public Integer undoWaiveChargesForLoanReturnResourceId(final Integer loanId, fin return (Integer) response.get("resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer payChargesForLoan(final Integer loanId, final Integer loanchargeId, final String json) { log.info("--------------------------------- WAIVE CHARGES FOR LOAN --------------------------------"); final String CHARGES_URL = "/fineract-provider/api/v1/loans/" + loanId + "/charges/" + loanchargeId + "?command=pay&" @@ -1078,6 +1438,10 @@ public PostLoansLoanIdChargesChargeIdResponse payLoanCharge(final String loanExt return ok(fineract().loanCharges.executeLoanCharge5(loanExternalId, loanChargeExternalId, request, "pay")); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList<HashMap> getLoanTransactionDetails(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "?associations=all&exclude=guarantors,futureSchedule&" @@ -1085,6 +1449,10 @@ public ArrayList<HashMap> getLoanTransactionDetails(final RequestSpecification r return Utils.performServerGet(requestSpec, responseSpec, URL, "transactions"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getLoanCharge(final Integer loanId, final Integer chargeId) { final String GET_LOAN_CHARGES_URL = "/fineract-provider/api/v1/loans/" + loanId + "/charges/" + chargeId + "?" + Utils.TENANT_IDENTIFIER; @@ -1107,6 +1475,10 @@ public GetLoansLoanIdChargesChargeIdResponse getLoanCharge(final String loanExte return ok(fineract().loanCharges.retrieveLoanCharge3(loanExternalId, loanChargeExternalId)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getLoanTransactionDetails(final Integer loanId, final Integer txnId, final String param) { final String GET_LOAN_CHARGES_URL = "/fineract-provider/api/v1/loans/" + loanId + "/transactions/" + txnId + "?" + Utils.TENANT_IDENTIFIER; @@ -1141,6 +1513,10 @@ public GetLoansLoanIdResponse getLoanDetails(final String loanExternalId) { return ok(fineract().loans.retrieveLoan1(loanExternalId, false, "all", null, null)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public GetLoansLoanIdTransactionsTransactionIdResponse getLoanTransaction(final Integer loanId, final Integer txnId) { final String GET_LOAN_CHARGES_URL = "/fineract-provider/api/v1/loans/" + loanId + "/transactions/" + txnId + "?" + Utils.TENANT_IDENTIFIER; @@ -1148,17 +1524,29 @@ public GetLoansLoanIdTransactionsTransactionIdResponse getLoanTransaction(final return GSON.fromJson(response, GetLoansLoanIdTransactionsTransactionIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getPostDatedCheck(final Integer loanId, final Integer installmentId) { final String GET_POST_DATED_TRANS_URL = "/fineract-provider/api/v1/loans/" + loanId + "/postdatedchecks/" + installmentId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, GET_POST_DATED_TRANS_URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getDisburseLoanAsJSON(final String actualDisbursementDate, final String transactionAmount, final String netDisbursalAmount) { return getDisburseLoanAsJSON(actualDisbursementDate, transactionAmount, netDisbursalAmount, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getDisburseLoanAsJSON(final String actualDisbursementDate, final String transactionAmount, final String netDisbursalAmount, final String externalId) { final HashMap<String, String> map = new HashMap<>(); @@ -1179,6 +1567,10 @@ private String getDisburseLoanAsJSON(final String actualDisbursementDate, final return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getDisburseLoanWithRepaymentRescheduleAsJSON(final String actualDisbursementDate, final String transactionAmount, final String adjustRepaymentDate) { final HashMap<String, String> map = new HashMap<>(); @@ -1194,10 +1586,18 @@ private String getDisburseLoanWithRepaymentRescheduleAsJSON(final String actualD return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getApproveLoanAsJSON(final String approvalDate) { return getApproveLoanAsJSON(approvalDate, null, null, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getApproveLoanAsJSON(final String approvalDate, final String expectedDisbursementDate, final String approvalAmount, List<HashMap> tranches) { final HashMap<String, Object> map = new HashMap<>(); @@ -1217,6 +1617,10 @@ private String getApproveLoanAsJSON(final String approvalDate, final String expe return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getDisbursementAsJSON(final String date) { final HashMap<String, String> map = new HashMap<>(); map.put("actualDisbursementDate", date); @@ -1225,6 +1629,10 @@ private String getDisbursementAsJSON(final String date) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getRejectAsJSON(final String date) { final HashMap<String, String> map = new HashMap<>(); map.put("rejectedOnDate", date); @@ -1233,6 +1641,10 @@ private String getRejectAsJSON(final String date) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getLoanChargeRefundBodyAsJSON(final Integer loanChargeId, final Integer installmentNumber, final Float transactionAmount, final String externalId) { final HashMap<String, String> map = new HashMap<>(); @@ -1250,6 +1662,10 @@ private String getLoanChargeRefundBodyAsJSON(final Integer loanChargeId, final I return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getCreditBalanceRefundBodyAsJSON(final String transactionDate, final Float transactionAmount, final String externalId) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en"); @@ -1263,6 +1679,10 @@ private String getCreditBalanceRefundBodyAsJSON(final String transactionDate, fi return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getRepaymentBodyAsJSON(final String transactionDate, final Float transactionAmount) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en"); @@ -1273,6 +1693,10 @@ private String getRepaymentBodyAsJSON(final String transactionDate, final Float return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getInterestPauseBodyAsJSON(final String startDate, final String endDate, final String dateFormat, final String locale) { final HashMap<String, String> map = new HashMap<>(); map.put("startDate", startDate); @@ -1283,6 +1707,10 @@ private String getInterestPauseBodyAsJSON(final String startDate, final String e return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getAdjustTransactionJsonBody(String date, String amount) { final HashMap<String, String> map = new HashMap<>(); map.put("transactionDate", date); @@ -1292,6 +1720,10 @@ private String getAdjustTransactionJsonBody(String date, String amount) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getRepaymentWithPDCBodyAsJSON(final String transactionDate, final Float transactionAmount, final Long paymentTypeId) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en"); @@ -1303,6 +1735,10 @@ private String getRepaymentWithPDCBodyAsJSON(final String transactionDate, final return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getForeclosureBodyAsJSON(final String transactionDate, final Integer loanId) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", "en"); @@ -1314,6 +1750,10 @@ private String getForeclosureBodyAsJSON(final String transactionDate, final Inte return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getWriteOffBodyAsJSON(final String transactionDate) { final HashMap<String, String> map = new HashMap<>(); map.put("dateFormat", "dd MMMM yyyy"); @@ -1323,6 +1763,10 @@ private String getWriteOffBodyAsJSON(final String transactionDate) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getWaiveBodyAsJSON(final String transactionDate, final String amountToBeWaived) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en"); @@ -1333,6 +1777,10 @@ private String getWaiveBodyAsJSON(final String transactionDate, final String amo return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getWithdrawLoanApplicationBodyAsJSON(final String withdrawDate) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en"); @@ -1343,14 +1791,26 @@ private String getWithdrawLoanApplicationBodyAsJSON(final String withdrawDate) { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSpecifiedDueDateChargesForLoanAsJSON(final String chargeId) { return getSpecifiedDueDateChargesForLoanAsJSON(chargeId, "12 January 2013", "100", null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSpecifiedDueDateChargesForLoanAsJSON(final String chargeId, final String dueDate, final String amount) { return getSpecifiedDueDateChargesForLoanAsJSON(chargeId, dueDate, amount, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSpecifiedDueDateChargesForLoanAsJSON(final String chargeId, final String dueDate, final String amount, final String externalId) { final HashMap<String, String> map = new HashMap<>(); @@ -1367,6 +1827,10 @@ public static String getSpecifiedDueDateChargesForLoanAsJSON(final String charge return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getSpecifiedInstallmentChargesForLoanAsJSON(final String chargeId, final String amount) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en_GB"); @@ -1378,10 +1842,18 @@ public static String getSpecifiedInstallmentChargesForLoanAsJSON(final String ch return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getDisbursementChargesForLoanAsJSON(final String chargeId) { return getDisbursementChargesForLoanAsJSON(chargeId, "100"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getDisbursementChargesForLoanAsJSON(final String chargeId, String amount) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en_GB"); @@ -1393,10 +1865,18 @@ public static String getDisbursementChargesForLoanAsJSON(final String chargeId, return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getInstallmentChargesForLoanAsJSON(final String chargeId, final String amount) { return getInstallmentChargesForLoanAsJSON(chargeId, amount, Locale.UK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getInstallmentChargesForLoanAsJSON(final String chargeId, final Object amount, final Locale locale) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", locale.getLanguage()); @@ -1408,6 +1888,10 @@ public static String getInstallmentChargesForLoanAsJSON(final String chargeId, f return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getUpdateChargesForLoanAsJSON(String amount) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en_GB"); @@ -1418,10 +1902,18 @@ public static String getUpdateChargesForLoanAsJSON(String amount) { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getPayChargeJSON(final String date, final String installmentNumber) { return getPayChargeJSON(date, installmentNumber, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getPayChargeJSON(final String date, final String installmentNumber, final String externalId) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en_GB"); @@ -1438,6 +1930,10 @@ public static String getPayChargeJSON(final String date, final String installmen return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getWaiveChargeJSON(final String installmentNumber) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en_GB"); @@ -1447,6 +1943,10 @@ public static String getWaiveChargeJSON(final String installmentNumber) { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getLoanCalculationBodyAsJSON(final String productID) { final HashMap<String, String> map = new HashMap<>(); map.put("dateFormat", "dd MMMM yyyy"); @@ -1468,53 +1968,101 @@ public String getLoanCalculationBodyAsJSON(final String productID) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String createLoanOperationURL(final String command, final Integer loanID) { return "/fineract-provider/api/v1/loans/" + loanID + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createLoanTransactionURL(final String command, final Integer loanID) { return "/fineract-provider/api/v1/loans/" + loanID + "/transactions?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createInterestPause(final String command, final Integer loanID) { return "/fineract-provider/api/v1/loans/" + loanID + "/interest-pauses?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createInterestPause(final String command, final String externalId) { return "/fineract-provider/api/v1/loans/external-id/" + externalId + "/interest-pauses?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String retrieveInterestPause(final Integer loanID) { return "/fineract-provider/api/v1/loans/" + loanID + "/interest-pauses?" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String retrieveInterestPause(final String externalId) { return "/fineract-provider/api/v1/loans/external-id/" + externalId + "/interest-pauses?" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String updateInterestPause(final Long termVariationId, final Integer loanID) { return "/fineract-provider/api/v1/loans/" + loanID + "/interest-pauses/" + termVariationId + "?" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String updateInterestPause(final Long termVariationId, final String externalID) { return "/fineract-provider/api/v1/loans/external-id/" + externalID + "/interest-pauses/" + termVariationId + "?" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String deleteInterestPause(final Long termVariationId, final Integer loanID) { return "/fineract-provider/api/v1/loans/" + loanID + "/interest-pauses/" + termVariationId + "?" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String deleteInterestPause(final Long termVariationId, final String externalID) { return "/fineract-provider/api/v1/loans/external-id/" + externalID + "/interest-pauses/" + termVariationId + "?" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createInteroperationLoanTransactionURL(final String accountNo) { return "/fineract-provider/api/v1/interoperation/transactions/" + accountNo + "/loanrepayment"; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createLoanTransactionURL(final String command, final Integer loanID, final Integer transactionId) { String url = "/fineract-provider/api/v1/loans/" + loanID + "/transactions/" + transactionId + "?"; if (command != null) { @@ -1523,10 +2071,18 @@ private String createLoanTransactionURL(final String command, final Integer loan return url + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createGlimAccountURL(final String command, final Integer glimID) { return "/fineract-provider/api/v1/loans/glimAccount/" + glimID + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private HashMap performLoanTransaction(final String postURLForLoanTransaction, final String jsonToBeSent) { log.info("URL: {}", postURLForLoanTransaction); log.info("Body: {}", jsonToBeSent); @@ -1535,6 +2091,10 @@ private HashMap performLoanTransaction(final String postURLForLoanTransaction, f return (HashMap) response.get("status"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Float performUndoLastLoanDisbursementTransaction(final String postURLForLoanTransaction, final String jsonToBeSent) { final HashMap response = Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForLoanTransaction, jsonToBeSent, @@ -1542,15 +2102,27 @@ private Float performUndoLastLoanDisbursementTransaction(final String postURLFor return (Float) response.get("disbursedAmount"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Object performLoanTransaction(final String postURLForLoanTransaction, final String jsonToBeSent, final String responseAttribute) { return Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForLoanTransaction, jsonToBeSent, responseAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private PostLoansLoanIdTransactionsResponse postLoanTransaction(final String postURLForLoanTransaction, final String jsonToBeSent) { return postLoanTransaction(postURLForLoanTransaction, jsonToBeSent, this.responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private PostLoansLoanIdTransactionsResponse postLoanTransaction(final String postURLForLoanTransaction, final String jsonToBeSent, ResponseSpecification responseSpec) { final String response = Utils.performServerPost(this.requestSpec, responseSpec, postURLForLoanTransaction, jsonToBeSent); @@ -1566,6 +2138,10 @@ private void deleteLoanTransaction(final String deleteURLForLoanTransaction) { Utils.performServerDelete(this.requestSpec, this.responseSpec, deleteURLForLoanTransaction, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Object performLoanTransaction(final String postURLForLoanTransaction, final String jsonToBeSent, ResponseSpecification responseValidationError) { @@ -1573,17 +2149,29 @@ private Object performLoanTransaction(final String postURLForLoanTransaction, fi CommonConstants.RESPONSE_ERROR); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object adjustLoanTransaction(final Integer loanId, final Integer transactionId, final String date, final String transactionAmount, final String responseAttribute) { return adjustLoanTransaction(loanId, transactionId, getAdjustTransactionJSON(date, transactionAmount), responseAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Object adjustLoanTransaction(final Integer loanId, final Integer tansactionId, final String jsonToBeSent, final String responseAttribute) { final String URL = "/fineract-provider/api/v1/loans/" + loanId + "/transactions/" + tansactionId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(this.requestSpec, this.responseSpec, URL, jsonToBeSent, responseAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getAdjustTransactionJSON(final String date, final String transactionAmount) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en_GB"); @@ -1595,6 +2183,10 @@ private String getAdjustTransactionJSON(final String date, final String transact return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getPrepayAmount(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID) { final String URL = "/fineract-provider/api/v1/loans/" + loanID + "/transactions/template?command=prepayLoan&" + Utils.TENANT_IDENTIFIER; @@ -1602,6 +2194,10 @@ public HashMap getPrepayAmount(final RequestSpecification requestSpec, final Res return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getPrepayAmount(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanID, final LocalDate transactionDate) { final String URL = "/fineract-provider/api/v1/loans/" + loanID @@ -1611,10 +2207,18 @@ public HashMap getPrepayAmount(final RequestSpecification requestSpec, final Res return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createLoanRefundTransferURL() { return "/fineract-provider/api/v1/accounttransfers/refundByTransfer?tenantIdentifier=default"; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyRepaymentScheduleEntryFor(final int repaymentNumber, final float expectedPrincipalOutstanding, final Integer loanID) { log.info("---------------------------GETTING LOAN REPAYMENT SCHEDULE--------------------------------"); final ArrayList<HashMap> repaymentPeriods = getLoanRepaymentSchedule(this.requestSpec, this.responseSpec, loanID); @@ -1622,6 +2226,10 @@ public void verifyRepaymentScheduleEntryFor(final int repaymentNumber, final flo "Mismatch in Principal Loan Balance Outstanding "); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void checkAccrualTransactionForRepayment(final LocalDate transactionDate, final Float interestPortion, final Float feePortion, final Float penaltyPortion, final Integer loanID) { @@ -1651,6 +2259,10 @@ public void checkAccrualTransactionForRepayment(final LocalDate transactionDate, assertTrue(isTransactionFound, "No Accrual entries are posted"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void noAccrualTransactionForRepayment(final Integer loanID) { ArrayList<HashMap> transactions = (ArrayList<HashMap>) getLoanTransactions(this.requestSpec, this.responseSpec, loanID); for (HashMap transaction : transactions) { @@ -1659,17 +2271,29 @@ public void noAccrualTransactionForRepayment(final Integer loanID) { } } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap makeRefundByCash(final String date, final Float amountToBeRefunded, final Integer loanID) { return performLoanTransaction(createLoanTransactionURL(MAKE_REFUND_BY_CASH_COMMAND, loanID), getRefundByCashBodyAsJSON(date, amountToBeRefunded)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap makeRefundByTransfer(final Integer fromAccountId, final Integer toClientId, final Integer toAccountId, final Integer fromClientId, final String date, final Float amountToBeRefunded) { return performLoanTransaction(createLoanRefundTransferURL(), getRefundByTransferBodyAsJSON(fromAccountId, toClientId, toAccountId, fromClientId, date, amountToBeRefunded)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getRefundByCashBodyAsJSON(final String transactionDate, final Float transactionAmount) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", "en"); @@ -1680,6 +2304,10 @@ private String getRefundByCashBodyAsJSON(final String transactionDate, final Flo return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getRefundByTransferBodyAsJSON(final Integer fromAccountId, final Integer toClientId, final Integer toAccountId, final Integer fromClientId, final String transactionDate, final Float transactionAmount) { final HashMap<String, String> map = new HashMap<>(); @@ -1699,12 +2327,20 @@ private String getRefundByTransferBodyAsJSON(final Integer fromAccountId, final return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getLoanFraudPayloadAsJSON(final String attrName, final String attrValue) { final HashMap<String, String> map = new HashMap<>(); map.put(attrName, attrValue); return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap createTrancheDetail(final String id, final String date, final String amount) { HashMap<String, Object> detail = new HashMap<>(); if (id != null) { @@ -1716,6 +2352,10 @@ public HashMap createTrancheDetail(final String id, final String date, final Str return detail; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object editDisbursementDetail(final Integer loanID, final Integer disbursementId, final String approvalAmount, final String expectedDisbursementDate, final String updatedExpectedDisbursementDate, final String updatedPrincipal, final String jsonAttributeToGetBack) { @@ -1725,6 +2365,10 @@ public Object editDisbursementDetail(final Integer loanID, final Integer disburs jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object addAndDeleteDisbursementDetail(final Integer loanID, final String approvalAmount, final String expectedDisbursementDate, List<HashMap> disbursementData, final String jsonAttributeToGetBack) { @@ -1732,14 +2376,26 @@ public Object addAndDeleteDisbursementDetail(final Integer loanID, final String getAddAndDeleteDisbursementsAsJSON(approvalAmount, expectedDisbursementDate, disbursementData), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createEditDisbursementURL(Integer loanID, Integer disbursementId) { return "/fineract-provider/api/v1/loans/" + loanID + "/disbursements/" + disbursementId + "?" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createAddAndDeleteDisbursementURL(Integer loanID) { return "/fineract-provider/api/v1/loans/" + loanID + "/disbursements/editDisbursements?" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getEditDisbursementsAsJSON(final String approvalAmount, final String expectedDisbursementDate, final String updatedExpectedDisbursementDate, final String updatedPrincipal) { final HashMap<String, String> map = new HashMap<>(); @@ -1754,6 +2410,10 @@ public static String getEditDisbursementsAsJSON(final String approvalAmount, fin return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getAddAndDeleteDisbursementsAsJSON(final String approvalAmount, final String expectedDisbursementDate, final List<HashMap> disbursementData) { final HashMap map = new HashMap<>(); @@ -1767,6 +2427,10 @@ public static String getAddAndDeleteDisbursementsAsJSON(final String approvalAmo return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<HashMap<String, Object>> getTestDatatableAsJson(final String registeredTableName) { List<HashMap<String, Object>> datatablesListMap = new ArrayList<>(); HashMap<String, Object> datatableMap = new HashMap<>(); @@ -1783,6 +2447,10 @@ public static List<HashMap<String, Object>> getTestDatatableAsJson(final String return datatablesListMap; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Workbook getLoanWorkbook(String dateFormat) throws IOException { requestSpec.header(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel"); byte[] byteArray = Utils.performGetBinaryResponse(requestSpec, responseSpec, @@ -1792,6 +2460,10 @@ public Workbook getLoanWorkbook(String dateFormat) throws IOException { return workbook; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String importLoanTemplate(File file) { String locale = "en"; @@ -1802,12 +2474,20 @@ public String importLoanTemplate(File file) { LOAN_ACCOUNT_URL + "/uploadtemplate" + "?" + Utils.TENANT_IDENTIFIER, legalFormType, file, locale, dateFormat); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getOutputTemplateLocation(final String importDocumentId) { requestSpec.header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN); return Utils.performServerOutputTemplateLocationGet(requestSpec, responseSpec, "/fineract-provider/api/v1/imports/getOutputTemplateLocation" + "?" + Utils.TENANT_IDENTIFIER, importDocumentId); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> getLoanAuditFields(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanId, final String jsonReturn) { final String GET_LOAN_URL = "/fineract-provider/api/v1/internal/loan/" + loanId + "/audit?" + Utils.TENANT_IDENTIFIER; @@ -1815,6 +2495,10 @@ public static HashMap<String, Object> getLoanAuditFields(final RequestSpecificat return Utils.performServerGet(requestSpec, responseSpec, GET_LOAN_URL, jsonReturn); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> getLoanTransactionAuditFields(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer loanId, final Integer transactionId, final String jsonReturn) { final String GET_LOAN_TRANSACTION_URL = "/fineract-provider/api/v1/internal/loan/" + loanId + "/transaction/" + transactionId @@ -1824,6 +2508,10 @@ public static HashMap<String, Object> getLoanTransactionAuditFields(final Reques return Utils.performServerGet(requestSpec, responseSpec, GET_LOAN_TRANSACTION_URL, jsonReturn); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Long applyInterestRefundLoanTransaction(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Long loanId, final String jsonBody) { final String POST_LOAN_TRANSACTION_URL = "/fineract-provider/api/v1/internal/loan/" + loanId + "/apply-interest-refund/" + "?" @@ -1931,6 +2619,10 @@ public void evaluateLoanDisbursementDetails(GetLoansLoanIdResponse getLoansLoanI assertEquals(amountExpected, amount); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Long applyChargebackTransaction(final Integer loanId, final Long transactionId, final String amount, final Integer paymentTypeIdx, ResponseSpecification responseSpec) { List<GetPaymentTypesResponse> paymentTypeList = paymentTypeHelper.getAllPaymentTypes(false); @@ -1963,6 +2655,10 @@ public void evaluateLoanSummaryAdjustments(GetLoansLoanIdResponse getLoansLoanId } } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createChargebackPayload(final String transactionAmount, final Long paymentTypeId) { final HashMap<String, Object> map = new HashMap<>(); map.put("transactionAmount", transactionAmount); @@ -2112,6 +2808,10 @@ public PostLoansLoanIdTransactionsResponse undoChargeOffLoan(Long loanId, PostLo return ok(fineract().loanTransactions.executeLoanTransaction(loanId, request, "undo-charge-off")); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<Integer> getLoanIdsByStatusId(RequestSpecification requestSpec, ResponseSpecification responseSpec, Integer statusId) { final String GET_LOAN_URL = "/fineract-provider/api/v1/internal/loan/status/" + statusId + "?" + Utils.TENANT_IDENTIFIER; @@ -2140,6 +2840,10 @@ public List<AdvancedPaymentData> getAdvancedPaymentAllocationRules(final Integer return ok(fineract().legacy.getAdvancedPaymentAllocationRulesOfLoan(loanId.longValue())); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object disburseLoanWithTransactionAmountWithError(final String date, final Integer loanID, final String transactionAmount, final String jsonAttributeToGetBack) { return performLoanTransaction(createLoanOperationURL(DISBURSE_LOAN_COMMAND, loanID), @@ -2151,12 +2855,20 @@ public PostLoansLoanIdTransactionsResponse writeOffLoanAccount(final String loan return ok(fineract().loanTransactions.executeLoanTransaction1(loanExternalId, request, "writeoff")); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object addChargesForLoanWithError(final Integer loanId, final String request, final String jsonAttributeToGetBack) { log.info("--------------------------------- ADD CHARGES FOR LOAN --------------------------------"); final String ADD_CHARGES_URL = LOAN_ACCOUNT_URL + "/" + loanId + "/charges?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, ADD_CHARGES_URL, request, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object updateLoanProduct(final Long loanProductId, final String request) { final String UPDATE_LOAN_PRODUCT_URL = LOAN_PRODUCTS_URL + "/" + loanProductId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPut(requestSpec, responseSpec, UPDATE_LOAN_PRODUCT_URL, request, null); @@ -2174,6 +2886,10 @@ public PostLoansResponse calculateRepaymentScheduleForApplyLoan(PostLoansRequest return ok(fineract().loans.calculateLoanScheduleOrSubmitLoanApplication(request, command)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createLoanProduct(final String inMultiplesOf, final String digitsAfterDecimal, final String repaymentStrategy, final String accountingRule, final Account... accounts) { log.info("------------------------------CREATING NEW LOAN PRODUCT ---------------------------------------"); @@ -2185,6 +2901,10 @@ public Integer createLoanProduct(final String inMultiplesOf, final String digits return getLoanProductId(loanProductJSON); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer applyForLoanApplicationWithPaymentStrategyAndPastMonth(final Integer clientID, final Integer loanProductID, List<HashMap> charges, final String savingsId, String principal, final String repaymentStrategy, final String submittedOnDate, final String disbursementDate) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/CampaignsHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/CampaignsHelper.java index b18a43eb7ed..6e16ae923d6 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/CampaignsHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/CampaignsHelper.java @@ -45,11 +45,19 @@ public class CampaignsHelper { private static final String BUSINESS_RULE_OPTIONS = "businessRulesOptions"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public CampaignsHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createCampaign(String reportName, Integer triggerType) { log.info("---------------------------------CREATING A CAMPAIGN---------------------------------------------"); final String CREATE_SMS_CAMPAIGNS_URL = SMS_CAMPAIGNS_URL + "?" + Utils.TENANT_IDENTIFIER; @@ -57,6 +65,10 @@ public Integer createCampaign(String reportName, Integer triggerType) { "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyCampaignCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedCampaignId) { log.info("------------------------------CHECK CAMPAIGN DETAILS------------------------------------\n"); @@ -65,6 +77,10 @@ public void verifyCampaignCreatedOnServer(final RequestSpecification requestSpec assertEquals(generatedCampaignId, responseCampaignId, "ERROR IN CREATING THE CAMPAIGN"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer updateCampaign(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedCampaignId, String reportName, Integer triggerType) { log.info("------------------------------UPDATE CAMPAIGN DETAILS------------------------------------\n"); @@ -73,6 +89,10 @@ public Integer updateCampaign(final RequestSpecification requestSpec, final Resp "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer deleteCampaign(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedCampaignId) { log.info("------------------------------DELETE CAMPAIGN DETAILS------------------------------------\n"); @@ -80,6 +100,10 @@ public Integer deleteCampaign(final RequestSpecification requestSpec, final Resp return Utils.performServerDelete(requestSpec, responseSpec, DELETE_SMS_CAMPAIGNS_URL, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer performActionsOnCampaign(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedCampaignId, String command) { log.info("------------------------------PERFORM ACTION ON CAMPAIGN DETAILS------------------------------------\n"); @@ -90,6 +114,10 @@ public Integer performActionsOnCampaign(final RequestSpecification requestSpec, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object performActionsOnCampaignWithFailure(final Integer generatedCampaignId, String command, String actionDate, String responseJsonAttribute) { log.info("--------------------------PERFORM ACTION ON CAMPAIGN DETAILS WITH FAILURE-------------------------------\n"); @@ -99,6 +127,10 @@ public Object performActionsOnCampaignWithFailure(final Integer generatedCampaig getJSONForCampaignAction(command, actionDate), responseJsonAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getCreateCampaignJSON(String reportName, Integer triggerType) { final HashMap<String, Object> map = new HashMap<>(); final HashMap<String, Object> paramValueMap = new HashMap<>(); @@ -127,6 +159,10 @@ public String getCreateCampaignJSON(String reportName, Integer triggerType) { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getUpdateCampaignJSON(String reportName, Integer triggerType) { final HashMap<String, Object> map = new HashMap<>(); final HashMap<String, Object> paramValueMap = new HashMap<>(); @@ -153,6 +189,10 @@ public String getUpdateCampaignJSON(String reportName, Integer triggerType) { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getJSONForCampaignAction(String command, String actionDate) { final HashMap<String, Object> map = new HashMap<>(); String dateString = "close".equalsIgnoreCase(command) ? "closureDate" : "activationDate"; @@ -168,6 +208,10 @@ public List<ReportData> getReports() { return getReports(BUSINESS_RULE_OPTIONS); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private List<ReportData> getReports(String jsonAttributeToGetBack) { log.info("--------------------------------- GET REPORTS OPTIONS -------------------------------"); Assert.notNull(jsonAttributeToGetBack, "jsonAttributeToGetBack may not be null"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/CurrencyHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/CurrencyHelper.java index 12994666e79..056bc488f63 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/CurrencyHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/CurrencyHelper.java @@ -48,6 +48,10 @@ public class CurrencyHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public CurrencyHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; @@ -61,6 +65,10 @@ public ArrayList<Currency> getSelectedCurrencies() { return getCurrencies(CURRENCY_URL_SELECTED, PERMITTED_CURRENCY_ARRAY_SELECTED); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private ArrayList<Currency> getCurrencies(final String getUrl, final List<String> permittedCurrencyArrays) { LOG.info("--------------------------------- GET CURRENCY OPTIONS -------------------------------"); final String json = given().spec(requestSpec).expect().spec(responseSpec).log().ifError().when().get(getUrl).andReturn().asString(); @@ -78,6 +86,10 @@ private ArrayList<Currency> getCurrencies(final String getUrl, final List<String return currencyList; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<String> updateCurrencies(final List<String> currencies) { LOG.info("--------------------------------- UPDATE CURRENCY OPTIONS -------------------------------"); final String json = given().spec(requestSpec).body(getUpdateJSON(currencies)).expect().spec(responseSpec).log().ifError().when() @@ -89,6 +101,10 @@ public List<String> updateCurrencies(final List<String> currencies) { return responseMap.get("changes").get("currencies"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getUpdateJSON(final List<String> currencies) { final HashMap<String, List<String>> map = new HashMap<>(); map.put("currencies", currencies); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/EntityDatatableChecksHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/EntityDatatableChecksHelper.java index 79ae47a229c..4ed93398d06 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/EntityDatatableChecksHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/EntityDatatableChecksHelper.java @@ -38,17 +38,29 @@ public class EntityDatatableChecksHelper { private static final Gson GSON = new JSON().getGson(); + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public EntityDatatableChecksHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createEntityDatatableCheck(final String apptableName, final String datatableName, final int status, final Integer productId) { return Utils.performServerPost(this.requestSpec, this.responseSpec, DATATABLE_CHECK_URL + "?" + Utils.TENANT_IDENTIFIER, getTestEdcAsJSON(apptableName, datatableName, status, productId), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostEntityDatatableChecksTemplateResponse addEntityDatatableCheck(final String apptableName, final String datatableName, final int status, final Integer productId) { final String response = Utils.performServerPost(this.requestSpec, this.responseSpec, @@ -57,15 +69,27 @@ public PostEntityDatatableChecksTemplateResponse addEntityDatatableCheck(final S return GSON.fromJson(response, PostEntityDatatableChecksTemplateResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer deleteEntityDatatableCheck(final Integer entityDatatableCheckId) { return Utils.performServerDelete(requestSpec, responseSpec, DATATABLE_CHECK_URL + "/" + entityDatatableCheckId + "?" + Utils.TENANT_IDENTIFIER, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String retrieveEntityDatatableCheck() { return Utils.performServerGet(requestSpec, responseSpec, DATATABLE_CHECK_URL + "?" + Utils.TENANT_IDENTIFIER, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestEdcAsJSON(final String apptableName, final String datatableName, final int status, final Integer productId) { final HashMap<String, Object> map = new HashMap<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/StaffHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/StaffHelper.java index a992bba19e7..d52bf295e61 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/StaffHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/organisation/StaffHelper.java @@ -42,12 +42,20 @@ private StaffHelper() { public static final String GROUP_ID = "groupId"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer transferStaffToGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer groupId, final Integer staffToTransfer, final String note) { final String url = TRANSFER_STAFF_URL + "/" + groupId + "?command=transferStaff&" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, url, transferStaffToGroupAsJSON(staffToTransfer, note), GROUP_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String transferStaffToGroupAsJSON(final Integer staffToTransferId, final String note) { final HashMap<String, Object> map = new HashMap<>(); map.put("staffId", staffToTransferId); @@ -56,43 +64,75 @@ public static String transferStaffToGroupAsJSON(final Integer staffToTransferId, return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return (Integer) createStaffWithJson(requestSpec, responseSpec, createStaffAsJSON()).get("resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> createStaffMap(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return createStaffWithJson(requestSpec, responseSpec, createStaffAsJSON()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> createStaffWithJson(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String json) { final String url = CREATE_STAFF_URL + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, url, json, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> getStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer staffId) { final String url = CREATE_STAFF_URL + "/" + staffId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<Map<String, Object>> getStaffList(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String url = CREATE_STAFF_URL + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<Map<String, Object>> getStaffListWithState(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String status) { final String url = CREATE_STAFF_URL + "?" + Utils.TENANT_IDENTIFIER + "&status=" + status; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<Map<String, Object>> getStaffListWithLoanOfficerStatus(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String loanOfficerStatus) { final String url = CREATE_STAFF_URL + "?" + Utils.TENANT_IDENTIFIER + "&loanOfficersOnly=" + loanOfficerStatus; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> updateStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer staffId, final Map<String, Object> changes) { final String url = CREATE_STAFF_URL + "/" + staffId + "?" + Utils.TENANT_IDENTIFIER; @@ -100,6 +140,10 @@ public static Map<String, Object> updateStaff(final RequestSpecification request return Utils.performServerPut(requestSpec, responseSpec, url, json, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createStaffAsJSON() { final Map<String, Object> map = getMapWithJoiningDate(); @@ -113,6 +157,10 @@ public static String createStaffAsJSON() { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> getMapWithJoiningDate() { HashMap<String, Object> map = new HashMap<>(); @@ -123,6 +171,10 @@ public static Map<String, Object> getMapWithJoiningDate() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createStaffWithJSONFields(String... fields) { final Map<String, Object> map = getMapWithJoiningDate(); final List<String> fieldList = Arrays.asList(fields); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/products/DelinquencyBucketsHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/products/DelinquencyBucketsHelper.java index cb9a91df3d6..03937b2ea39 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/products/DelinquencyBucketsHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/products/DelinquencyBucketsHelper.java @@ -51,6 +51,10 @@ public class DelinquencyBucketsHelper { protected DelinquencyBucketsHelper() {} + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<GetDelinquencyBucketsResponse> getDelinquencyBuckets(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String response = Utils.performServerGet(requestSpec, responseSpec, DELINQUENCY_BUCKETS_URL + "?" + Utils.TENANT_IDENTIFIER); @@ -59,6 +63,10 @@ public static ArrayList<GetDelinquencyBucketsResponse> getDelinquencyBuckets(fin return GSON.fromJson(response, delinquencyBucketListType); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetDelinquencyBucketsResponse getDelinquencyBucket(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer resourceId) { String response = Utils.performServerGet(requestSpec, responseSpec, @@ -66,6 +74,10 @@ public static GetDelinquencyBucketsResponse getDelinquencyBucket(final RequestSp return GSON.fromJson(response, GetDelinquencyBucketsResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostDelinquencyBucketResponse createDelinquencyBucket(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String json) { log.info("JSON: {}", json); @@ -74,6 +86,10 @@ public static PostDelinquencyBucketResponse createDelinquencyBucket(final Reques return GSON.fromJson(response, PostDelinquencyBucketResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PutDelinquencyBucketResponse updateDelinquencyBucket(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer resourceId, final String json) { log.info("JSON: {}", json); @@ -82,6 +98,10 @@ public static PutDelinquencyBucketResponse updateDelinquencyBucket(final Request return GSON.fromJson(response, PutDelinquencyBucketResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static DeleteDelinquencyBucketResponse deleteDelinquencyBucket(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer resourceId) { final String response = Utils.performServerDelete(requestSpec, responseSpec, @@ -89,6 +109,10 @@ public static DeleteDelinquencyBucketResponse deleteDelinquencyBucket(final Requ return GSON.fromJson(response, DeleteDelinquencyBucketResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getAsJSON(final List<Integer> rangeIds) { final HashMap<String, Object> map = new HashMap<>(); map.put("name", Utils.uniqueRandomStringGenerator("Delinquency_Bucket_", 4)); @@ -96,6 +120,10 @@ public static String getAsJSON(final List<Integer> rangeIds) { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createDelinquencyBucket(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, List<Pair<Integer, Integer>> ranges) { List<Integer> rangeIds = ranges.stream().map(r -> createDelinquencyRange(requestSpec, responseSpec, r)).toList(); @@ -106,6 +134,10 @@ public static Integer createDelinquencyBucket(final RequestSpecification request return delinquencyBucketResponse.getResourceId(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createDelinquencyRange(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, Pair<Integer, Integer> range) { String jsonRange = DelinquencyRangesHelper.getAsJSON(range.getLeft(), range.getRight()); @@ -114,6 +146,10 @@ public static Integer createDelinquencyRange(final RequestSpecification requestS return delinquencyRangeResponse.getResourceId(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createDelinquencyBucket(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { ArrayList<Integer> rangeIds = new ArrayList<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/products/DelinquencyRangesHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/products/DelinquencyRangesHelper.java index 9f3f9e03847..c0224094267 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/products/DelinquencyRangesHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/products/DelinquencyRangesHelper.java @@ -43,6 +43,10 @@ public class DelinquencyRangesHelper { protected DelinquencyRangesHelper() {} + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<GetDelinquencyRangesResponse> getDelinquencyRanges(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String response = Utils.performServerGet(requestSpec, responseSpec, DELINQUENCY_RANGES_URL + "?" + Utils.TENANT_IDENTIFIER); @@ -51,6 +55,10 @@ public static ArrayList<GetDelinquencyRangesResponse> getDelinquencyRanges(final return GSON.fromJson(response, delinquencyRangeListType); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetDelinquencyRangesResponse getDelinquencyRange(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer resourceId) { String response = Utils.performServerGet(requestSpec, responseSpec, @@ -59,6 +67,10 @@ public static GetDelinquencyRangesResponse getDelinquencyRange(final RequestSpec return GSON.fromJson(response, GetDelinquencyRangesResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostDelinquencyRangeResponse createDelinquencyRange(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String json) { final String response = Utils.performServerPost(requestSpec, responseSpec, DELINQUENCY_RANGES_URL + "?" + Utils.TENANT_IDENTIFIER, @@ -67,6 +79,10 @@ public static PostDelinquencyRangeResponse createDelinquencyRange(final RequestS return GSON.fromJson(response, PostDelinquencyRangeResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PutDelinquencyRangeResponse updateDelinquencyRange(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer resourceId, final String json) { final String response = Utils.performServerPut(requestSpec, responseSpec, @@ -75,6 +91,10 @@ public static PutDelinquencyRangeResponse updateDelinquencyRange(final RequestSp return GSON.fromJson(response, PutDelinquencyRangeResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static DeleteDelinquencyRangeResponse deleteDelinquencyRange(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer resourceId) { final String response = Utils.performServerDelete(requestSpec, responseSpec, @@ -83,6 +103,10 @@ public static DeleteDelinquencyRangeResponse deleteDelinquencyRange(final Reques return GSON.fromJson(response, DeleteDelinquencyRangeResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getAsJSON(Integer minimumAgeDays, Integer maximumAgeDays) { final HashMap<String, Object> map = new HashMap<>(); map.put("classification", Utils.uniqueRandomStringGenerator("Delinquency__" + minimumAgeDays + "_" + maximumAgeDays + "__", 4)); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/provisioning/ProvisioningHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/provisioning/ProvisioningHelper.java index 30ddb19877f..8f9bfcf94cb 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/provisioning/ProvisioningHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/provisioning/ProvisioningHelper.java @@ -39,6 +39,10 @@ private ProvisioningHelper() { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) @SuppressFBWarnings(value = { "DMI_RANDOM_USED_ONLY_ONCE" }, justification = "False positive for random object created and used only once") public static Map createProvisioingCriteriaJson(ArrayList<Integer> loanProducts, ArrayList categories, Account liability, @@ -55,6 +59,10 @@ public static Map createProvisioingCriteriaJson(ArrayList<Integer> loanProducts, return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createProvisioningEntryJson() { final HashMap<String, Object> map = new HashMap<>(); map.put("createjournalentries", Boolean.FALSE); @@ -66,6 +74,10 @@ public static String createProvisioningEntryJson() { return provisioningEntryCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createProvisioningEntryJsonWithJournalsEnabled() { final HashMap<String, Object> map = new HashMap<>(); map.put("createjournalentries", Boolean.TRUE); @@ -77,6 +89,10 @@ public static String createProvisioningEntryJsonWithJournalsEnabled() { return provisioningEntryCreateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList<HashMap<String, Integer>> addLoanProducts(ArrayList<Integer> loanProducts) { ArrayList<HashMap<String, Integer>> list = new ArrayList<>(); for (int i = 0; i < loanProducts.size(); i++) { @@ -87,6 +103,10 @@ private static ArrayList<HashMap<String, Integer>> addLoanProducts(ArrayList<Int return list; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<HashMap<String, Object>> addProvisioningCategories(ArrayList categories, Account liability, Account expense) { ArrayList<HashMap<String, Object>> list = new ArrayList<>(); int minStart = 0; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/provisioning/ProvisioningTransactionHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/provisioning/ProvisioningTransactionHelper.java index 1b02bc90c2e..b1d00faaacc 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/provisioning/ProvisioningTransactionHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/provisioning/ProvisioningTransactionHelper.java @@ -35,55 +35,99 @@ public class ProvisioningTransactionHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ProvisioningTransactionHelper(RequestSpecification requestSpec, ResponseSpecification responeSpec) { this.requestSpec = requestSpec; this.responseSpec = responeSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList retrieveAllProvisioningCategories() { return Utils.performServerGet(requestSpec, responseSpec, PROVISIONING_CATEGORY_URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createProvisioningCriteria(final String provsioningCriteriaJson) { return Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_PROVISIONING_CRITERIA_URL, provsioningCriteriaJson, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Map retrieveProvisioningCriteria(final Integer criteriaId) { String url = "/fineract-provider/api/v1/provisioningcriteria/" + criteriaId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer updateProvisioningCriteria(final Integer criteriaId, final String provsioningCriteriaJson) { String url = "/fineract-provider/api/v1/provisioningcriteria/" + criteriaId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPut(this.requestSpec, this.responseSpec, url, provsioningCriteriaJson, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer deleteProvisioningCriteria(final Integer criteriaId) { String url = "/fineract-provider/api/v1/provisioningcriteria/" + criteriaId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerDelete(this.requestSpec, this.responseSpec, url, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createProvisioningEntries(final String provsioningCriteriaJson) { return Utils.performServerPost(this.requestSpec, this.responseSpec, CREATE_PROVISIONING_ENTRY_URL, provsioningCriteriaJson, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer updateProvisioningEntry(final String command, final Integer entryId, String jsonBody) { String url = "/fineract-provider/api/v1/provisioningentries/" + entryId + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, url, jsonBody, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Map retrieveProvisioningEntry(final Integer provisioningEntry) { String url = "/fineract-provider/api/v1/provisioningentries/" + provisioningEntry + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Map retrieveProvisioningEntries(final Integer provisioningEntry) { String url = "/fineract-provider/api/v1/provisioningentries/entries?entryId=" + provisioningEntry + "&" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Map retrieveAllProvisioningEntries() { String url = "/fineract-provider/api/v1/provisioningentries?dateFormat=dd MMMM yyyy" + "&" + "locale=en" + "&" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/rates/RatesHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/rates/RatesHelper.java index 866ae3d99e1..cd66a5858be 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/rates/RatesHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/rates/RatesHelper.java @@ -39,30 +39,54 @@ private RatesHelper() { private static final Integer PRODUCT_APPLY_LOAN = 1; private static final Boolean ACTIVE = true; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<HashMap> getRates(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return (ArrayList) Utils.performServerGet(requestSpec, responseSpec, RATES_URL + "?" + Utils.TENANT_IDENTIFIER, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createRates(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String request) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_RATES_URL, request, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap getRateById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer rateId) { return Utils.performServerGet(requestSpec, responseSpec, RATES_URL + "/" + rateId + "?" + Utils.TENANT_IDENTIFIER, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap updateRates(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer rateId, final String request) { return Utils.performServerPut(requestSpec, responseSpec, RATES_URL + "/" + rateId + "?" + Utils.TENANT_IDENTIFIER, request, CommonConstants.RESPONSE_CHANGES); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanRateJSON() { return getLoanRateJSON(RatesHelper.PRODUCT_APPLY_LOAN, RatesHelper.PERCENTAGE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getLoanRateJSON(final Integer productApply, final String percentage) { final HashMap<String, Object> map = populateDefaultsForLoan(); map.put("percentage", percentage); @@ -71,6 +95,10 @@ public static String getLoanRateJSON(final Integer productApply, final String pe return crateRateJSON; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> populateDefaultsForLoan() { final HashMap<String, Object> map = new HashMap<>(); map.put("active", RatesHelper.ACTIVE); @@ -81,6 +109,10 @@ public static HashMap<String, Object> populateDefaultsForLoan() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getModifyRateJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("percentage", "15.0"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/recurringdeposit/RecurringDepositAccountHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/recurringdeposit/RecurringDepositAccountHelper.java index ed2bd25b9d9..074bfea8d22 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/recurringdeposit/RecurringDepositAccountHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/recurringdeposit/RecurringDepositAccountHelper.java @@ -39,6 +39,10 @@ public class RecurringDepositAccountHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public RecurringDepositAccountHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; @@ -108,6 +112,10 @@ public RecurringDepositAccountHelper(final RequestSpecification requestSpec, fin private String expectedFirstDepositOnDate = ""; private boolean isCalendarInherited = false; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String build(final String clientId, final String productId, final String penalInterestType) { final HashMap<String, Object> map = new HashMap<>(); @@ -147,6 +155,10 @@ public String build(final String clientId, final String productId, final String return recurringDepositAccountJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer applyRecurringDepositApplication(final String recurringDepositAccountAsJson, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("--------------------- APPLYING FOR RECURRING DEPOSIT ACCOUNT ------------------------"); @@ -154,6 +166,10 @@ public static Integer applyRecurringDepositApplication(final String recurringDep CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap getRecurringDepositAccountById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer accountID) { final String GET_RECURRING_DEPOSIT_BY_ID_URL = RECURRING_DEPOSIT_ACCOUNT_URL + "/" + accountID + "?" + Utils.TENANT_IDENTIFIER; @@ -161,12 +177,20 @@ public static HashMap getRecurringDepositAccountById(final RequestSpecification return Utils.performServerGet(requestSpec, responseSpec, GET_RECURRING_DEPOSIT_BY_ID_URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getRecurringDepositSummary(final Integer accountID) { final String URL = RECURRING_DEPOSIT_ACCOUNT_URL + "/" + accountID + "?" + Utils.TENANT_IDENTIFIER; final HashMap response = Utils.performServerGet(requestSpec, responseSpec, URL, "summary"); return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Float getInterestRate(ArrayList<ArrayList<HashMap>> interestSlabData, Integer depositPeriod) { Float annualInterestRate = 0.0f; @@ -214,6 +238,10 @@ public static Float getPrincipalAfterCompoundingInterest(Calendar currentDate, F return principal; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap updateRecurringDepositAccount(final String clientID, final String productID, final String accountID, final String validFrom, final String validTo, final String penalInterestType, final String submittedOnDate) { @@ -232,6 +260,10 @@ public HashMap updateRecurringDepositAccount(final String clientID, final String CommonConstants.RESPONSE_CHANGES); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap updateInterestCalculationConfigForRecurringDeposit(final String clientID, final String productID, final String accountID, final String submittedOnDate, final String validFrom, final String validTo, final String numberOfDaysPerYear, final String penalInterestType, final String interestCalculationType, final String interestCompoundingPeriodType, @@ -251,6 +283,10 @@ public HashMap updateInterestCalculationConfigForRecurringDeposit(final String c CommonConstants.RESPONSE_CHANGES); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer updateTransactionForRecurringDeposit(final Integer accountID, final Integer transactionId, final String transactionDate, final Float transactionAmount) { LOG.info("--------------------------------- UPDATE RECURRING DEPOSIT TRANSACTION ------------------------------------"); @@ -260,6 +296,10 @@ public Integer updateTransactionForRecurringDeposit(final Integer accountID, fin getUpdateTransactionAsJSON(transactionDate, transactionAmount), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer undoTransactionForRecurringDeposit(final Integer accountID, final Integer transactionId, final String transactionDate, final Float transactionAmount) { LOG.info("--------------------------------- UNDO RECURRING DEPOSIT TRANSACTION ------------------------------------"); @@ -268,6 +308,10 @@ public Integer undoTransactionForRecurringDeposit(final Integer accountID, final getUpdateTransactionAsJSON(transactionDate, transactionAmount), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap approveRecurringDeposit(final Integer recurringDepositAccountID, final String approvedOnDate) { LOG.info("--------------------------------- APPROVING RECURRING DEPOSIT APPLICATION ------------------------------------"); return performRecurringDepositApplicationActions( @@ -275,6 +319,10 @@ public HashMap approveRecurringDeposit(final Integer recurringDepositAccountID, getApproveRecurringDepositAccountAsJSON(approvedOnDate)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap undoApproval(final Integer recurringDepositAccountID) { LOG.info("--------------------------------- UNDO APPROVING RECURRING DEPOSIT APPLICATION -------------------------------"); final String undoBodyJson = "{'note':'UNDO APPROVAL'}"; @@ -282,6 +330,10 @@ public HashMap undoApproval(final Integer recurringDepositAccountID) { createRecurringDepositOperationURL(UNDO_APPROVAL_RECURRING_DEPOSIT_COMMAND, recurringDepositAccountID), undoBodyJson); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap rejectApplication(final Integer recurringDepositAccountID, final String rejectedOnDate) { LOG.info("--------------------------------- REJECT RECURRING DEPOSIT APPLICATION -------------------------------"); return performRecurringDepositApplicationActions( @@ -289,6 +341,10 @@ public HashMap rejectApplication(final Integer recurringDepositAccountID, final getRejectedRecurringDepositAsJSON(rejectedOnDate)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap withdrawApplication(final Integer recurringDepositAccountID, final String withdrawApplicationOnDate) { LOG.info("--------------------------------- WITHDRAW RECURRING DEPOSIT APPLICATION -------------------------------"); return performRecurringDepositApplicationActions( @@ -296,6 +352,10 @@ public HashMap withdrawApplication(final Integer recurringDepositAccountID, fina getWithdrawnRecurringDepositAccountAsJSON(withdrawApplicationOnDate)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap activateRecurringDeposit(final Integer recurringDepositAccountID, final String activationDate) { LOG.info("---------------------------------- ACTIVATING RECURRING DEPOSIT APPLICATION ----------------------------------"); return performRecurringDepositApplicationActions( @@ -303,6 +363,10 @@ public HashMap activateRecurringDeposit(final Integer recurringDepositAccountID, getActivatedRecurringDepositAccountAsJSON(activationDate)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object deleteRecurringDepositApplication(final Integer recurringDepositAccountID, final String jsonAttributeToGetBack) { LOG.info("---------------------------------- DELETE RECURRING DEPOSIT APPLICATION ----------------------------------"); return Utils.performServerDelete(this.requestSpec, this.responseSpec, @@ -310,6 +374,10 @@ public Object deleteRecurringDepositApplication(final Integer recurringDepositAc } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer calculateInterestForRecurringDeposit(final Integer recurringDepositAccountId) { LOG.info("--------------------------------- CALCULATING INTEREST FOR RECURRING DEPOSIT --------------------------------"); return (Integer) performRecurringDepositActions( @@ -317,6 +385,10 @@ public Integer calculateInterestForRecurringDeposit(final Integer recurringDepos getCalculatedInterestForRecurringDepositApplicationAsJSON(), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer postInterestForRecurringDeposit(final Integer recurringDepositAccountId) { LOG.info("--------------------------------- POST INTEREST FOR RECURRING DEPOSIT --------------------------------"); return (Integer) performRecurringDepositActions( @@ -324,6 +396,10 @@ public Integer postInterestForRecurringDeposit(final Integer recurringDepositAcc getCalculatedInterestForRecurringDepositApplicationAsJSON(), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer depositToRecurringDepositAccount(final Integer recurringDepositAccountId, final Float depositAmount, final String depositedOnDate) { LOG.info("--------------------------------- DEPOSIT TO RECURRING DEPOSIT ACCOUNT --------------------------------"); @@ -332,6 +408,10 @@ public Integer depositToRecurringDepositAccount(final Integer recurringDepositAc getDepositToRecurringDepositAccountAsJSON(depositAmount, depositedOnDate), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap calculatePrematureAmountForRecurringDeposit(final Integer recurringDepositAccountId, final String closedOnDate) { LOG.info("--------------------- CALCULATING PREMATURE AMOUNT FOR RECURRING DEPOSIT ----------------------------"); return (HashMap) performRecurringDepositActions( @@ -339,6 +419,10 @@ public HashMap calculatePrematureAmountForRecurringDeposit(final Integer recurri getCalculatedPrematureAmountForRecurringDepositAccountAsJSON(closedOnDate), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object prematureCloseForRecurringDeposit(final Integer recurringDepositAccountId, final String closedOnDate, final String closureType, final Integer toSavingsId, final String jsonAttributeToGetBack) { LOG.info("--------------------- PREMATURE CLOSE FOR RECURRING DEPOSIT ----------------------------"); @@ -347,6 +431,10 @@ public Object prematureCloseForRecurringDeposit(final Integer recurringDepositAc getPrematureCloseForRecurringDepositAccountAsJSON(closedOnDate, closureType, toSavingsId), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getApproveRecurringDepositAccountAsJSON(final String approvedOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -358,6 +446,10 @@ private String getApproveRecurringDepositAccountAsJSON(final String approvedOnDa return recurringDepositAccountApproveJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getUpdateTransactionAsJSON(final String transactionDate, final Float transactionAmount) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -369,6 +461,10 @@ private String getUpdateTransactionAsJSON(final String transactionDate, final Fl return updateTransactionJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getRejectedRecurringDepositAsJSON(final String rejectedOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -380,6 +476,10 @@ private String getRejectedRecurringDepositAsJSON(final String rejectedOnDate) { return recurringDepositAccountJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getWithdrawnRecurringDepositAccountAsJSON(final String withdrawnApplicationOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -391,6 +491,10 @@ private String getWithdrawnRecurringDepositAccountAsJSON(final String withdrawnA return recurringDepositAccountJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getActivatedRecurringDepositAccountAsJSON(final String activationDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -401,6 +505,10 @@ private String getActivatedRecurringDepositAccountAsJSON(final String activation return recurringDepositAccountActivateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getCalculatedInterestForRecurringDepositApplicationAsJSON() { final HashMap<String, String> map = new HashMap<>(); String recurringDepositAccountCalculatedInterestJson = new Gson().toJson(map); @@ -408,6 +516,10 @@ private String getCalculatedInterestForRecurringDepositApplicationAsJSON() { return recurringDepositAccountCalculatedInterestJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getCalculatedPrematureAmountForRecurringDepositAccountAsJSON(final String closedOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -418,6 +530,10 @@ private String getCalculatedPrematureAmountForRecurringDepositAccountAsJSON(fina return recurringDepositAccountPrematureClosureJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getDepositToRecurringDepositAccountAsJSON(final Float depositAmount, final String depositedOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -429,6 +545,10 @@ private String getDepositToRecurringDepositAccountAsJSON(final Float depositAmou return recurringDepositAccountPrematureClosureJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getPrematureCloseForRecurringDepositAccountAsJSON(final String closedOnDate, final String closureType, final Integer toSavingsId) { final HashMap<String, Object> map = new HashMap<>(); @@ -445,16 +565,28 @@ private String getPrematureCloseForRecurringDepositAccountAsJSON(final String cl return recurringDepositAccountPrematureCloseJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createRecurringDepositOperationURL(final String command, final Integer recurringDepositAccountID) { return RECURRING_DEPOSIT_ACCOUNT_URL + "/" + recurringDepositAccountID + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Object performRecurringDepositActions(final String postURLForRecurringDeposit, final String jsonToBeSent, final String jsonAttributeToGetBack) { return Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForRecurringDeposit, jsonToBeSent, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private HashMap performRecurringDepositApplicationActions(final String postURLForRecurringDepositAction, final String jsonToBeSent) { HashMap status = null; final HashMap response = Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForRecurringDepositAction, @@ -465,10 +597,18 @@ private HashMap performRecurringDepositApplicationActions(final String postURLFo return status; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createRecurringDepositCalculateInterestURL(final String command, final Integer recurringDepositAccountID) { return RECURRING_DEPOSIT_ACCOUNT_URL + "/" + recurringDepositAccountID + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createDepositToRecurringDepositURL(final String command, final Integer recurringDepositAccountID) { return RECURRING_DEPOSIT_ACCOUNT_URL + "/" + recurringDepositAccountID + "/transactions" + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/recurringdeposit/RecurringDepositProductHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/recurringdeposit/RecurringDepositProductHelper.java index 73fab66e0d5..456fbc1860a 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/recurringdeposit/RecurringDepositProductHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/recurringdeposit/RecurringDepositProductHelper.java @@ -40,6 +40,10 @@ public class RecurringDepositProductHelper { private final ResponseSpecification responseSpec; private static final Gson GSON = new JSON().getGson(); + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public RecurringDepositProductHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; @@ -104,6 +108,10 @@ public RecurringDepositProductHelper(final RequestSpecification requestSpec, fin private Boolean withHoldTax = false; private String taxGroupId = null; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String build(final String validFrom, final String validTo) { final HashMap<String, Object> map = new HashMap<>(); @@ -202,6 +210,10 @@ public RecurringDepositProductHelper withWithHoldTax(final String taxGroupId) { return this; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Map<String, String> getAccountMappingForCashBased() { final Map<String, String> map = new HashMap<>(); if (accountList != null) { @@ -229,6 +241,10 @@ private Map<String, String> getAccountMappingForCashBased() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createRecurringDepositProduct(final String recurrungDepositProductCreateJson, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("------------------ CREATING RECURRING DEPOSIT PRODUCT--------------------"); @@ -236,6 +252,10 @@ public static Integer createRecurringDepositProduct(final String recurrungDeposi "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList retrieveAllRecurringDepositProducts(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { LOG.info("----------------- RETRIEVING ALL RECURRING DEPOSIT PRODUCTS---------------------------"); @@ -244,6 +264,10 @@ public static ArrayList retrieveAllRecurringDepositProducts(final RequestSpecifi return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetRecurringDepositProductsProductIdResponse getRecurringDepositProductById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer productId) { LOG.info("-------------------- RETRIEVING RECURRING DEPOSIT PRODUCT BY ID --------------------------"); @@ -252,6 +276,10 @@ public static GetRecurringDepositProductsProductIdResponse getRecurringDepositPr return GSON.fromJson(response, GetRecurringDepositProductsProductIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap retrieveRecurringDepositProductById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String productId) { LOG.info("-------------------- RETRIEVING RECURRING DEPOSIT PRODUCT BY ID --------------------------"); @@ -260,6 +288,10 @@ public static HashMap retrieveRecurringDepositProductById(final RequestSpecifica return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList getInterestRateChartSlabsByProductId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer productId) { LOG.info("-------------------- RETRIEVE INTEREST CHART BY PRODUCT ID ---------------------"); @@ -268,6 +300,10 @@ public static ArrayList getInterestRateChartSlabsByProductId(final RequestSpecif return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap<String, String>> constructChartSlabWithPeriodRange() { List<HashMap<String, String>> chartSlabs = new ArrayList<HashMap<String, String>>(); HashMap<String, String> chartSlabsMap1 = new HashMap<>(); @@ -307,6 +343,10 @@ public List<HashMap<String, String>> constructChartSlabWithPeriodRange() { return chartSlabs; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap<String, String>> constructChartSlabWithPeriodAndAmountRange() { List<HashMap<String, String>> chartSlabs = new ArrayList<HashMap<String, String>>(); HashMap<String, String> chartSlabsMap1 = new HashMap<>(); @@ -394,6 +434,10 @@ public List<HashMap<String, String>> constructChartSlabWithPeriodAndAmountRange( return chartSlabs; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap<String, String>> constructChartSlabWithAmountAndPeriodRange() { this.isPrimaryGroupingByAmount = true; List<HashMap<String, String>> chartSlabs = new ArrayList<HashMap<String, String>>(); @@ -440,6 +484,10 @@ public List<HashMap<String, String>> constructChartSlabWithAmountAndPeriodRange( return chartSlabs; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap<String, String>> constructChartSlabWithAmountRange() { this.isPrimaryGroupingByAmount = true; List<HashMap<String, String>> chartSlabs = new ArrayList<HashMap<String, String>>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/AccountTransferHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/AccountTransferHelper.java index 752ce199acd..1ca77933075 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/AccountTransferHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/AccountTransferHelper.java @@ -45,11 +45,19 @@ public class AccountTransferHelper { private RequestSpecification requestSpec; private ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public AccountTransferHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String build(final String fromAccountId, final String fromClientId, final String toAccountId, final String toClientId, final String fromAccountType, final String toAccountType, final String transferAmount) { @@ -77,6 +85,10 @@ public AccountTransferHelper withTransferOnDate(final String savingsAccountTrans return this; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer accountTransfer(final Integer fromClientId, final Integer fromAccountId, final Integer toClientId, final Integer toAccountId, final String fromAccountType, final String toAccountType, final String transferAmount) { LOG.info("--------------------------------ACCOUNT TRANSFER--------------------------------"); @@ -88,6 +100,10 @@ public Integer accountTransfer(final Integer fromClientId, final Integer fromAcc accountTransferJSON, "savingsId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object nonExistentAccountTransfer(final Integer fromClientId, final Integer fromAccountId, final Integer toClientId, final Integer toAccountId, final String fromAccountType, final String toAccountType, final String transferAmount) { LOG.info("--------------------------------ACCOUNT TRANSFER--------------------------------"); @@ -101,6 +117,10 @@ public Object nonExistentAccountTransfer(final Integer fromClientId, final Integ accountTransferJSON, "savingsId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object insufficientBalanceAccountTransfer(final Integer fromClientId, final Integer fromAccountId, final Integer toClientId, final Integer toAccountId, final String fromAccountType, final String toAccountType, final String transferAmount) { LOG.info("--------------------------------ACCOUNT TRANSFER--------------------------------"); @@ -114,6 +134,10 @@ public Object insufficientBalanceAccountTransfer(final Integer fromClientId, fin accountTransferJSON, "savingsId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object invalidAccountTransfer(final Integer fromClientId, final Integer fromAccountId, final Integer toClientId, final Integer toAccountId, final String fromAccountType, final String toAccountType, final String transferAmount) { LOG.info("--------------------------------ACCOUNT TRANSFER--------------------------------"); @@ -127,6 +151,10 @@ public Object invalidAccountTransfer(final Integer fromClientId, final Integer f accountTransferJSON, "savingsId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object accountTransferWithInvalidDate(final Integer fromClientId, final Integer fromAccountId, final Integer toClientId, final Integer toAccountId, final String fromAccountType, final String toAccountType, final String transferAmount) { LOG.info("--------------------------------ACCOUNT TRANSFER--------------------------------"); @@ -138,6 +166,10 @@ public Object accountTransferWithInvalidDate(final Integer fromClientId, final I accountTransferJSON, "savingsId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer refundLoanByTransfer(final String date, final Integer fromClientId, final Integer fromAccountId, final Integer toClientId, final Integer toAccountId, final String fromAccountType, final String toAccountType, final String transferAmount) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/SavingsAccountHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/SavingsAccountHelper.java index 049ebd61e5c..0e4877636f2 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/SavingsAccountHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/SavingsAccountHelper.java @@ -105,6 +105,10 @@ public class SavingsAccountHelper extends IntegrationTest { public static final String DATE_TIME_FORMAT = "dd MMMM yyyy HH:mm"; private static final Boolean IS_BLOCK = false; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public SavingsAccountHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; @@ -125,21 +129,37 @@ public static String getFutureDate() { return sdf.format(calendar.getTime()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer applyForSavingsApplication(final Integer clientOrGroupId, final Integer savingsProductID, final String accountType) { return applyForSavingsApplicationOnDate(clientOrGroupId, savingsProductID, accountType, CREATED_DATE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer applyForSavingsApplicationOnDate(final Integer clientOrGroupId, final Integer savingsProductID, final String accountType, final String submittedOnDate) { return applyForSavingsApplicationOnDate(clientOrGroupId, savingsProductID, accountType, null, false, submittedOnDate); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer applyForSavingsApplicationWithExternalId(final Integer clientOrGroupId, final Integer savingsProductID, final String accountType, String externalId, boolean withdrawalFeeForTransfers) { return applyForSavingsApplicationOnDate(clientOrGroupId, savingsProductID, accountType, externalId, withdrawalFeeForTransfers, CREATED_DATE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer applyForSavingsApplicationOnDate(final Integer clientOrGroupId, final Integer savingsProductID, final String accountType, String externalId, boolean withdrawalFeeForTransfers, final String submittedOnDate) { final String savingsApplicationJSON = new SavingsApplicationTestBuilder() // @@ -150,12 +170,20 @@ public Integer applyForSavingsApplicationOnDate(final Integer clientOrGroupId, f return applyForSavingsApplicationOnDate(savingsApplicationJSON); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer applyForSavingsApplicationOnDate(String savingsApplicationJson) { LOG.info("--------------------------------APPLYING FOR SAVINGS APPLICATION--------------------------------"); return Utils.performServerPost(this.requestSpec, this.responseSpec, SAVINGS_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER, savingsApplicationJson, "savingsId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer applyForSavingsApplicationWithDatatables(final Integer id, final Integer savingsProductID, final String accountType, final String submittedOnDate, final String datatableName) { LOG.info("----------------------------APPLYING FOR SAVINGS APPLICATION WITH DATATABLES----------------------------"); @@ -167,6 +195,10 @@ public Integer applyForSavingsApplicationWithDatatables(final Integer id, final savingsApplicationJSON, "savingsId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object applyForSavingsApplicationWithFailure(final Integer id, final Integer savingsProductID, final String accountType, final String submittedOnDate, final String responseAttribute) { LOG.info("----------------------------APPLYING FOR SAVINGS APPLICATION WITH ERROR----------------------------"); @@ -177,6 +209,10 @@ public Object applyForSavingsApplicationWithFailure(final Integer id, final Inte savingsApplicationJSON, responseAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createApproveActivateSavingsAccount(final Integer clientId, Integer savingsProductId, final String startDate) { final Integer savingsId = applyForSavingsApplicationOnDate(clientId, savingsProductId, ACCOUNT_TYPE_INDIVIDUAL, startDate); assertNotNull(savingsId); @@ -187,6 +223,10 @@ public Integer createApproveActivateSavingsAccount(final Integer clientId, Integ return savingsId; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap updateSavingsAccount(final Integer id, final Integer savingsProductID, final Integer savingsId, final String accountType) { final String savingsApplicationJSON = new SavingsApplicationTestBuilder() // @@ -199,6 +239,10 @@ public HashMap updateSavingsAccount(final Integer id, final Integer savingsProdu } // GLIM_GSIM_TESTING + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer applyForGsimApplication(List<Map<String, Object>> clientArray) { LOG.info("----------------------------APPLYING FOR GSIM SAVINGS APPLICATION----------------------------"); LOG.info("clientArray is : {} ", clientArray); @@ -207,12 +251,20 @@ public Integer applyForGsimApplication(List<Map<String, Object>> clientArray) { return SavingsAccountHelper.applyForGsimApplication(clientArrays, requestSpec, responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer applyForGsimApplication(final String clientArrays, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return Utils.performServerPost(requestSpec, responseSpec, SAVINGS_ACCOUNT_URL + GSIM_SAVINGS + "?" + Utils.TENANT_IDENTIFIER, clientArrays, "gsimId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap updateSavingsAccountWithHoldTaxStatus(final Integer savingsId, final boolean value) { final HashMap<String, Object> map = new HashMap<>(); map.put("withHoldTax", value); @@ -223,10 +275,18 @@ public HashMap updateSavingsAccountWithHoldTaxStatus(final Integer savingsId, fi CommonConstants.RESPONSE_CHANGES); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap approveSavings(final Integer savingsID) { return approveSavingsOnDate(savingsID, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap approveSavingsOnDate(final Integer savingsID, final String approvalDate) { LOG.info("--------------------------------- APPROVING SAVINGS APPLICATION ------------------------------------"); final String savingsOperationURL = createSavingsOperationURL(APPROVE_SAVINGS_COMMAND, savingsID); @@ -236,54 +296,90 @@ public HashMap approveSavingsOnDate(final Integer savingsID, final String approv return performSavingApplicationActions(savingsOperationURL, getApproveSavingsAsJsonOnDate(approvalDate), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap undoApproval(final Integer savingsID) { LOG.info("--------------------------------- UNDO APPROVING SAVINGS APPLICATION -------------------------------"); final String undoBodyJson = "{'note':'UNDO APPROVAL'}"; return performSavingApplicationActions(createSavingsOperationURL(UNDO_APPROVAL_SAVINGS_COMMAND, savingsID), undoBodyJson, IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap rejectApplication(final Integer savingsID) { LOG.info("--------------------------------- REJECT SAVINGS APPLICATION -------------------------------"); return performSavingApplicationActions(createSavingsOperationURL(REJECT_SAVINGS_COMMAND, savingsID), getRejectedSavingsAsJSON(CREATED_DATE_PLUS_ONE), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List rejectApplicationWithErrorCode(final Integer savingsId, final String date) { LOG.info("--------------------------------- REJECT SAVINGS APPLICATION -------------------------------"); return (List) performSavingActions(createSavingsOperationURL(REJECT_SAVINGS_COMMAND, savingsId), getRejectedSavingsAsJSON(date), CommonConstants.RESPONSE_ERROR); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap withdrawApplication(final Integer savingsID) { LOG.info("--------------------------------- Withdraw SAVINGS APPLICATION -------------------------------"); return performSavingApplicationActions(createSavingsOperationURL(WITHDRAWN_BY_CLIENT_SAVINGS_COMMAND, savingsID), getWithdrawnSavingsAsJSON(), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap activateSavings(final Integer savingsID) { LOG.info("---------------------------------- ACTIVATING SAVINGS APPLICATION ----------------------------------"); return performSavingApplicationActions(createSavingsOperationURL(ACTIVATE_SAVINGS_COMMAND, savingsID), getActivatedSavingsAsJSON(), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap activateSavings(final Integer savingsID, final String activationDate) { LOG.info("---------------------------------- ACTIVATING SAVINGS APPLICATION ----------------------------------"); return performSavingApplicationActions(createSavingsOperationURL(ACTIVATE_SAVINGS_COMMAND, savingsID), getActivatedSavingsAsJSONOnDate(activationDate), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap closeSavingsAccount(final Integer savingsID, String withdrawBalance) { LOG.info("---------------------------------- CLOSE SAVINGS APPLICATION ----------------------------------"); return performSavingApplicationActions(createSavingsOperationURL(CLOSE_SAVINGS_COMMAND, savingsID), getCloseAccountJSON(withdrawBalance, LAST_TRANSACTION_DATE), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap closeSavingsAccountOnDate(final Integer savingsID, String withdrawBalance, final String closedOnDate) { LOG.info("---------------------------------- CLOSE SAVINGS APPLICATION ----------------------------------"); return performSavingApplicationActions(createSavingsOperationURL(CLOSE_SAVINGS_COMMAND, savingsID), getCloseAccountJSON(withdrawBalance, closedOnDate), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object deleteSavingsApplication(final Integer savingsId, final String jsonAttributeToGetBack) { LOG.info("---------------------------------- DELETE SAVINGS APPLICATION ----------------------------------"); return Utils.performServerDelete(this.requestSpec, this.responseSpec, @@ -291,21 +387,37 @@ public Object deleteSavingsApplication(final Integer savingsId, final String jso } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object depositToSavingsAccount(final Integer savingsID, final String amount, String date, String jsonAttributeToGetback) { LOG.info("--------------------------------- SAVINGS TRANSACTION DEPOSIT --------------------------------"); return depositToSavingsAccount(savingsID, getSavingsTransactionJSON(amount, date), jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object depositToSavingsAccount(final Integer savingsID, final String jsonBody, String jsonAttributeToGetback) { LOG.info("--------------------------------- SAVINGS TRANSACTION DEPOSIT --------------------------------"); return performSavingActions(createSavingsTransactionURL(DEPOSIT_SAVINGS_COMMAND, savingsID), jsonBody, jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object withdrawalFromSavingsAccount(final Integer savingsId, final String amount, String date, String jsonAttributeToGetback) { LOG.info("\n--------------------------------- SAVINGS TRANSACTION WITHDRAWAL --------------------------------"); return withdrawalFromSavingsAccount(savingsId, getSavingsTransactionJSON(amount, date), jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object withdrawalFromSavingsAccountWithPaymentType(final Integer savingsId, final String amount, String date, Long paymentTypeId, String jsonAttributeToGetback) { LOG.info("\n--------------------------------- SAVINGS TRANSACTION WITHDRAWAL WITH PAYMENT TYPE--------------------------------"); @@ -313,11 +425,19 @@ public Object withdrawalFromSavingsAccountWithPaymentType(final Integer savingsI jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object withdrawalFromSavingsAccount(final Integer savingsId, final String jsonBody, String jsonAttributeToGetback) { LOG.info("\n--------------------------------- SAVINGS TRANSACTION WITHDRAWAL --------------------------------"); return performSavingActions(createSavingsTransactionURL(WITHDRAW_SAVINGS_COMMAND, savingsId), jsonBody, jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object payChargeToSavingsAccount(final Integer savingsID, final Integer chargeId, final String amount, String date, String jsonAttributeToGetback) { LOG.info("--------------------------------- PAY SAVINGS CHARGE --------------------------------"); @@ -325,63 +445,107 @@ public Object payChargeToSavingsAccount(final Integer savingsID, final Integer c jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer updateSavingsAccountTransaction(final Integer savingsId, final Integer transactionId, final String amount) { LOG.info("\n--------------------------------- MODIFY SAVINGS TRANSACTION --------------------------------"); return (Integer) performSavingActions(createAdjustTransactionURL(MODIFY_TRASACTION_COMMAND, savingsId, transactionId), getSavingsTransactionJSON(amount, LAST_TRANSACTION_DATE), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer undoSavingsAccountTransaction(final Integer savingsId, final Integer transactionId) { LOG.info("\n--------------------------------- UNDO SAVINGS TRANSACTION --------------------------------"); return (Integer) performSavingActions(createAdjustTransactionURL(UNDO_TRASACTION_COMMAND, savingsId, transactionId), getSavingsTransactionJSON("0", LAST_TRANSACTION_DATE), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer reverseSavingsAccountTransaction(final Integer savingsId, final Integer transactionId) { LOG.info("\n--------------------------------- REVERSE SAVINGS TRANSACTION --------------------------------"); return (Integer) performSavingActions(createAdjustTransactionURL(REVERSE_TRASACTION_COMMAND, savingsId, transactionId), getSavingsTransactionJSON("0", LAST_TRANSACTION_DATE), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer reverseSavingsAccountTransaction(final Integer savingsId, final Integer transactionId, final boolean isBulk) { LOG.info("\n--------------------------------- REVERSE SAVINGS TRANSACTION --------------------------------"); return (Integer) performSavingActions(createAdjustTransactionURL(REVERSE_TRASACTION_COMMAND, savingsId, transactionId), getSavingsTransactionJSON("0", LAST_TRANSACTION_DATE, isBulk), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void calculateInterestForSavings(final Integer savingsId) { LOG.info("--------------------------------- CALCULATING INTEREST FOR SAVINGS --------------------------------"); performSavingActions(createSavingsCalculateInterestURL(CALCULATE_INTEREST_SAVINGS_COMMAND, savingsId), getCalculatedInterestForSavingsApplicationAsJSON(), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void postInterestForSavings(final Integer savingsId) { LOG.info("--------------------------------- POST INTEREST FOR SAVINGS --------------------------------"); performSavingActions(createSavingsCalculateInterestURL(POST_INTEREST_SAVINGS_COMMAND, savingsId), getCalculatedInterestForSavingsApplicationAsJSON(), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void postInterestAsOnSavings(final Integer savingsId, final String today) { LOG.info("--------------------------------- POST INTEREST AS ON FOR SAVINGS --------------------------------"); performSavingActions(createSavingsPostInterestAsOnURL(POST_INTEREST_AS_ON_SAVINGS_COMMAND, savingsId), getCalculatedInterestForSavingsApplicationAsJSON(today), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer addChargesForSavings(final Integer savingsId, final Integer chargeId, boolean addDueDate) { return addChargesForSavings(savingsId, chargeId, addDueDate, BigDecimal.valueOf(100)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer addChargesForSavings(final Integer savingsId, final Integer chargeId, boolean addDueDate, BigDecimal amount) { LOG.info("--------------------------------- ADD CHARGES FOR SAVINGS --------------------------------"); return (Integer) performSavingActions(SAVINGS_ACCOUNT_URL + "/" + savingsId + "/charges?" + Utils.TENANT_IDENTIFIER, getPeriodChargeRequestJSON(chargeId, addDueDate, amount), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer addChargesForSavingsWithDueDate(final Integer savingsId, final Integer chargeId, String addDueDate, Integer amount) { return (Integer) performSavingActions(SAVINGS_ACCOUNT_URL + "/" + savingsId + "/charges?" + Utils.TENANT_IDENTIFIER, getPeriodChargeRequestJSONWithDueDate(chargeId, addDueDate, amount), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer addChargesForSavingsWithDueDateAndFeeOnMonthDay(final Integer savingsId, final Integer chargeId, String addDueDate, Integer amount, String feeOnMonthDay) { return (Integer) performSavingActions(SAVINGS_ACCOUNT_URL + "/" + savingsId + "/charges?" + Utils.TENANT_IDENTIFIER, @@ -395,28 +559,48 @@ public Integer payCharge(final Integer chargeId, final Integer savingsId, String CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer payCharge(final Integer chargeId, final Integer savingsId, String amount, String dueDate) { return (Integer) performSavingActions(createChargesURL("paycharge", savingsId, chargeId), getSavingsPayChargeJSON(amount, dueDate), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer waiveCharge(final Integer chargeId, final Integer savingsId) { return (Integer) performSavingActions(createChargesURL("waive", savingsId, chargeId), getSavingsWaiveChargeJSON(), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap updateCharges(final Integer chargeId, final Integer savingsId) { return Utils.performServerPut(this.requestSpec, this.responseSpec, SAVINGS_ACCOUNT_URL + "/" + savingsId + "/charges/" + chargeId + "?" + Utils.TENANT_IDENTIFIER, getModifyChargeJSON(), CommonConstants.RESPONSE_CHANGES); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer deleteCharge(final Integer chargeId, final Integer savingsId) { return Utils.performServerDelete(this.requestSpec, this.responseSpec, SAVINGS_ACCOUNT_URL + "/" + savingsId + "/charges/" + chargeId + "?" + Utils.TENANT_IDENTIFIER, CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap blockSavings(final Integer savingsID) { LOG.info("---------------------------------- BLOCKING SAVINGS ACCOUNT ----------------------------------"); Boolean isBlock = true; @@ -424,6 +608,10 @@ public HashMap blockSavings(final Integer savingsID) { getActivatedSavingsAsForHoldJSON(), isBlock); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap unblockSavings(final Integer savingsID) { LOG.info("---------------------------------- UNBLOCKING SAVINGS ACCOUNT ----------------------------------"); Boolean isBlock = true; @@ -431,6 +619,10 @@ public HashMap unblockSavings(final Integer savingsID) { isBlock); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap blockDebit(final Integer savingsID) { LOG.info("---------------------------------- BLOCKING DEBIT TRANSACTIONS ----------------------------------"); Boolean isBlock = true; @@ -438,6 +630,10 @@ public HashMap blockDebit(final Integer savingsID) { getActivatedSavingsAsForHoldJSON(), isBlock); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap unblockDebit(final Integer savingsID) { LOG.info("---------------------------------- UNBLOCKING DEBIT TRANSACTIONS ----------------------------------"); Boolean isBlock = true; @@ -445,6 +641,10 @@ public HashMap unblockDebit(final Integer savingsID) { getActivatedSavingsAsJSON(), isBlock); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap blockCredit(final Integer savingsID) { LOG.info("---------------------------------- BLOCKING CREDIT TRANSACTIONS ----------------------------------"); Boolean isBlock = true; @@ -452,6 +652,10 @@ public HashMap blockCredit(final Integer savingsID) { getActivatedSavingsAsForHoldJSON(), isBlock); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap unblockCredit(final Integer savingsID) { LOG.info("---------------------------------- UNBLOCKING CREDIT TRANSACTIONS ----------------------------------"); Boolean isBlock = true; @@ -459,6 +663,10 @@ public HashMap unblockCredit(final Integer savingsID) { getActivatedSavingsAsJSON(), isBlock); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object holdAmountInSavingsAccount(final Integer savingsID, final String amount, final Boolean lienAllowed, String date, String jsonAttributeToGetback) { LOG.info("--------------------------------- SAVINGS TRANSACTION HOLD AMOUNT--------------------------------"); @@ -467,16 +675,28 @@ public Object holdAmountInSavingsAccount(final Integer savingsID, final String a getLienSavingsTransactionJSON(amount, date, lienAllowed), jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer releaseAmount(final Integer savingsId, final Integer transactionId) { LOG.info("\n--------------------------------- SAVINGS TRANSACTION RELEASE AMOUNT--------------------------------"); return (Integer) performSavingActions(createAdjustTransactionURL(RELEASE_AMOUNT_SAVINGS_COMMAND, savingsId, transactionId), getSavingsTransactionJSON("1000", LAST_TRANSACTION_DATE), CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getApproveSavingsAsJSON() { return getApproveSavingsAsJsonOnDate(CREATED_DATE_PLUS_ONE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getApproveSavingsAsJsonOnDate(final String approvalDate) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -488,6 +708,10 @@ private String getApproveSavingsAsJsonOnDate(final String approvalDate) { return savingsAccountApproveJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getRejectedSavingsAsJSON(final String rejectedOnDate) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -499,6 +723,10 @@ private String getRejectedSavingsAsJSON(final String rejectedOnDate) { return savingsAccountJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getWithdrawnSavingsAsJSON() { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -510,6 +738,10 @@ private String getWithdrawnSavingsAsJSON() { return savingsAccountJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getActivatedSavingsAsJSON() { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -520,6 +752,10 @@ private String getActivatedSavingsAsJSON() { return savingsAccountActivateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getActivatedSavingsAsJSONOnDate(final String activationDate) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -530,6 +766,10 @@ private String getActivatedSavingsAsJSONOnDate(final String activationDate) { return savingsAccountActivateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getActivatedSavingsAsForHoldJSON() { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -541,25 +781,45 @@ private String getActivatedSavingsAsForHoldJSON() { return savingsAccountActivateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getSavingsTransactionJSON(final String amount, final String transactionDate) { return SavingsTransactionData.builder().transactionDate(transactionDate).transactionAmount(amount).paymentTypeId(PAYMENT_TYPE_ID) .build().getJson(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getSavingsTransactionJSON(final String amount, final String transactionDate, final boolean isBulk) { return SavingsTransactionData.builder().transactionDate(transactionDate).transactionAmount(amount).isBulk(isBulk).build().getJson(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getLienSavingsTransactionJSON(final String amount, final String transactionDate, final Boolean lienAllowed) { return SavingsTransactionData.builder().transactionDate(transactionDate).transactionAmount(amount).lienAllowed(lienAllowed) .reasonForBlock("unUsualActivity").build().getJson(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getSavingsTransactionPaymentTypeJSON(final String amount, final String transactionDate, final Long paymentTypeId) { return SavingsTransactionData.builder().transactionDate(transactionDate).transactionAmount(amount).paymentTypeId(paymentTypeId) .build().getJson(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getCalculatedInterestForSavingsApplicationAsJSON() { final HashMap<String, String> map = new HashMap<>(); String savingsAccountCalculatedInterestJson = new Gson().toJson(map); @@ -567,6 +827,10 @@ private String getCalculatedInterestForSavingsApplicationAsJSON() { return savingsAccountCalculatedInterestJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getCalculatedInterestForSavingsApplicationAsJSON(final String today) { final HashMap<String, String> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -577,6 +841,10 @@ private String getCalculatedInterestForSavingsApplicationAsJSON(final String tod return savingsAccountCalculatedInterestJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getSavingsPayChargeJSON(final String amount, final String dueDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -587,6 +855,10 @@ private String getSavingsPayChargeJSON(final String amount, final String dueDate return josn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getSavingsWaiveChargeJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -595,6 +867,10 @@ private String getSavingsWaiveChargeJSON() { return josn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getModifyChargeJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -604,6 +880,10 @@ private String getModifyChargeJSON() { return josn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getCloseAccountJSON(String withdrawBalance, String closedOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -616,6 +896,10 @@ private String getCloseAccountJSON(String withdrawBalance, String closedOnDate) return josn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getCloseAccountPostInterestJSON(String withdrawBalance, String closedOnDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -629,6 +913,10 @@ private String getCloseAccountPostInterestJSON(String withdrawBalance, String cl return josn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String updateGsimJSON(String clientID, String groupID, String productID) { final HashMap<String, String> map = new HashMap<>(); map.put("clientId", clientID); @@ -639,61 +927,113 @@ private String updateGsimJSON(String clientID, String groupID, String productID) return savingsAccountJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createSavingsOperationURL(final String command, final Integer savingsID) { return SAVINGS_ACCOUNT_URL + "/" + savingsID + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createSavingsGsimOperationURL(final String command, final Integer gsimID) { return SAVINGS_ACCOUNT_URL + GSIM_SAVINGS_COMMAND + "/" + gsimID + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createSavingsTransactionURL(final String command, final Integer savingsID) { return SAVINGS_ACCOUNT_URL + "/" + savingsID + "/transactions?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createAdjustTransactionURL(final String command, final Integer savingsID, final Integer transactionId) { return SAVINGS_ACCOUNT_URL + "/" + savingsID + "/transactions/" + transactionId + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createSavingsCalculateInterestURL(final String command, final Integer savingsID) { return SAVINGS_ACCOUNT_URL + "/" + savingsID + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createSavingsPostInterestAsOnURL(final String command, final Integer savingsID) { return SAVINGS_ACCOUNT_URL + "/" + savingsID + "/transactions/" + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String createChargesURL(final String command, final Integer savingsID, final Integer chargeId) { return SAVINGS_ACCOUNT_URL + "/" + savingsID + "/charges/" + chargeId + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList getSavingsCollectionAttribute(final Integer savingsID, final String jSONAttribute) { final String URL = SAVINGS_ACCOUNT_URL + "/" + savingsID + "?associations=all&" + Utils.TENANT_IDENTIFIER; final ArrayList<HashMap> response = Utils.performServerGet(requestSpec, responseSpec, URL, jSONAttribute); return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getSavingsAccountDetail(final Integer savingsID, final String jsonAttribute) { final String URL = SAVINGS_ACCOUNT_URL + "/" + savingsID + "?associations=all&" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, URL, jsonAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList getSavingsCharges(final Integer savingsID) { final String URL = SAVINGS_ACCOUNT_URL + "/" + savingsID + "/charges?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getSavingsCharge(final Integer savingsID, final Integer savingsChargeId) { final String URL = SAVINGS_ACCOUNT_URL + "/" + savingsID + "/charges/" + savingsChargeId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getSavingsTransaction(final Integer savingsID, final Integer savingsTransactionId) { final String URL = SAVINGS_ACCOUNT_URL + "/" + savingsID + "/transactions/" + savingsTransactionId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public SavingsAccountTransactionsSearchResponse searchSavingsTransactions(Integer savingsId, Map<String, Object> queryParams) { final String url = SAVINGS_ACCOUNT_URL + "/" + savingsId + "/transactions/search"; queryParams.put(TENANT_PARAM_NAME, DEFAULT_TENANT); @@ -707,36 +1047,60 @@ public Map<String, Object> querySavingsTransactions(Integer savingsId, PagedLoca return JsonPath.from(response).get(""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List<HashMap> getSavingsTransactions(final Integer savingsID) { final Object get = getSavingsCollectionAttribute(savingsID, "transactions"); final String json = new Gson().toJson(get); return new Gson().fromJson(json, new TypeToken<ArrayList<HashMap>>() {}.getType()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getSavingsInterest(final Integer savingsID) { final String URL = SAVINGS_ACCOUNT_URL + "/" + savingsID + "?associations=summary&" + Utils.TENANT_IDENTIFIER; final HashMap response = Utils.performServerGet(requestSpec, responseSpec, URL, "summary"); return response.get("totalInterestEarned"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getSavingsSummary(final Integer savingsID) { final String URL = SAVINGS_ACCOUNT_URL + "/" + savingsID + "?associations=summary&" + Utils.TENANT_IDENTIFIER; final HashMap response = Utils.performServerGet(requestSpec, responseSpec, URL, "summary"); return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getSavingsDetails(final Integer savingsID) { final String URL = SAVINGS_ACCOUNT_URL + "/" + savingsID + "?associations=all&" + Utils.TENANT_IDENTIFIER; final HashMap response = Utils.performServerGet(requestSpec, responseSpec, URL, ""); return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getSavingsDetails(final Integer savingsID, final String returnAttribute) { final String URL = SAVINGS_ACCOUNT_URL + "/" + savingsID + "?associations=all&" + Utils.TENANT_IDENTIFIER; final Object response = Utils.performServerGet(requestSpec, responseSpec, URL, returnAttribute); return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private HashMap performSavingApplicationActions(final String postURLForSavingsTransaction, final String jsonToBeSent, final Boolean isBlock) { HashMap status = null; @@ -751,12 +1115,20 @@ private HashMap performSavingApplicationActions(final String postURLForSavingsTr return status; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Object performSavingActions(final String postURLForSavingsTransaction, final String jsonToBeSent, final String jsonAttributeToGetBack) { return Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForSavingsTransaction, jsonToBeSent, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object closeSavingsAccountAndGetBackRequiredField(final Integer savingsID, String withdrawBalance, final String jsonAttributeToGetBack, final String closedOnDate) { LOG.info("---------------------------------- CLOSE SAVINGS APPLICATION ----------------------------------"); @@ -764,6 +1136,10 @@ public Object closeSavingsAccountAndGetBackRequiredField(final Integer savingsID getCloseAccountJSON(withdrawBalance, closedOnDate), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object closeSavingsAccountPostInterestAndGetBackRequiredField(final Integer savingsID, String withdrawBalance, final String jsonAttributeToGetBack, final String closedOnDate) { LOG.info("---------------------------------- CLOSE SAVINGS APPLICATION ----------------------------------"); @@ -771,6 +1147,10 @@ public Object closeSavingsAccountPostInterestAndGetBackRequiredField(final Integ getCloseAccountPostInterestJSON(withdrawBalance, closedOnDate), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getPeriodChargeRequestJSON(Integer chargeId, boolean addDueDate, BigDecimal amount) { final HashMap<String, Object> map = new HashMap<>(); map.put("chargeId", chargeId); @@ -786,6 +1166,10 @@ private String getPeriodChargeRequestJSON(Integer chargeId, boolean addDueDate, return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getPeriodChargeRequestJSONWithDueDate(Integer chargeId, String addDueDate, Integer amount) { final HashMap<String, Object> map = new HashMap<>(); map.put("chargeId", chargeId); @@ -797,6 +1181,10 @@ private String getPeriodChargeRequestJSONWithDueDate(Integer chargeId, String ad return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getPeriodChargeRequestJSONWithDueDateAndFeeOnMonthDay(Integer chargeId, String addDueDate, Integer amount, String feeOnMonthDay) { final HashMap<String, Object> map = new HashMap<>(); @@ -811,6 +1199,10 @@ private String getPeriodChargeRequestJSONWithDueDateAndFeeOnMonthDay(Integer cha return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getAccountActivationJSON(final String activationDate) { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -820,16 +1212,28 @@ private String getAccountActivationJSON(final String activationDate) { return savingsAccountActivateJson; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap activateSavingsAccount(Integer savingsID, String activationDate) { return performSavingApplicationActions(createSavingsOperationURL(ACTIVATE_SAVINGS_COMMAND, savingsID), getAccountActivationJSON(activationDate), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object inactivateCharge(final Integer chargeId, final Integer savingsId, final String jsonAttributeToGetBack) { return performSavingActions(createChargesURL("inactivate", savingsId, chargeId), getSavingsInactivateChargeJSON(), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String getSavingsInactivateChargeJSON() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", CommonConstants.LOCALE); @@ -838,6 +1242,10 @@ private String getSavingsInactivateChargeJSON() { return josn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer openSavingsAccount(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer clientId, final String minimumOpeningBalance) { final Integer savingsProductID = createSavingsProduct(requestSpec, responseSpec, minimumOpeningBalance); @@ -859,6 +1267,10 @@ public static Integer openSavingsAccount(final RequestSpecification requestSpec, return savingsId; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static Integer createSavingsProduct(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String minOpenningBalance) { LOG.info("------------------------------CREATING NEW SAVINGS PRODUCT ---------------------------------------"); @@ -871,6 +1283,10 @@ private static Integer createSavingsProduct(final RequestSpecification requestSp return SavingsProductHelper.createSavingsProduct(savingsProductJSON, requestSpec, responseSpec); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<HashMap<String, Object>> getTestDatatableAsJson(final String registeredTableName) { List<HashMap<String, Object>> datatablesListMap = new ArrayList<>(); HashMap<String, Object> datatableMap = new HashMap<>(); @@ -887,6 +1303,10 @@ public static List<HashMap<String, Object>> getTestDatatableAsJson(final String return datatablesListMap; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Workbook getSavingsWorkbook(String dateFormat) throws IOException { requestSpec.header(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel"); byte[] byteArray = Utils.performGetBinaryResponse(requestSpec, responseSpec, @@ -896,6 +1316,10 @@ public Workbook getSavingsWorkbook(String dateFormat) throws IOException { return workbook; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String importSavingsTemplate(File file) { String locale = "en"; String dateFormat = "dd MMMM yyyy"; @@ -905,6 +1329,10 @@ public String importSavingsTemplate(File file) { SAVINGS_ACCOUNT_URL + "/uploadtemplate" + "?" + Utils.TENANT_IDENTIFIER, legalFormType, file, locale, dateFormat); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getOutputTemplateLocation(final String importDocumentId) { requestSpec.header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN); return Utils.performServerOutputTemplateLocationGet(requestSpec, responseSpec, @@ -912,11 +1340,19 @@ public String getOutputTemplateLocation(final String importDocumentId) { } // gsim testing + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap approveGsimSavings(final Integer gsimID) { LOG.info("---------------GSIM APPROVAL---------------"); return approveGsimSavingsOnDate(gsimID, null); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap approveGsimSavingsOnDate(final Integer gsimID, final String approvalDate) { LOG.info("--------------------------------- APPROVING GSIM SAVINGS APPLICATION ------------------------------------"); final String savingsOperationURL = createSavingsGsimOperationURL(APPROVE_SAVINGS_COMMAND, gsimID); @@ -927,18 +1363,30 @@ public HashMap approveGsimSavingsOnDate(final Integer gsimID, final String appro return performSavingApplicationActions(savingsOperationURL, getApproveSavingsAsJsonOnDate(approvalDate), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap rejectGsimApplication(final Integer gsimID) { LOG.info("--------------------------------- REJECT SAVINGS APPLICATION -------------------------------"); return performSavingApplicationActions(createSavingsGsimOperationURL(REJECT_SAVINGS_COMMAND, gsimID), getRejectedSavingsAsJSON(CREATED_DATE_PLUS_ONE), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List rejectGsimApplicationWithErrorCode(final Integer gsimID, final String date) { LOG.info("--------------------------------- REJECT SAVINGS APPLICATION -------------------------------"); return (List) performSavingActions(createSavingsGsimOperationURL(REJECT_SAVINGS_COMMAND, gsimID), getRejectedSavingsAsJSON(date), CommonConstants.RESPONSE_ERROR); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap undoApprovalGsimSavings(final Integer gsimId) { LOG.info("--------------------------------- UNDO APPROVING GSIM SAVINGS APPLICATION -------------------------------"); final String undoBodyJson = "{'note':'UNDO APPROVAL'}"; @@ -946,6 +1394,10 @@ public HashMap undoApprovalGsimSavings(final Integer gsimId) { IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer depositGsimApplication(Integer savingsID, List<Map<String, Object>> savingsArray) { LOG.info("--------------------------------- DEPOSIT GSIM SAVINGS APPLICATION -------------------------------"); String savingsArrays = new SavingsApplicationTestBuilder() // @@ -955,6 +1407,10 @@ public Integer depositGsimApplication(Integer savingsID, List<Map<String, Object } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer depositGsimApplication(Integer savingsID, final String savingsArrays, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { @@ -964,18 +1420,30 @@ public static Integer depositGsimApplication(Integer savingsID, final String sav return Utils.performServerPost(requestSpec, responseSpec, depositGsimURL, savingsArrays, CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap activateGsimSavings(final Integer gsimID) { LOG.info("---------------------------------- ACTIVATING GSIM SAVINGS APPLICATION ----------------------------------"); return performSavingApplicationActions(createSavingsGsimOperationURL(ACTIVATE_SAVINGS_COMMAND, gsimID), getActivatedSavingsAsJSON(), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap closeGsimSavingsAccount(final Integer gsimID, String withdrawBalance) { LOG.info("---------------------------------- CLOSE SAVINGS APPLICATION ----------------------------------"); return performSavingApplicationActions(createSavingsGsimOperationURL(CLOSE_SAVINGS_COMMAND, gsimID), getCloseAccountJSON(withdrawBalance, LAST_TRANSACTION_DATE), IS_BLOCK); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object closeGsimSavingsAccountAndGetBackRequiredField(final Integer gsimId, String withdrawBalance, final String jsonAttributeToGetBack, final String closedOnDate) { LOG.info("---------------------------------- CLOSE SAVINGS APPLICATION ----------------------------------"); @@ -983,6 +1451,10 @@ public Object closeGsimSavingsAccountAndGetBackRequiredField(final Integer gsimI getCloseAccountJSON(withdrawBalance, closedOnDate), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap updateGsimApplication(final Integer gsimID, final Integer clientID, final Integer groupID, final Integer productID) { LOG.info("--------------------------------- UPDATE GSIM SAVINGS APPLICATION -------------------------------"); final String GSIM_URL = "/fineract-provider/api/v1/savingsaccounts/gsim/" + gsimID + "?" + Utils.TENANT_IDENTIFIER; @@ -990,6 +1462,10 @@ public HashMap updateGsimApplication(final Integer gsimID, final Integer clientI updateGsimJSON(clientID.toString(), groupID.toString(), productID.toString()), ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getTransactionDetails(Integer savingsId, Integer transactionId) { LOG.info("--------------------------------- GET savings transaction details -------------------------------"); final String url = "/fineract-provider/api/v1/savingsaccounts/" + savingsId + "/transactions/" + transactionId + "?" diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/SavingsProductHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/SavingsProductHelper.java index a22ba29c1eb..6a875afb7f8 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/SavingsProductHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/savings/SavingsProductHelper.java @@ -102,6 +102,10 @@ public class SavingsProductHelper { private Integer gsimID = null; private String nominalAnnualInterestRateOverdraft = null; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String build() { final HashMap<String, String> map = new HashMap<>(); @@ -289,6 +293,10 @@ public SavingsProductHelper withNominalAnnualInterestRate(BigDecimal interestRat return this; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Map<String, String> getAccountMappingForCashBased() { final Map<String, String> map = new HashMap<>(); if (accountList != null) { @@ -319,6 +327,10 @@ private Map<String, String> getAccountMappingForCashBased() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Map<String, String> getAccountMappingForAccrualBased() { final Map<String, String> map = new HashMap<>(); if (accountList != null) { @@ -352,11 +364,19 @@ private Map<String, String> getAccountMappingForAccrualBased() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createSavingsProduct(final String savingsProductJSON, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_SAVINGS_PRODUCT_URL, savingsProductJSON, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifySavingsProductCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer generatedProductID) { LOG.info("------------------------------CHECK CLIENT DETAILS------------------------------------\n"); @@ -373,6 +393,10 @@ public SavingsProductHelper withDormancy() { return this; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static GetSavingsProductsProductIdResponse getSavingsProductById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer productId) { LOG.info("-------------------- RETRIEVING SAVINGS DEPOSIT PRODUCT BY ID --------------------------"); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareAccountHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareAccountHelper.java index c57bb0c5c8e..51a85521387 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareAccountHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareAccountHelper.java @@ -56,8 +56,12 @@ public class ShareAccountHelper { private String lockinPeriodFrequencyType; private List<Map<String, Object>> charges = null; - // chargeId , amount + // chargeId , amount + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String build() { final HashMap<String, Object> map = new HashMap<>(); map.put("locale", LOCALE); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareAccountTransactionHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareAccountTransactionHelper.java index fae790c47ef..4adb68ccde6 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareAccountTransactionHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareAccountTransactionHelper.java @@ -32,23 +32,39 @@ private ShareAccountTransactionHelper() { private static final String SHARE_ACCOUNT_URL = "/fineract-provider/api/v1/accounts/share"; private static final String CREATE_SHARE_ACCOUNT_URL = SHARE_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createShareAccount(final String shareProductJSON, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_SHARE_ACCOUNT_URL, shareProductJSON, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> retrieveShareAccount(final Integer shareProductId, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String url = SHARE_ACCOUNT_URL + "/" + shareProductId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer updateShareAccount(final Integer shareAccountId, final String shareAccountJson, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String url = SHARE_ACCOUNT_URL + "/" + shareAccountId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPut(requestSpec, responseSpec, url, shareAccountJson, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer postCommand(final String command, final Integer shareAccountId, String jsonBody, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String url = SHARE_ACCOUNT_URL + "/" + shareAccountId + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareDividendsTransactionHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareDividendsTransactionHelper.java index 091a91d24fb..29c6c9231ca 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareDividendsTransactionHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareDividendsTransactionHelper.java @@ -32,12 +32,20 @@ private ShareDividendsTransactionHelper() { private static final String SHARE_PRODUCT_URL = "/fineract-provider/api/v1/shareproduct"; private static final String DIVIDEND = "dividend"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createShareProductDividends(final Integer productId, final String dividendJson, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String url = SHARE_PRODUCT_URL + "/" + productId + "/" + DIVIDEND + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(requestSpec, responseSpec, url, dividendJson, "subResourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer postCommand(final String command, final Integer productId, final Integer dividendId, String jsonBody, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String url = SHARE_PRODUCT_URL + "/" + productId + "/" + DIVIDEND + "/" + dividendId + "?command=" + command + "&" @@ -45,12 +53,20 @@ public static Integer postCommand(final String command, final Integer productId, return Utils.performServerPut(requestSpec, responseSpec, url, jsonBody, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> retrieveDividendDetails(final Integer productId, final Integer dividendId, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String url = SHARE_PRODUCT_URL + "/" + productId + "/" + DIVIDEND + "/" + dividendId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> retrieveAllDividends(final Integer productId, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String url = SHARE_PRODUCT_URL + "/" + productId + "/" + DIVIDEND + "?" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareProductHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareProductHelper.java index 65d126fac84..8a2ca4e012b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareProductHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareProductHelper.java @@ -65,6 +65,10 @@ public class ShareProductHelper { private List<Map<String, String>> marketPrices = null; private Account[] accountList = null; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String build() { final HashMap<String, Object> map = new HashMap<>(); map.put("name", this.productName); @@ -143,6 +147,10 @@ public ShareProductHelper withCharges(final ArrayList<Long> charges) { } @SuppressWarnings("unchecked") + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyShareProduct(Map<String, Object> shareProductData) { String productName = (String) shareProductData.get("name"); Assertions.assertEquals(this.productName, productName); @@ -210,6 +218,10 @@ public void verifyShareProduct(Map<String, Object> shareProductData) { } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private Map<String, String> getAccountMappingForCashBased() { final Map<String, String> map = new HashMap<>(); if (accountList != null) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareProductTransactionHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareProductTransactionHelper.java index 55de3bf32d3..a836bde97ef 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareProductTransactionHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/shares/ShareProductTransactionHelper.java @@ -32,17 +32,29 @@ private ShareProductTransactionHelper() { private static final String SHARE_PRODUCT_URL = "/fineract-provider/api/v1/products/share"; private static final String CREATE_SHARE_PRODUCT_URL = SHARE_PRODUCT_URL + "?" + Utils.TENANT_IDENTIFIER; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createShareProduct(final String savingsProductJSON, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_SHARE_PRODUCT_URL, savingsProductJSON, "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> retrieveShareProduct(final Integer shareProductId, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String url = SHARE_PRODUCT_URL + "/" + shareProductId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer updateShareProduct(final Integer shareProductId, final String provsioningCriteriaJson, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String url = SHARE_PRODUCT_URL + "/" + shareProductId + "?" + Utils.TENANT_IDENTIFIER; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/AccountNumberPreferencesHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/AccountNumberPreferencesHelper.java index 10d57c575f4..7cb94ddd847 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/AccountNumberPreferencesHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/AccountNumberPreferencesHelper.java @@ -35,11 +35,19 @@ public class AccountNumberPreferencesHelper { private static final String ACCOUNT_NUMBER_FORMATS_REQUEST_URL = "/fineract-provider/api/v1/accountnumberformats"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public AccountNumberPreferencesHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object createClientAccountNumberPreference(ResponseSpecification responseSpec, String jsonAttributeToGetBack) { LOG.info("---------------------------------CREATING CLIENT ACCOUNT NUMBER PREFERENCE------------------------------------------"); @@ -50,6 +58,10 @@ public Object createClientAccountNumberPreference(ResponseSpecification response return Utils.performServerPost(this.requestSpec, responseSpec, URL, requestJSON, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object createLoanAccountNumberPreference(ResponseSpecification responseSpec, String jsonAttributeToGetBack) { LOG.info("---------------------------------CREATING LOAN ACCOUNT NUMBER PREFERENCE------------------------------------------"); @@ -59,6 +71,10 @@ public Object createLoanAccountNumberPreference(ResponseSpecification responseSp return Utils.performServerPost(this.requestSpec, responseSpec, URL, requestJSON, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object createSavingsAccountNumberPreference(ResponseSpecification responseSpec, String jsonAttributeToGetBack) { LOG.info("---------------------------------CREATING SAVINGS ACCOUNT NUMBER PREFERENCE------------------------------------------"); @@ -69,6 +85,10 @@ public Object createSavingsAccountNumberPreference(ResponseSpecification respons } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object createGroupsAccountNumberPreference(ResponseSpecification responseSpec, String jsonAttributeToGetBack) { LOG.info("---------------------------------CREATING GROUPS ACCOUNT NUMBER PREFERENCE------------------------------------------"); @@ -79,6 +99,10 @@ public Object createGroupsAccountNumberPreference(ResponseSpecification response } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object createCenterAccountNumberPreference(ResponseSpecification responseSpec, String jsonAttributeToGetBack) { LOG.info("---------------------------------CREATING CENTER ACCOUNT NUMBER PREFERENCE------------------------------------------"); @@ -89,6 +113,10 @@ public Object createCenterAccountNumberPreference(ResponseSpecification response } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> createAccountNumberPreferenceWithInvalidData(ResponseSpecification responseSpec, String accountType, String prefixType, String jsonAttributeToGetBack) { @@ -99,6 +127,10 @@ public HashMap<String, Object> createAccountNumberPreferenceWithInvalidData(Resp } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> updateAccountNumberPreference(final Integer accountNumberFormatId, final String prefixType, ResponseSpecification responseSpec, String jsonAttributeToGetBack) { @@ -110,6 +142,10 @@ public HashMap<String, Object> updateAccountNumberPreference(final Integer accou } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap<String, Object> deleteAccountNumberPreference(final Integer accountNumberFormatId, ResponseSpecification responseSpec, String jsonAttributeToGetBack) { @@ -120,18 +156,30 @@ public HashMap<String, Object> deleteAccountNumberPreference(final Integer accou return Utils.performServerDelete(this.requestSpec, responseSpec, URL, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getAccountNumberPreference(final Integer accountNumberFormatId, final String jsonAttributeToGetBack) { final String URL = ACCOUNT_NUMBER_FORMATS_REQUEST_URL + "/" + accountNumberFormatId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, URL, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList<HashMap<String, Object>> getAllAccountNumberPreferences() { final String URL = ACCOUNT_NUMBER_FORMATS_REQUEST_URL + "?" + Utils.TENANT_IDENTIFIER; final ArrayList<HashMap<String, Object>> response = Utils.performServerGet(requestSpec, responseSpec, URL, ""); return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyCreationOfAccountNumberPreferences(final Integer clientAccountNumberPreferenceId, final Integer loanAccountNumberPreferenceId, final Integer savingsAccountNumberPreferenceId, final Integer groupsAccountNumberPreferenceId, final Integer centerAccountNumberPreferenceId, @@ -159,6 +207,10 @@ public void verifyCreationOfAccountNumberPreferences(final Integer clientAccount Utils.performServerGet(requestSpec, responseSpec, centerURL, "id"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public void verifyUpdationOfAccountNumberPreferences(final Integer accountNumberPreferenceId, ResponseSpecification responseSpec, RequestSpecification requestSpec) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/CodeHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/CodeHelper.java index 1ba9e1c5b72..fa16e27732a 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/CodeHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/CodeHelper.java @@ -53,6 +53,10 @@ public final class CodeHelper extends IntegrationTest { public static final String CODE_VALUE_POSITION_ATTRIBUTE_NAME = "position"; public static final String CODE_VALUE_URL = "/fineract-provider/api/v1/codes/[codeId]/codevalues"; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object createCode(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String codeName, final String jsonAttributeToGetback) { @@ -60,6 +64,10 @@ public static Object createCode(final RequestSpecification requestSpec, final Re jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updateCode(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final String codeName, final String jsonAttributeToGetback) { @@ -67,6 +75,10 @@ public static Object updateCode(final RequestSpecification requestSpec, final Re getTestCodeAsJSON(codeName), jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object getCodeById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final String jsonAttributeToGetback) { @@ -75,6 +87,10 @@ public static Object getCodeById(final RequestSpecification requestSpec, final R } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> getCodeByName(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String codeName) { @@ -93,6 +109,10 @@ public static HashMap<String, Object> getCodeByName(final RequestSpecification r return code; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> getOrCreateCodeValueByCodeIdAndCodeName(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final String codeName, final Integer position) { @@ -107,6 +127,10 @@ public static HashMap<String, Object> getOrCreateCodeValueByCodeIdAndCodeName(fi return filterCodesByName(allCodeValues, codeName); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static HashMap<String, Object> filterCodesByName(ArrayList<HashMap<String, Object>> allCodeValues, String codeName) { final HashMap<String, Object> codes = new HashMap<>(); @@ -122,6 +146,10 @@ private static HashMap<String, Object> filterCodesByName(ArrayList<HashMap<Strin return codes; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> retrieveOrCreateCodeValue(Integer codeId, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { Integer codeValueId = null; @@ -141,6 +169,10 @@ public static HashMap<String, Object> retrieveOrCreateCodeValue(Integer codeId, } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<HashMap<String, Object>> getAllCodes(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { @@ -148,6 +180,10 @@ public static ArrayList<HashMap<String, Object>> getAllCodes(final RequestSpecif } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<HashMap<String, Object>> getAllCodeValuesByCodeId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId) { @@ -155,6 +191,10 @@ public static ArrayList<HashMap<String, Object>> getAllCodeValuesByCodeId(final CODE_VALUE_URL.replace("[codeId]", codeId.toString()) + "?" + Utils.TENANT_IDENTIFIER, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object getSystemDefinedCodes(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { final String getResponse = given().spec(requestSpec).expect().spec(responseSpec).when() @@ -167,12 +207,20 @@ public static Object getSystemDefinedCodes(final RequestSpecification requestSpe } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestCodeAsJSON(final String codeName) { final HashMap<String, String> map = new HashMap<>(); map.put(CODE_NAME_ATTRIBUTE_NAME, codeName); return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestCodeValueAsJSON(final String codeValueName, final String description, final Integer position) { final HashMap<String, Object> map = new HashMap<>(); map.put(CODE_VALUE_NAME_ATTRIBUTE_NAME, codeValueName); @@ -183,6 +231,10 @@ public static String getTestCodeValueAsJSON(final String codeValueName, final St return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object deleteCodeById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final String jsonAttributeToGetback) { @@ -191,6 +243,10 @@ public static Object deleteCodeById(final RequestSpecification requestSpec, fina } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createAddressTypeCodeValue(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String addressTypeName, final Integer position) { HashMap<String, Object> code = getCodeByName(requestSpec, responseSpec, ADDRESS_TYPE_CODE_NAME); @@ -198,6 +254,10 @@ public static Integer createAddressTypeCodeValue(final RequestSpecification requ return createCodeValue(requestSpec, responseSpec, countryCode, addressTypeName, position); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createStateCodeValue(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String stateName, final Integer position) { HashMap<String, Object> code = getCodeByName(requestSpec, responseSpec, STATE_CODE_NAME); @@ -205,6 +265,10 @@ public static Integer createStateCodeValue(final RequestSpecification requestSpe return createCodeValue(requestSpec, responseSpec, countryCode, stateName, position); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCountryCodeValue(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String countryName, final Integer position) { HashMap<String, Object> code = getCodeByName(requestSpec, responseSpec, COUNTRY_CODE_NAME); @@ -212,6 +276,10 @@ public static Integer createCountryCodeValue(final RequestSpecification requestS return createCodeValue(requestSpec, responseSpec, countryCode, countryName, position); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createChargeOffCodeValue(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String value, final Integer position) { HashMap<String, Object> code = getCodeByName(requestSpec, responseSpec, CHARGE_OFF_REASONS_CODE_NAME); @@ -219,17 +287,29 @@ public static Integer createChargeOffCodeValue(final RequestSpecification reques return createCodeValue(requestSpec, responseSpec, countryCode, value, position); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCodeValue(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final String codeValueName, final Integer position) { return (Integer) createCodeValue(requestSpec, responseSpec, codeId, codeValueName, position, SUBRESPONSE_ID_ATTRIBUTE_NAME); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object createCodeValue(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final String codeValueName, final Integer position, final String jsonAttributeToGetback) { String description = null; return createCodeValue(requestSpec, responseSpec, codeId, codeValueName, description, position, jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object createCodeValue(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final String codeValueName, final String description, final Integer position, final String jsonAttributeToGetback) { @@ -239,6 +319,10 @@ public static Object createCodeValue(final RequestSpecification requestSpec, fin getTestCodeValueAsJSON(codeValueName, description, position), jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<HashMap<String, Object>> getCodeValuesForCode(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final String jsonAttributeToGetback) { @@ -247,6 +331,10 @@ public static List<HashMap<String, Object>> getCodeValuesForCode(final RequestSp } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object getCodeValueById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final Integer codeValueId, final String jsonAttributeToGetback) { @@ -255,6 +343,10 @@ public static Object getCodeValueById(final RequestSpecification requestSpec, fi jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object deleteCodeValueById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final Integer codeValueId, final String jsonAttributeToGetback) { @@ -263,6 +355,10 @@ public static Object deleteCodeValueById(final RequestSpecification requestSpec, jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updateCodeValue(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final Integer codeValueId, final String codeValueName, final Integer position, final String jsonAttributeToGetback) { @@ -271,6 +367,10 @@ public static Object updateCodeValue(final RequestSpecification requestSpec, fin jsonAttributeToGetback); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updateCodeValue(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer codeId, final Integer codeValueId, final String codeValueName, final String description, final Integer position, final String jsonAttributeToGetback) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/DatatableHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/DatatableHelper.java index 5c5bad42a04..1839e0b7db1 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/DatatableHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/system/DatatableHelper.java @@ -62,21 +62,37 @@ public DatatableHelper() { this(initializeDefaultRequestSpecification(), initializeDefaultResponseSpecification()); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public DatatableHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public <T> T createDatatable(final String json, final String jsonAttributeToGetBack) { return Utils.performServerPost(this.requestSpec, this.responseSpec, DATATABLE_URL + "?" + Utils.TENANT_IDENTIFIER, json, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String createDatatable(final String apptableName, final boolean multiRow) { return Utils.performServerPost(this.requestSpec, this.responseSpec, DATATABLE_URL + "?" + Utils.TENANT_IDENTIFIER, getTestDatatableAsJSON(apptableName, multiRow), "resourceIdentifier"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostDataTablesResponse createDatatable(final String json) { final String response = Utils.performServerPost(this.requestSpec, this.responseSpec, DATATABLE_URL + "?" + Utils.TENANT_IDENTIFIER, json); @@ -87,6 +103,10 @@ public PostDataTablesResponse createDatatable(PostDataTablesRequest request) { return ok(fineract().dataTables.createDatatable(request)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void verifyDatatableCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String generatedDatatableName) { LOG.info("------------------------------CHECK DATATABLE DETAILS------------------------------------\n"); @@ -99,12 +119,20 @@ public GetDataTablesResponse getDataTableDetails(final String dataTableName) { return ok(fineract().dataTables.getDatatable(dataTableName)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String runDatatableQuery(final String datatableName, final String columnFilter, final String valueFilter, final String resultColumns) { return Utils.performServerGet(this.requestSpec, this.responseSpec, DATATABLE_URL + "/" + datatableName + "/query" + "?columnFilter=" + columnFilter + "&valueFilter=" + valueFilter + "&resultColumns=" + resultColumns + "&" + Utils.TENANT_IDENTIFIER); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Map<String, Object> queryDatatable(String dataTableName, PagedLocalRequestAdvancedQueryData request) { String response = ok(fineract().dataTables.advancedQuery(dataTableName, request)); return JsonPath.from(response).get(""); @@ -114,23 +142,39 @@ public PutDataTablesResponse updateDatatable(String dataTableName, PutDataTables return ok(fineract().dataTables.updateDatatable(dataTableName, request)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PutDataTablesResponse updateDatatable(String dataTableName, final String json) { final String response = Utils.performServerPut(this.requestSpec, this.responseSpec, DATATABLE_URL + "/" + dataTableName + "?" + Utils.TENANT_IDENTIFIER, json); return GSON.fromJson(response, PutDataTablesResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String deleteDatatable(final String datatableName) { return Utils.performServerDelete(this.requestSpec, this.responseSpec, DATATABLE_URL + "/" + datatableName + "?" + Utils.TENANT_IDENTIFIER, "resourceIdentifier"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public <T> T createDatatableEntry(final String datatableName, final Integer apptableId, final boolean genericResultSet, final String json) { return Utils.performServerPost(this.requestSpec, this.responseSpec, DATATABLE_URL + "/" + datatableName + "/" + apptableId + "?genericResultSet=" + genericResultSet + "&" + Utils.TENANT_IDENTIFIER, json, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createDatatableEntry(final String apptableName, final String datatableName, final Integer apptableId, final boolean genericResultSet, final String dateFormat, final String jsonAttributeToGetBack) { return Utils.performServerPost( @@ -139,6 +183,10 @@ public Integer createDatatableEntry(final String apptableName, final String data getTestDatatableEntryAsJSON(dateFormat), jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PostDataTablesAppTableIdResponse addDatatableEntry(final String datatableName, final Integer apptableId, final boolean genericResultSet, final String json) { final String response = Utils.performServerPost(this.requestSpec, this.responseSpec, DATATABLE_URL + "/" + datatableName + "/" @@ -146,11 +194,19 @@ public PostDataTablesAppTableIdResponse addDatatableEntry(final String datatable return GSON.fromJson(response, PostDataTablesAppTableIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String readDatatableEntry(final String datatableName, final Integer resourceId, final boolean genericResultset) { return Utils.performServerGet(this.requestSpec, this.responseSpec, DATATABLE_URL + "/" + datatableName + "/" + resourceId + "?genericResultSet=" + String.valueOf(genericResultset) + "&" + Utils.TENANT_IDENTIFIER); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public <T> T readDatatableEntry(final String datatableName, final Integer resourceId, final boolean genericResultset, final Integer datatableResourceId, final String jsonAttributeToGetBack) { if (datatableResourceId == null) { @@ -164,6 +220,10 @@ public <T> T readDatatableEntry(final String datatableName, final Integer resour } } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Date readDatatableEntry(final String datatableName, final Integer resourceId, final boolean genericResultset, final int position, final String jsonAttributeToGetBack) { final JsonElement jsonElement = Utils.performServerGetArray(this.requestSpec, this.responseSpec, DATATABLE_URL + "/" + datatableName @@ -172,18 +232,30 @@ public Date readDatatableEntry(final String datatableName, final Integer resourc return Utils.convertJsonElementAsDate(jsonElement); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public <T> T updateDatatableEntry(final String datatableName, final Integer apptableId, final boolean genericResultSet, final String json) { return Utils.performServerPut(this.requestSpec, this.responseSpec, DATATABLE_URL + "/" + datatableName + "/" + apptableId + "?genericResultSet=" + genericResultSet + "&" + Utils.TENANT_IDENTIFIER, json, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public <T> T updateDatatableEntry(final String datatableName, final Integer apptableId, final Integer entryId, final boolean genericResultSet, final String json) { return Utils.performServerPut(this.requestSpec, this.responseSpec, DATATABLE_URL + "/" + datatableName + "/" + apptableId + "/" + entryId + "?genericResultSet=" + genericResultSet + "&" + Utils.TENANT_IDENTIFIER, json, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PutDataTablesAppTableIdDatatableIdResponse updateDatatableEntry(final String datatableName, final Integer apptableId, final Integer entryId, final String json) { final String response = Utils.performServerPut(this.requestSpec, this.responseSpec, DATATABLE_URL + "/" + datatableName + "/" @@ -191,6 +263,10 @@ public PutDataTablesAppTableIdDatatableIdResponse updateDatatableEntry(final Str return GSON.fromJson(response, PutDataTablesAppTableIdDatatableIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public PutDataTablesAppTableIdDatatableIdResponse updateDatatableEntry(final String datatableName, final Integer apptableId, final String json) { final String response = Utils.performServerPut(this.requestSpec, this.responseSpec, @@ -198,12 +274,20 @@ public PutDataTablesAppTableIdDatatableIdResponse updateDatatableEntry(final Str return GSON.fromJson(response, PutDataTablesAppTableIdDatatableIdResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object deleteDatatableEntries(final String datatableName, final Integer apptableId, String jsonAttributeToGetBack) { final String deleteEntryUrl = DATATABLE_URL + "/" + datatableName + "/" + apptableId + "?genericResultSet=true" + "&" + Utils.TENANT_IDENTIFIER; return Utils.performServerDelete(this.requestSpec, this.responseSpec, deleteEntryUrl, jsonAttributeToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestDatatableAsJSON(final String apptableName, final String datatableName, final String codeName, final boolean multiRow) { final HashMap<String, Object> map = new HashMap<>(); @@ -231,6 +315,10 @@ public static String getTestDatatableAsJSON(final String apptableName, final Str return requestJsonString; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestDatatableAsJSON(final String apptableName, final boolean multiRow) { final HashMap<String, Object> map = new HashMap<>(); final List<HashMap<String, Object>> datatableColumnsList = new ArrayList<>(); @@ -248,6 +336,10 @@ public static String getTestDatatableAsJSON(final String apptableName, final boo return requestJsonString; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestDatatableEntryAsJSON(final String dateFormat) { final HashMap<String, Object> map = new HashMap<>(); map.put("Spouse Name", Utils.randomStringGenerator("Spouse_Name_", 5)); @@ -261,6 +353,10 @@ public static String getTestDatatableEntryAsJSON(final String dateFormat) { return requestJsonString; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> addDatatableColumn(List<HashMap<String, Object>> datatableColumnsList, String columnName, String columnType, boolean isMandatory, Integer length, String codeName) { final HashMap<String, Object> datatableColumnMap = new HashMap<>(); @@ -281,6 +377,10 @@ public static HashMap<String, Object> addDatatableColumn(List<HashMap<String, Ob return datatableColumnMap; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<HashMap<String, Object>> addDatatableColumnWithUniqueAndIndex(List<HashMap<String, Object>> datatableColumnsList, String columnName, String columnType, boolean isMandatory, Integer length, String codeName, boolean isUnique, boolean isIndexed) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/xbrl/XBRLIntegrationTestHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/xbrl/XBRLIntegrationTestHelper.java index 73588ff8213..dcc305d0b91 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/xbrl/XBRLIntegrationTestHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/xbrl/XBRLIntegrationTestHelper.java @@ -33,17 +33,29 @@ public class XBRLIntegrationTestHelper { private static final String GET_TAXONOMY_LIST_URL = "/fineract-provider/api/v1/mixtaxonomy?" + Utils.TENANT_IDENTIFIER; private static final String TAXONOMY_MAPPING_URL = "/fineract-provider/api/v1/mixmapping?" + Utils.TENANT_IDENTIFIER; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public XBRLIntegrationTestHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public ArrayList getTaxonomyList() { final ArrayList response = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_TAXONOMY_LIST_URL, ""); return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap getTaxonomyMapping() { final HashMap response = Utils.performServerGet(this.requestSpec, this.responseSpec, TAXONOMY_MAPPING_URL, "config"); return response; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/guarantor/GuarantorHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/guarantor/GuarantorHelper.java index e449c567bdd..6ba5a231a01 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/guarantor/GuarantorHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/guarantor/GuarantorHelper.java @@ -33,36 +33,64 @@ public class GuarantorHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public GuarantorHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Integer createGuarantor(final Integer loanId, final String guarantorJSON) { return Utils.performServerPost(this.requestSpec, this.responseSpec, LOAN_URL + loanId + GUARANTOR_API_URL + TENANT, guarantorJSON, CommonConstants.RESPONSE_RESOURCE_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap updateGuarantor(final Integer guarantorId, final Integer loanId, final String guarantorJSON) { return Utils.performServerPut(this.requestSpec, this.responseSpec, LOAN_URL + loanId + GUARANTOR_API_URL + guarantorId + TENANT, guarantorJSON, CommonConstants.RESPONSE_CHANGES); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap deleteGuarantor(final Integer guarantorId, final Integer fundId, final Integer loanId) { return Utils.performServerDelete(this.requestSpec, this.responseSpec, LOAN_URL + loanId + GUARANTOR_API_URL + guarantorId + TENANT + "&guarantorFundingId=" + fundId, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap deleteGuarantor(final Integer guarantorId, final Integer loanId) { return Utils.performServerDelete(this.requestSpec, this.responseSpec, LOAN_URL + loanId + GUARANTOR_API_URL + guarantorId + TENANT, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Object getGuarantor(final Integer guarantorId, final Integer loanId, final String jsonToGetBack) { return Utils.performServerGet(this.requestSpec, this.responseSpec, LOAN_URL + loanId + GUARANTOR_API_URL + guarantorId + TENANT, jsonToGetBack); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public List getAllGuarantor(final Integer loanId) { return Utils.performServerGet(this.requestSpec, this.responseSpec, LOAN_URL + loanId + GUARANTOR_API_URL + TENANT, ""); } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/inlinecob/InlineLoanCOBHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/inlinecob/InlineLoanCOBHelper.java index a9f092d81b0..0b015da05e5 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/inlinecob/InlineLoanCOBHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/inlinecob/InlineLoanCOBHelper.java @@ -33,11 +33,19 @@ public class InlineLoanCOBHelper extends IntegrationTest { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public InlineLoanCOBHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String executeInlineCOB(List<Long> loanIds) { final String EXECUTE_INLINE_COB_API = "/fineract-provider/api/v1/jobs/LOAN_COB/inline"; log.info("------------------EXECUTE INLINE COB----------------------"); @@ -45,6 +53,10 @@ public String executeInlineCOB(List<Long> loanIds) { return Utils.performServerPost(requestSpec, responseSpec, EXECUTE_INLINE_COB_API, buildInlineCOBRequest(loanIds)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String executeInlineCOB(List<Long> loanIds, String responseAttribute) { final String EXECUTE_INLINE_COB_API = "/fineract-provider/api/v1/jobs/LOAN_COB/inline"; log.info("------------------EXECUTE INLINE COB----------------------"); @@ -53,6 +65,10 @@ public String executeInlineCOB(List<Long> loanIds, String responseAttribute) { responseAttribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String buildInlineCOBRequest(List<Long> loanIds) { final HashMap<String, List<Long>> map = new HashMap<>(); map.put("loanIds", loanIds); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/interoperation/InteropHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/interoperation/InteropHelper.java index 22a36c39478..568592ec8f2 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/interoperation/InteropHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/interoperation/InteropHelper.java @@ -66,6 +66,10 @@ public class InteropHelper { private final BigDecimal amount; private final BigDecimal fee; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public InteropHelper(RequestSpecification requestSpec, ResponseSpecification responseSpec, String tenantId, String accountExternalId, String transactionCode, String currency, BigDecimal amount, BigDecimal fee) { this.requestSpec = requestSpec; @@ -78,11 +82,19 @@ public InteropHelper(RequestSpecification requestSpec, ResponseSpecification res this.fee = fee; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public InteropHelper(RequestSpecification requestSpec, ResponseSpecification responseSpec, String accountExternalId, String transactionCode) { this(requestSpec, responseSpec, Utils.DEFAULT_TENANT, accountExternalId, transactionCode, "TZS", BigDecimal.TEN, BigDecimal.ONE); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public InteropHelper(RequestSpecification requestSpec, ResponseSpecification responseSpec) { this(requestSpec, responseSpec, UUID.randomUUID().toString(), UUID.randomUUID().toString()); } @@ -134,6 +146,10 @@ private String buildUrl(String url) { /** * @return response json */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getHealth() { String url = buildUrl(HEALTH_URL); LOG.debug("Calling Interoperable GET Health: {}", url); @@ -146,6 +162,10 @@ public String getHealth() { /** * @return response 'accountId' attribute */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getParty(InteropIdentifierType idType, String idValue) { String url = buildUrl(PARTIES_URL + '/' + idType + '/' + idValue); LOG.debug("Calling Interoperable GET Party: {}", url); @@ -158,6 +178,10 @@ public String getParty(InteropIdentifierType idType, String idValue) { /** * @return response 'accountId' attribute */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String postParty(InteropIdentifierType idType, String idValue) { String url = buildUrl(PARTIES_URL + '/' + idType + '/' + idValue); String request = buildPartiesJson(); @@ -171,6 +195,10 @@ public String postParty(InteropIdentifierType idType, String idValue) { /** * @return response 'accountId' attribute */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String deleteParty(InteropIdentifierType idType, String idValue) { String url = buildUrl(PARTIES_URL + '/' + idType + '/' + idValue); String request = buildPartiesJson(); @@ -181,6 +209,10 @@ public String deleteParty(InteropIdentifierType idType, String idValue) { return getJsonAttribute(response, InteropUtil.PARAM_ACCOUNT_ID); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String buildPartiesJson() { HashMap<String, Object> map = new HashMap<>(); map.put(InteropUtil.PARAM_ACCOUNT_ID, accountExternalId); @@ -190,6 +222,10 @@ private String buildPartiesJson() { /** * @return response 'requestCode' attribute */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getTransactionRequest(String requestCode) { String url = buildUrl(TRANSACTIONS_URL + '/' + transactionCode + '/' + REQUESTS_URL_PARAM + '/' + requestCode); LOG.debug("Calling Interoperable GET Request: {}", url); @@ -204,6 +240,10 @@ public String getTransactionRequest(String requestCode) { * PAYEE role is not valid for transaction request * @return response json */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String postTransactionRequest(String requestCode, InteropTransactionRole role) { String url = buildUrl(REQUESTS_URL); String request = buildTransactionRequestJson(requestCode, role); @@ -214,6 +254,10 @@ public String postTransactionRequest(String requestCode, InteropTransactionRole return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String postTransactionRequest(String requestCode, InteropTransactionRole role, String request) { String url = buildUrl(REQUESTS_URL); LOG.debug("Calling Interoperable POST Request: {}, body: {}", url, request); @@ -223,6 +267,10 @@ public String postTransactionRequest(String requestCode, InteropTransactionRole return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String buildTransactionRequestJson(String requestCode, InteropTransactionRole role) { HashMap<String, Object> map = new HashMap<>(); map.put(InteropUtil.PARAM_TRANSACTION_CODE, transactionCode); @@ -247,6 +295,10 @@ private String buildTransactionRequestJson(String requestCode, InteropTransactio /** * @return response 'quoteCode' attribute */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getQuote(String quoteCode) { String url = buildUrl(TRANSACTIONS_URL + '/' + transactionCode + '/' + QUOTES_URL_PARAM + '/' + quoteCode); LOG.debug("Calling Interoperable GET Quote: {}", url); @@ -259,6 +311,10 @@ public String getQuote(String quoteCode) { /** * @return response json */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String postQuote(String quoteCode, InteropTransactionRole role) { String url = buildUrl(QUOTES_URL); String request = buildQuoteJson(quoteCode, role); @@ -269,6 +325,10 @@ public String postQuote(String quoteCode, InteropTransactionRole role) { return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String buildQuoteJson(String quoteCode, InteropTransactionRole role) { HashMap<String, Object> map = new HashMap<>(); map.put(InteropUtil.PARAM_TRANSACTION_CODE, transactionCode); @@ -295,6 +355,10 @@ private String buildQuoteJson(String quoteCode, InteropTransactionRole role) { /** * @return response 'transferCode' attribute */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String getTransfer(String transferCode) { String url = buildUrl(TRANSACTIONS_URL + '/' + transactionCode + '/' + TRANSFERS_URL_PARAM + '/' + transferCode); LOG.debug("Calling Interoperable GET Transfer: {}", url); @@ -307,6 +371,10 @@ public String getTransfer(String transferCode) { /** * @return response json */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String prepareTransfer(String transferCode) { return postTransfer(transferCode, InteropTransferActionType.PREPARE, InteropTransactionRole.PAYER); } @@ -314,6 +382,10 @@ public String prepareTransfer(String transferCode) { /** * @return response json */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String createTransfer(String transferCode, InteropTransactionRole role) { return postTransfer(transferCode, InteropTransferActionType.CREATE, role); } @@ -321,6 +393,10 @@ public String createTransfer(String transferCode, InteropTransactionRole role) { /** * @return response json */ + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String postTransfer(String transferCode, InteropTransferActionType action, InteropTransactionRole role) { String url = buildUrl(TRANSFERS_URL) + '&' + PARAM_TRANSFER_ACTION + '=' + action; String request = buildTransferJson(transferCode, role); @@ -331,6 +407,10 @@ public String postTransfer(String transferCode, InteropTransferActionType action return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public String postTransferMissingAction(String transferCode, InteropTransactionRole role) { String url = buildUrl(TRANSFERS_URL); String request = buildTransferJson(transferCode, role); @@ -341,6 +421,10 @@ public String postTransferMissingAction(String transferCode, InteropTransactionR return response; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private String buildTransferJson(String transferCode, InteropTransactionRole role) { HashMap<String, Object> map = new HashMap<>(); map.put(InteropUtil.PARAM_TRANSACTION_CODE, transactionCode); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/organization/teller/CashierTransactionsHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/organization/teller/CashierTransactionsHelper.java index 9b853b30ed4..7d3f8ef4bf4 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/organization/teller/CashierTransactionsHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/organization/teller/CashierTransactionsHelper.java @@ -39,6 +39,10 @@ public class CashierTransactionsHelper extends IntegrationTest { private static final String CREATE_TELLER_URL = "/fineract-provider/api/v1/tellers"; private static final Logger LOG = LoggerFactory.getLogger(CashierTransactionsHelper.class); + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public CashierTransactionsHelper(final RequestSpecification requestSpecification, final ResponseSpecification responseSpecification) { this.requestSpecification = requestSpecification; this.responseSpecification = responseSpecification; @@ -55,10 +59,18 @@ public GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse getTel sortOrder)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createTeller(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return (Integer) createTellerWithJson(requestSpec, responseSpec, createTellerAsJSON()).get("resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> createTellerWithJson(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String json) { @@ -66,6 +78,10 @@ public static Map<String, Object> createTellerWithJson(final RequestSpecificatio return Utils.performServerPost(requestSpec, responseSpec, url, json, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createTellerAsJSON() { final Map<String, Object> map = getMapWithStartDate(); @@ -79,6 +95,10 @@ public static String createTellerAsJSON() { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> getMapWithStartDate() { HashMap<String, Object> map = new HashMap<>(); @@ -89,6 +109,10 @@ public static Map<String, Object> getMapWithStartDate() { return map; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createCashier(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return (Integer) createCashierWithJson(requestSpec, responseSpec, createCashierAsJSON()).get("resourceId"); } @@ -99,6 +123,10 @@ public static Map<String, Object> createCashierWithJson(final RequestSpecificati return Utils.performServerPost(requestSpec, responseSpec, url, json, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createCashierAsJSON() { final Map<String, Object> map = getMapWithDates(); @@ -109,6 +137,10 @@ public static String createCashierAsJSON() { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Map<String, Object> getMapWithDates() { HashMap<String, Object> map = new HashMap<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/support/instancemode/InstanceModeHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/support/instancemode/InstanceModeHelper.java index 584d989aeef..c32072b0cf9 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/support/instancemode/InstanceModeHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/support/instancemode/InstanceModeHelper.java @@ -30,6 +30,10 @@ public class InstanceModeHelper { private static final Gson GSON = new JSON().getGson(); + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static void changeMode(RequestSpecification requestSpec, ResponseSpecification responseSpec, boolean readEnabled, boolean writeEnabled, boolean batchWorkerEnabled, boolean batchManagerEnabled) { ChangeInstanceModeRequest request = new ChangeInstanceModeRequest().readEnabled(readEnabled).writeEnabled(writeEnabled) diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/useradministration/roles/RolesHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/useradministration/roles/RolesHelper.java index f71cc48a265..efd5ec69943 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/useradministration/roles/RolesHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/useradministration/roles/RolesHelper.java @@ -49,10 +49,18 @@ public RolesHelper() { private static final Gson GSON = new JSON().getGson(); + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createRole(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_ROLE_URL, getTestCreateRoleAsJSON(), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestCreateRoleAsJSON() { final HashMap<String, String> map = new HashMap<>(); map.put("name", Utils.uniqueRandomStringGenerator("Role_Name_", 5)); @@ -60,33 +68,57 @@ public static String getTestCreateRoleAsJSON() { return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static HashMap<String, Object> getRoleDetails(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer roleId) { final String GET_ROLE_URL = "/fineract-provider/api/v1/roles/" + roleId + "?" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, GET_ROLE_URL, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer disableRole(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer roleId) { return Utils.performServerPost(requestSpec, responseSpec, createRoleOperationURL(DISABLE_ROLE_COMMAND, roleId), "", "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer enableRole(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer roleId) { return Utils.performServerPost(requestSpec, responseSpec, createRoleOperationURL(ENABLE_ROLE_COMMAND, roleId), "", "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer deleteRole(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer roleId) { return Utils.performServerDelete(requestSpec, responseSpec, createRoleOperationURL(ENABLE_ROLE_COMMAND, roleId), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String addPermissionsToRole(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer roleId, final Map<String, Boolean> permissionMap) { return Utils.performServerPut(requestSpec, responseSpec, ROLE_URL + "/" + roleId + "/permissions?" + Utils.TENANT_IDENTIFIER, getAddPermissionsToRoleJSON(permissionMap)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static List<PermissionData> getPermissions(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, boolean makerCheckerable) { String response = Utils.performServerGet(requestSpec, responseSpec, @@ -99,12 +131,20 @@ public CommandProcessingResult updatePermissions(PutPermissionsRequest request) return ok(fineract().permissions.updatePermissionsDetails(request)); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String getAddPermissionsToRoleJSON(Map<String, Boolean> permissionMap) { final HashMap<String, Map<String, Boolean>> map = new HashMap<>(); map.put("permissions", permissionMap); return new Gson().toJson(map); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String createRoleOperationURL(final String command, final Integer roleId) { return ROLE_URL + "/" + roleId + "?command=" + command + "&" + Utils.TENANT_IDENTIFIER; } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/useradministration/users/UserHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/useradministration/users/UserHelper.java index eca6a0bea93..beae37c6026 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/useradministration/users/UserHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/useradministration/users/UserHelper.java @@ -51,23 +51,39 @@ public final class UserHelper { private UserHelper() {} + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer createUser(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, int roleId, int staffId) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_USER_URL, getTestCreateUserAsJSON(roleId, staffId), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object createUser(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, int roleId, int staffId, String username, String attribute) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_USER_URL, getTestCreateUserAsJSON(roleId, staffId, username), attribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object createUser(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, int roleId, int staffId, String username, String password, String attribute) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_USER_URL, getTestCreateUserAsJSON(roleId, staffId, username, password), attribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostUsersResponse createUser(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, PostUsersRequest request) { String requestBody = GSON.toJson(request); @@ -75,6 +91,10 @@ public static PostUsersResponse createUser(final RequestSpecification requestSpe return GSON.fromJson(response, PostUsersResponse.class); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static JsonObject createUserWithJsonResponse(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, PostUsersRequest request) { String requestBody = GSON.toJson(request); @@ -82,12 +102,20 @@ public static JsonObject createUserWithJsonResponse(final RequestSpecification r return JsonParser.parseString(jsonResponse).getAsJsonObject(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object createUserForSelfService(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, int roleId, int staffId, int clientId, String attribute) { return Utils.performServerPost(requestSpec, responseSpec, CREATE_USER_URL, getTestCreateUserAsJSONForSelfService(roleId, staffId, clientId), attribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer getUserId(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, String userName) { String json = Utils.performServerGet(requestSpec, responseSpec, CREATE_USER_URL, null); Assertions.assertNotNull(json); @@ -102,6 +130,10 @@ public static Integer getUserId(final RequestSpecification requestSpec, final Re return null; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestCreateUserAsJSON(int roleId, int staffId) { return "{ \"username\": \"" + Utils.uniqueRandomStringGenerator("User_Name_", 3) + "\", \"firstname\": \"Test\", \"lastname\": \"User\", \"email\": \"whatever@mifos.org\"," @@ -109,12 +141,20 @@ public static String getTestCreateUserAsJSON(int roleId, int staffId) { + "\"], \"sendPasswordToEmail\": false}"; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String getTestCreateUserAsJSON(int roleId, int staffId, String username) { return "{ \"username\": \"" + username + "\", \"firstname\": \"Test\", \"lastname\": \"User\", \"email\": \"whatever@mifos.org\"," + " \"officeId\": \"1\", \"staffId\": " + "\"" + staffId + "\",\"roles\": [\"" + roleId + "\"], \"sendPasswordToEmail\": false}"; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String getTestCreateUserAsJSON(int roleId, int staffId, String username, String password) { return "{ \"username\": \"" + username + "\", \"firstname\": \"Test\", \"lastname\": \"User\", \"email\": \"whatever@mifos.org\"," + " \"officeId\": \"1\", \"staffId\": " + "\"" + staffId + "\",\"roles\": [\"" + roleId @@ -122,11 +162,19 @@ private static String getTestCreateUserAsJSON(int roleId, int staffId, String us + "\"}"; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String getTestUpdateUserAsJSON(String username) { return "{ \"username\": \"" + username + "\", \"firstname\": \"Test\", \"lastname\": \"User\", \"email\": \"whatever@mifos.org\"," + " \"officeId\": \"1\"}"; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String getTestCreateUserAsJSONForSelfService(int roleId, int staffId, int clientId) { return "{ \"username\": \"" + Utils.uniqueRandomStringGenerator("User_Name_", 3) + "\", \"firstname\": \"Test\", \"lastname\": \"User\", \"email\": \"whatever@mifos.org\"," @@ -134,21 +182,37 @@ public static String getTestCreateUserAsJSONForSelfService(int roleId, int staff + "\"], \"sendPasswordToEmail\": false," + "\"isSelfServiceUser\" : true," + "\"clients\" : [\"" + clientId + "\"]}"; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Integer deleteUser(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final Integer userId) { return Utils.performServerDelete(requestSpec, responseSpec, createRoleOperationURL(userId), "resourceId"); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static Object updateUser(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, int userId, String username, String attribute) { return Utils.performServerPut(requestSpec, responseSpec, createRoleOperationURL(userId), getTestUpdateUserAsJSON(username), attribute); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String createRoleOperationURL(final Integer userId) { return USER_URL + "/" + userId + "?" + Utils.TENANT_IDENTIFIER; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static RequestSpecification getSimpleUserWithoutBypassPermission(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { String password = SIMPLE_USER_PASSWORD; @@ -170,6 +234,10 @@ public static RequestSpecification getSimpleUserWithoutBypassPermission(final Re return responseRequestSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static PostUsersRequest buildUserRequest(ResponseSpecification responseSpec, RequestSpecification requestSpec, String password) { Integer roleId = RolesHelper.createRole(requestSpec, responseSpec); String uniqueUsername = Utils.uniqueRandomStringGenerator("TestUser", 4); @@ -180,12 +248,20 @@ public static PostUsersRequest buildUserRequest(ResponseSpecification responseSp .roles(List.of(roleId.longValue())); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static String createSimpleRole(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { Integer roleId = RolesHelper.createRole(requestSpec, responseSpec); addRepaymentPermissionToRole(requestSpec, responseSpec, roleId); return roleId.toString(); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static void addRepaymentPermissionToRole(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, Integer roleId) { HashMap<String, Boolean> permissionMap = new HashMap<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsDecliningBalanceHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsDecliningBalanceHelper.java index 4362e59e3ee..d09a4215b08 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsDecliningBalanceHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsDecliningBalanceHelper.java @@ -39,6 +39,10 @@ public class VariableInstallmentsDecliningBalanceHelper { private static final Logger LOG = LoggerFactory.getLogger(VariableInstallmentsDecliningBalanceHelper.class); + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createLoanProductWithoutVaribleConfig(final boolean multiDisburseLoan, final String accountingRule, final Account... accounts) { LOG.info("------------------------------CREATING NEW LOAN PRODUCT ---------------------------------------"); @@ -56,6 +60,10 @@ public static String createLoanProductWithoutVaribleConfig(final boolean multiDi return loanProductJSON; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createLoanProductWithVaribleConfig(final boolean multiDisburseLoan, final String accountingRule, final Account... accounts) { LOG.info("------------------------------CREATING NEW LOAN PRODUCT ---------------------------------------"); @@ -75,6 +83,10 @@ public static String createLoanProductWithVaribleConfig(final boolean multiDisbu return loanProductJSON; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createLoanProductWithVaribleConfigwithEqualPrincipal(final boolean multiDisburseLoan, final String accountingRule, final Account... accounts) { LOG.info("------------------------------CREATING NEW LOAN PRODUCT ---------------------------------------"); @@ -94,6 +106,10 @@ public static String createLoanProductWithVaribleConfigwithEqualPrincipal(final return loanProductJSON; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String applyForLoanApplication(final Integer clientID, final Integer loanProductID, List<HashMap> charges, final String savingsId, String principal, List<HashMap> collaterals) { LOG.info("--------------------------------APPLYING FOR LOAN APPLICATION--------------------------------"); @@ -114,6 +130,10 @@ public static String applyForLoanApplication(final Integer clientID, final Integ return loanApplicationJSON; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String applyForLoanApplicationWithEqualPrincipal(final Integer clientID, final Integer loanProductID, List<HashMap> charges, final String savingsId, String principal, List<HashMap> collaterals) { LOG.info("--------------------------------APPLYING FOR LOAN APPLICATION--------------------------------"); @@ -134,6 +154,10 @@ public static String applyForLoanApplicationWithEqualPrincipal(final Integer cli return loanApplicationJSON; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createDeleteVariations(ArrayList<Map> deletedInstallments) { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -145,6 +169,10 @@ public static String createDeleteVariations(ArrayList<Map> deletedInstallments) return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createDeletedMap(ArrayList<Map> deletedItems) { ArrayList toReturn = new ArrayList<>(); for (Map map : deletedItems) { @@ -156,6 +184,10 @@ private static ArrayList createDeletedMap(ArrayList<Map> deletedItems) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createAddVariations() { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -167,6 +199,10 @@ public static String createAddVariations() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createNewInstallments() { ArrayList toReturn = new ArrayList<>(); Map tosend = new HashMap(); @@ -176,6 +212,10 @@ private static ArrayList createNewInstallments() { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createModifiyVariations(Map firstSchedule) { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -187,6 +227,10 @@ public static String createModifiyVariations(Map firstSchedule) { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createNewInstallments(String date) { ArrayList toReturn = new ArrayList<>(); Map tosend = new HashMap(); @@ -196,6 +240,10 @@ private static ArrayList createNewInstallments(String date) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createModifyMap(Map firstSchedule) { ArrayList toReturn = new ArrayList<>(); ArrayList dueDate = (ArrayList) firstSchedule.get("dueDate"); @@ -206,6 +254,10 @@ private static ArrayList createModifyMap(Map firstSchedule) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createAllVariations() { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -219,6 +271,10 @@ public static String createAllVariations() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createAllVariationsWithEqualPrincipal() { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -232,6 +288,10 @@ public static String createAllVariationsWithEqualPrincipal() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createNewInstallmentsWithPrincipal(String date) { ArrayList toReturn = new ArrayList<>(); Map tosend = new HashMap(); @@ -241,6 +301,10 @@ private static ArrayList createNewInstallmentsWithPrincipal(String date) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createModifyMapWithPrinciapl(String date) { ArrayList toReturn = new ArrayList<>(); Map tosend = new HashMap(); @@ -250,6 +314,10 @@ private static ArrayList createModifyMapWithPrinciapl(String date) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createDeletedMap(String date) { ArrayList toReturn = new ArrayList<>(); Map tosend = new HashMap(); @@ -258,6 +326,10 @@ private static ArrayList createDeletedMap(String date) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createModifyMap(String date) { ArrayList toReturn = new ArrayList<>(); Map tosend = new HashMap(); @@ -267,6 +339,10 @@ private static ArrayList createModifyMap(String date) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createModifiyDateVariations(String[] date, String[] newdate, String[] principal) { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -278,6 +354,10 @@ public static String createModifiyDateVariations(String[] date, String[] newdate return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createDateModifyMap(String[] date, String[] newdate, String[] installments) { ArrayList toReturn = new ArrayList<>(); for (int i = 0; i < date.length; i++) { @@ -292,6 +372,10 @@ private static ArrayList createDateModifyMap(String[] date, String[] newdate, St return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String formatDate(ArrayList list) { Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, (int) list.get(0)); @@ -306,6 +390,10 @@ public Map<String, Object> createModifyVarations() { return null; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<Map> constructVerifyData(String[] dates, String[] installments) { ArrayList<Map> toReturn = new ArrayList<>(); for (int i = 0; i < dates.length; i++) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsFlatHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsFlatHelper.java index 6c9c1dc3b0e..642203754cc 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsFlatHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsFlatHelper.java @@ -39,6 +39,10 @@ public class VariableInstallmentsFlatHelper { private static final Logger LOG = LoggerFactory.getLogger(VariableInstallmentsFlatHelper.class); + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createLoanProductWithVaribleConfig(final boolean multiDisburseLoan, final String accountingRule, final Account... accounts) { LOG.info("------------------------------CREATING NEW LOAN PRODUCT ---------------------------------------"); @@ -56,6 +60,10 @@ public static String createLoanProductWithVaribleConfig(final boolean multiDisbu return loanProductJSON; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String applyForLoanApplication(final Integer clientID, final Integer loanProductID, List<HashMap> charges, final String savingsId, String principal, List<HashMap> collaterals) { LOG.info("--------------------------------APPLYING FOR LOAN APPLICATION--------------------------------"); @@ -76,6 +84,10 @@ public static String applyForLoanApplication(final Integer clientID, final Integ return loanApplicationJSON; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createDeleteVariations(ArrayList<Map> deletedInstallments) { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -87,6 +99,10 @@ public static String createDeleteVariations(ArrayList<Map> deletedInstallments) return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createDeletedMap(ArrayList<Map> deletedItems) { ArrayList toReturn = new ArrayList<>(); for (Map map : deletedItems) { @@ -98,6 +114,10 @@ private static ArrayList createDeletedMap(ArrayList<Map> deletedItems) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createAddVariations() { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -109,6 +129,10 @@ public static String createAddVariations() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createNewInstallments() { ArrayList toReturn = new ArrayList<>(); Map tosend = new HashMap(); @@ -118,6 +142,10 @@ private static ArrayList createNewInstallments() { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createModifiyVariations(Map firstSchedule) { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -129,6 +157,10 @@ public static String createModifiyVariations(Map firstSchedule) { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createNewInstallments(String date) { ArrayList toReturn = new ArrayList<>(); Map tosend = new HashMap(); @@ -138,6 +170,10 @@ private static ArrayList createNewInstallments(String date) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createModifiyDateVariations(String[] date, String[] newdate, String[] principal) { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -149,6 +185,10 @@ public static String createModifiyDateVariations(String[] date, String[] newdate return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createDateModifyMap(String[] date, String[] newdate, String[] principal) { ArrayList toReturn = new ArrayList<>(); for (int i = 0; i < date.length; i++) { @@ -163,6 +203,10 @@ private static ArrayList createDateModifyMap(String[] date, String[] newdate, St return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createModifyMap(Map firstSchedule) { ArrayList toReturn = new ArrayList<>(); ArrayList dueDate = (ArrayList) firstSchedule.get("dueDate"); @@ -173,6 +217,10 @@ private static ArrayList createModifyMap(Map firstSchedule) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String createAllVariations() { Map<String, Object> toReturn = new HashMap<>(); toReturn.put("locale", "en"); @@ -186,6 +234,10 @@ public static String createAllVariations() { return json; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createDeletedMap(String date) { ArrayList toReturn = new ArrayList<>(); Map tosend = new HashMap(); @@ -194,6 +246,10 @@ private static ArrayList createDeletedMap(String date) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) private static ArrayList createModifyMap(String date) { ArrayList toReturn = new ArrayList<>(); Map tosend = new HashMap(); @@ -203,6 +259,10 @@ private static ArrayList createModifyMap(String date) { return toReturn; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static String formatDate(ArrayList list) { Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, (int) list.get(0)); @@ -213,10 +273,18 @@ public static String formatDate(ArrayList list) { return requiredFormat.format(date); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Map<String, Object> createModifyVarations() { return null; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public static ArrayList<Map> constructVerifyData(String[] dates, String[] installments) { ArrayList<Map> toReturn = new ArrayList<>(); for (int i = 0; i < dates.length; i++) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableIntallmentsTransactionHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableIntallmentsTransactionHelper.java index 377be6b6b67..60070b835dc 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableIntallmentsTransactionHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/variableinstallments/VariableIntallmentsTransactionHelper.java @@ -34,21 +34,37 @@ public class VariableIntallmentsTransactionHelper { private final RequestSpecification requestSpec; private final ResponseSpecification responseSpec; + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public VariableIntallmentsTransactionHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { this.requestSpec = requestSpec; this.responseSpec = responseSpec; } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public Map retrieveSchedule(Integer loanId) { String url = URL + loanId + "?associations=repaymentSchedule&exclude=guarantors&" + Utils.TENANT_IDENTIFIER; return Utils.performServerGet(requestSpec, responseSpec, url, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap validateVariations(final String exceptions, Integer loanId) { String url = URL + loanId + "/schedule?command=calculateLoanSchedule&" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(this.requestSpec, this.responseSpec, url, exceptions, ""); } + // TODO: Rewrite to use fineract-client instead! + // Example: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long, + // org.apache.fineract.client.models.PostLoansLoanIdRequest) + @Deprecated(forRemoval = true) public HashMap submitVariations(final String exceptions, Integer loanId) { String url = URL + loanId + "/schedule?command=addVariations&" + Utils.TENANT_IDENTIFIER; return Utils.performServerPost(this.requestSpec, this.responseSpec, url, exceptions, "");