From f88c244053facdc512181b852841bbed9aedb652 Mon Sep 17 00:00:00 2001 From: thesmallstar Date: Thu, 11 Jun 2020 05:11:16 +0530 Subject: [PATCH] FINERACT-821 Added and Enforced AnnotationLocation(2) Checkstyle --- fineract-provider/config/checkstyle/checkstyle.xml | 7 ++++--- .../api/EntityFieldConfigurationApiResources.java | 4 ++-- .../api/SelfShareAccountsApiResource.java | 10 +++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/fineract-provider/config/checkstyle/checkstyle.xml b/fineract-provider/config/checkstyle/checkstyle.xml index e7e3ef470..510b3d76b 100644 --- a/fineract-provider/config/checkstyle/checkstyle.xml +++ b/fineract-provider/config/checkstyle/checkstyle.xml @@ -61,6 +61,9 @@ + + + @@ -239,9 +242,7 @@ - - - + diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResources.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResources.java index f1b77f5a8..4f52d8f3e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResources.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResources.java @@ -87,8 +87,8 @@ public class EntityFieldConfigurationApiResources { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(httpMethod = "GET", value = "Retrieves the Entity Field Configuration", notes = "It retrieves all the Entity Field Configuration") - @ApiResponses({@ApiResponse(code = 200, message = "OK", response = EntityFieldConfigurationApiResourcesSwagger.GetFieldConfigurationEntityResponse.class, responseContainer = "List")}) + @ApiOperation(httpMethod = "GET", value = "Retrieves the Entity Field Configuration", notes = "It retrieves all the Entity Field Configuration") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = EntityFieldConfigurationApiResourcesSwagger.GetFieldConfigurationEntityResponse.class, responseContainer = "List")}) public String getAddresses(@PathParam("entity") @ApiParam(value = "entity") final String entityname, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResource.java index 3042e1a7f..a27c440e3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResource.java @@ -110,11 +110,11 @@ public class SelfShareAccountsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Retrieve Share Account Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + + @ApiOperation(value = "Retrieve Share Account Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "Field Defaults\n" + "\n"+ "Allowed Value Lists\n" + "\n"+ "\n"+ "Arguments\n"+ "\n"+ "clientId:Integer mandatory\n"+ "productId:Integer optionalIf entered, productId, productName and selectedProduct fields are returned.\n"+ "Example Requests:\n" + "\n" + "self/shareaccounts/template?clientId=14\n" + "\n" + "self/shareaccounts/template?clientId=14&productId=3\n") - @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfShareAccountsApiResourceSwagger.GetShareAccountsClientIdProductIdResponse.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfShareAccountsApiResourceSwagger.GetShareAccountsClientIdProductIdResponse.class)}) public String template(@QueryParam("clientId") @ApiParam("clientId") final Long clientId, @QueryParam("productId") @ApiParam("productId") final Long productId, @Context final UriInfo uriInfo) { @@ -140,8 +140,8 @@ public class SelfShareAccountsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Submit new share application", httpMethod = "POST", notes = "Mandatory fields:\n" + "\n" + "clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate\n" + "\n" + "\n" + "Optional Fields\n" + "\n" + "accountNo, externalId\n" + "\n" + "\n" + "Inherited from Product (if not provided)\n" + "\n" + "minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType.") - @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfShareAccountsApiResourceSwagger.PostNewShareApplicationResponse.class)}) + @ApiOperation(value = "Submit new share application", httpMethod = "POST", notes = "Mandatory fields:\n" + "\n" + "clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate\n" + "\n" + "\n" + "Optional Fields\n" + "\n" + "accountNo, externalId\n" + "\n" + "\n" + "Inherited from Product (if not provided)\n" + "\n" + "minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType.") + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfShareAccountsApiResourceSwagger.PostNewShareApplicationResponse.class)}) public String createAccount(final String apiRequestBodyAsJson) { HashMap attr = this.selfShareAccountsDataValidator .validateShareAccountApplication(apiRequestBodyAsJson); @@ -155,7 +155,7 @@ public class SelfShareAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Retrieve a share application/account", httpMethod = "GET", notes = "\n" + + @ApiOperation(value = "Retrieve a share application/account", httpMethod = "GET", notes = "\n" + "\n" + "\n" + "Example Requests:\n" + "\n" + "self/shareaccounts/12\n") // TODO actually write SelfShareAccountsApiResourceSwagger.GetShareAccountResponse (it currently does not exist) // @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfShareAccountsApiResourceSwagger.GetShareAccountResponse.class)})