Skip to content

Commit 0ff03f4

Browse files
committed
FINERACT-2679: Ensure backward compatible fineract-client method names - Part 2
1 parent ca354b4 commit 0ff03f4

108 files changed

Lines changed: 594 additions & 23 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import org.apache.fineract.commands.domain.CommandWrapper;
4747
import org.apache.fineract.commands.service.CommandWrapperBuilder;
4848
import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
49+
import org.apache.fineract.infrastructure.core.annotation.AlternativeOperationId;
4950
import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
5051
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
5152
import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
@@ -85,6 +86,7 @@ public class GLClosuresApiResource {
8586
Example Requests:
8687
8788
glclosures""")
89+
@AlternativeOperationId("retrieveAllClosures")
8890
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = GLClosuresApiResourceSwagger.GetGlClosureResponse.class))))
8991
public List<GLClosureData> retrieveAllClosures(@QueryParam("officeId") @Parameter(name = "officeId") final Long officeId) {
9092

@@ -102,6 +104,7 @@ public List<GLClosureData> retrieveAllClosures(@QueryParam("officeId") @Paramete
102104
103105
104106
/glclosures/1?fields=officeName,closingDate""")
107+
@AlternativeOperationId("retreiveClosure")
105108
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.GetGlClosureResponse.class)))
106109
public GLClosureData retreiveClosure(@PathParam("glClosureId") @Parameter(description = "glClosureId") final Long glClosureId,
107110
@Context final UriInfo uriInfo) {

fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import org.apache.fineract.commands.domain.CommandWrapper;
4646
import org.apache.fineract.commands.service.CommandWrapperBuilder;
4747
import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
48+
import org.apache.fineract.infrastructure.core.annotation.AlternativeOperationId;
4849
import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
4950
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
5051
import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
@@ -119,6 +120,7 @@ public FinancialActivityAccountData retreive(@PathParam("mappingId") @Parameter(
119120
@Operation(summary = "Create a new Financial Activity to Accounts Mapping", operationId = "createGLAccountMappingFinancialActivityAccount", description = """
120121
Mandatory Fields
121122
financialActivityId, glAccountId""")
123+
@AlternativeOperationId("createGLAccount")
122124
@RequestBody(content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsRequest.class)))
123125
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsResponse.class)))
124126
public CommandProcessingResult createGLAccount(@Parameter(hidden = true) FinancialActivityAccRequest activityAccRequest) {
@@ -133,6 +135,7 @@ public CommandProcessingResult createGLAccount(@Parameter(hidden = true) Financi
133135
@Consumes({ MediaType.APPLICATION_JSON })
134136
@Produces({ MediaType.APPLICATION_JSON })
135137
@Operation(summary = "Update a Financial Activity to Account Mapping", operationId = "updateGLAccountMappingFinancialActivityAccount", description = "the API updates the Ledger account linked to a Financial Activity")
138+
@AlternativeOperationId("updateGLAccount")
136139
@RequestBody(content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsRequest.class)))
137140
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PutFinancialActivityAccountsResponse.class)))
138141
public CommandProcessingResult updateGLAccount(@PathParam("mappingId") @Parameter(description = "mappingId") final Long mappingId,
@@ -147,6 +150,7 @@ public CommandProcessingResult updateGLAccount(@PathParam("mappingId") @Paramete
147150
@Path("{mappingId}")
148151
@Produces({ MediaType.APPLICATION_JSON })
149152
@Operation(summary = "Delete a Financial Activity to Account Mapping", operationId = "deleteGLAccountMappingFinancialActivityAccount")
153+
@AlternativeOperationId("deleteGLAccount")
150154
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.DeleteFinancialActivityAccountsResponse.class)))
151155
public CommandProcessingResult deleteGLAccount(@PathParam("mappingId") @Parameter(description = "mappingId") final Long mappingId) {
152156
final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteOfficeToGLAccountMapping(mappingId).build();

fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
import org.apache.fineract.infrastructure.bulkimport.service.BulkImportWorkbookService;
5959
import org.apache.fineract.infrastructure.codes.data.CodeValueData;
6060
import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService;
61+
import org.apache.fineract.infrastructure.core.annotation.AlternativeOperationId;
6162
import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
6263
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
6364
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
@@ -184,6 +185,7 @@ public GLAccountData retreiveAccount(@PathParam("glAccountId") @Parameter(descri
184185
Mandatory Fields:
185186
name, glCode, type, usage and manualEntriesAllowed
186187
""")
188+
@AlternativeOperationId("createGLAccount_1")
187189
@RequestBody(content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PostGLAccountsRequest.class)))
188190
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PostGLAccountsResponse.class)))
189191
public CommandProcessingResult createGLAccount(@Parameter(hidden = true) GLAccountCommand glAccountCommand) {
@@ -198,6 +200,7 @@ public CommandProcessingResult createGLAccount(@Parameter(hidden = true) GLAccou
198200
@Produces({ MediaType.APPLICATION_JSON })
199201
@Operation(tags = {
200202
"General Ledger Account" }, summary = "Update a GL Account", operationId = "updateGLAccount", description = "Updates a GL Account")
203+
@AlternativeOperationId("updateGLAccount_1")
201204
@RequestBody(content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PutGLAccountsRequest.class)))
202205
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PutGLAccountsResponse.class)))
203206
public CommandProcessingResult updateGLAccount(@PathParam("glAccountId") @Parameter(description = "glAccountId") final Long glAccountId,
@@ -212,6 +215,7 @@ public CommandProcessingResult updateGLAccount(@PathParam("glAccountId") @Parame
212215
@Produces({ MediaType.APPLICATION_JSON })
213216
@Operation(tags = {
214217
"General Ledger Account" }, summary = "Delete a GL Account", operationId = "deleteGLAccount", description = "Deletes a GL Account")
218+
@AlternativeOperationId("deleteGLAccount_1")
215219
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.DeleteGLAccountsResponse.class)))
216220
public CommandProcessingResult deleteGLAccount(
217221
@PathParam("glAccountId") @Parameter(description = "glAccountId") final Long glAccountId) {

fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import org.apache.fineract.commands.domain.CommandWrapper;
4545
import org.apache.fineract.commands.service.CommandWrapperBuilder;
4646
import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
47+
import org.apache.fineract.infrastructure.core.annotation.AlternativeOperationId;
4748
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
4849
import org.apache.fineract.infrastructure.core.exception.UnrecognizedQueryParamException;
4950
import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
@@ -110,6 +111,7 @@ public CommandProcessingResult modifyProvisioningEntry(@PathParam("entryId") @Pa
110111
@Path("{entryId}")
111112
@Produces({ MediaType.APPLICATION_JSON })
112113
@Operation(summary = "Retrieves a Provisioning Entry Metadata", operationId = "retrieveOneProvisioningEntry", description = "Returns the metadata of a generated Provisioning Entry.")
114+
@AlternativeOperationId("retrieveProvisioningEntry")
113115
public ProvisioningEntryData retrieveProvisioningEntry(@PathParam("entryId") @Parameter(description = "entryId") final Long entryId) {
114116
platformSecurityContext.authenticatedUser();
115117
return provisioningEntriesReadPlatformService.retrieveProvisioningEntryData(entryId);
@@ -119,6 +121,7 @@ public ProvisioningEntryData retrieveProvisioningEntry(@PathParam("entryId") @Pa
119121
@Path("entries")
120122
@Produces({ MediaType.APPLICATION_JSON })
121123
@Operation(summary = "Retrieve Provisioning Entries Loan Products Given a Query", operationId = "retrieveProvisioningEntriesLoanProducts")
124+
@AlternativeOperationId("retrieveProviioningEntries")
122125
public Page<LoanProductProvisioningEntryData> retrieveProviioningEntries(@QueryParam("entryId") final Long entryId,
123126
@QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit,
124127
@QueryParam("officeId") final Long officeId, @QueryParam("productId") final Long productId,

fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
5656
import org.apache.fineract.infrastructure.codes.data.CodeValueData;
5757
import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService;
58+
import org.apache.fineract.infrastructure.core.annotation.AlternativeOperationId;
5859
import org.apache.fineract.infrastructure.core.api.ApiParameterHelper;
5960
import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
6061
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
@@ -102,6 +103,7 @@ public class AccountingRuleApiResource {
102103
Example Request:
103104
104105
accountingrules/template""")
106+
@AlternativeOperationId("retrieveTemplate_1")
105107
public AccountingRuleData retrieveTemplate() {
106108
context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSION);
107109
return handleTemplate(null);
@@ -136,6 +138,7 @@ public List<AccountingRuleData> retrieveAllAccountingRules(@Context final UriInf
136138
Example Requests:
137139
138140
accountingrules/1""")
141+
@AlternativeOperationId("retreiveAccountingRule")
139142
public AccountingRuleData retreiveAccountingRule(
140143
@PathParam("accountingRuleId") @Parameter(description = "accountingRuleId") final Long accountingRuleId,
141144
@Context final UriInfo uriInfo) {

fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/CashierApiResource.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.time.format.DateTimeFormatter;
3030
import java.util.Collection;
3131
import lombok.RequiredArgsConstructor;
32+
import org.apache.fineract.infrastructure.core.annotation.AlternativeOperationId;
3233
import org.apache.fineract.infrastructure.core.service.DateUtils;
3334
import org.apache.fineract.organisation.teller.data.CashierData;
3435
import org.apache.fineract.organisation.teller.service.TellerManagementReadPlatformService;
@@ -45,6 +46,7 @@ public class CashierApiResource {
4546
@GET
4647
@Produces(MediaType.APPLICATION_JSON)
4748
@Operation(summary = "List Cashiers", operationId = "retrieveAllCashiers")
49+
@AlternativeOperationId("getCashierData")
4850
public Collection<CashierData> getCashierData(@QueryParam("officeId") final Long officeId, @QueryParam("tellerId") final Long tellerId,
4951
@QueryParam("staffId") final Long staffId, @QueryParam("date") final String date) {
5052
final LocalDate dateRestriction = date != null ? LocalDate.parse(date, DateTimeFormatter.BASIC_ISO_DATE)

0 commit comments

Comments
 (0)