[GitHub] [fineract] percyashu commented on a change in pull request #1184: FINERACT-1089 removing the rs.previous()

2020-09-22 Thread GitBox


percyashu commented on a change in pull request #1184:
URL: https://github.com/apache/fineract/pull/1184#discussion_r493177869



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java
##
@@ -305,12 +305,8 @@ public DepositAccountInterestRateChartSlabData 
extractData(ResultSet rs) throws
 if (incentiveData != null) {
 chartSlabData.addIncentives(incentiveData);
 }
-} else {
-rs.previous();

Review comment:
   @vorburger Yeah I will make time, just the issues of setting up a test 
case to ensure the output stays unchanged and if you can confirm the functional 
knowledge of the data model.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1343: Update dependency org.mock-server:mockserver-junit-jupiter to v5.11.1

2020-09-22 Thread GitBox


vorburger commented on pull request #1343:
URL: https://github.com/apache/fineract/pull/1343#issuecomment-696918717


   #1341 dupe



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger merged pull request #1320: Change OAuth doc in apiLive.htm (FINERACT-629)

2020-09-22 Thread GitBox


vorburger merged pull request #1320:
URL: https://github.com/apache/fineract/pull/1320


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract-cn-payroll] xurror merged pull request #15: Auto update with renovate

2020-09-22 Thread GitBox


xurror merged pull request #15:
URL: https://github.com/apache/fineract-cn-payroll/pull/15


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] thesmallstar commented on pull request #1251: FINERACT-1095 Added status parameter in Loans API

2020-09-22 Thread GitBox


thesmallstar commented on pull request #1251:
URL: https://github.com/apache/fineract/pull/1251#issuecomment-696933182


   @vorburger  yes already working on it!



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on a change in pull request #1290: Added and Enforced AbbreviationAsWordInName Checkstyle (FINERACT-821)

2020-09-22 Thread GitBox


vorburger commented on a change in pull request #1290:
URL: https://github.com/apache/fineract/pull/1290#discussion_r492973111



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResourceSwagger.java
##
@@ -24,7 +24,7 @@
 /**
  * Created by sanyam on 23/8/17.
  */
-@SuppressWarnings({ "MemberName" })
+@SuppressWarnings({ "MemberName", "AbbreviationAsWordInName" })

Review comment:
   here it's probably OK, because you can't change it, as it's already part 
of the external Swagger API? But then it's worth to document it like this:
   
   ```suggestion
   // Cannot change names of public API without breaking backwards compatibility
   @SuppressWarnings({ "MemberName", "AbbreviationAsWordInName" })
   ```

##
File path: 
fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientSavingsIntegrationTest.java
##
@@ -60,7 +60,7 @@
 /**
  * Client Savings Integration Test for checking Savings Application.
  */
-@SuppressWarnings({ "rawtypes" })
+@SuppressWarnings({ "rawtypes", "AbbreviationAsWordInName" })

Review comment:
   are there many problems in this test, would it be hard to also fix this, 
just so that it's nice?

##
File path: 
fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
##
@@ -65,7 +65,7 @@
  * Client Loan Integration Test for checking Loan Application Repayments 
Schedule, loan charges, penalties, loan
  * repayments and verifying accounting transactions
  */
-@SuppressWarnings({ "rawtypes", "unchecked" })
+@SuppressWarnings({ "rawtypes", "unchecked", "AbbreviationAsWordInName" })
 public class ClientLoanIntegrationTest {

Review comment:
   @thesmallstar I would actually have to agree with @ptuomola that if just 
a little bit more work, it would be nice to finish this up.. but it depends on 
the effort, of course. How about we agree that we don't use 
`@SuppressWarnings("AbbreviationAsWordInName")` at least in the 2-3 `main` 
(non-`test`) code places I pointed out in this review, but that if there is any 
`test` code where it's an unreasonable amount of work to change it, we merge it 
anyway - would that seem fair?

##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesConstants.java
##
@@ -21,6 +21,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
+@SuppressWarnings({ "AbbreviationAsWordInName" })

Review comment:
   it would be nice to fix this as well.. I'm hoping Checkstyle is OK with 
`S3_SERVICE_NAME` (because those truly are global constants), but it probably 
just doesn't like `ExternalservicePropertiesJSONinputParams` and the others 
like it? Again, just refactor those to be e.g. 
`ExternalservicePropertiesJsonInputParams`, that's better, and more consistent.

##
File path: 
fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/GroupSavingsIntegrationTest.java
##
@@ -53,7 +53,7 @@
 /**
  * Group Savings Integration Test for checking Savings Application.
  */
-@SuppressWarnings({ "rawtypes", "unused" })
+@SuppressWarnings({ "rawtypes", "unused", "AbbreviationAsWordInName" })

Review comment:
   as above, would it be hard to fix this also here?

##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainService.java
##
@@ -21,6 +21,7 @@
 import java.util.Date;
 import org.apache.fineract.infrastructure.cache.domain.CacheType;
 
+@SuppressWarnings({ "AbbreviationAsWordInName" })

Review comment:
   this is not test code, so it should be fixed.. is it because of 
`isSMSOTPDeliveryEnabled` etc.? Just make that e.g. `isSmsOtpDeliveryEnabled` - 
it's fine, and actually more not less readable (once you are used to the 
"convention" - and it's better to have it "uniform" across the entire code 
base).





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1251: FINERACT-1095 Added status parameter in Loans API

2020-09-22 Thread GitBox


vorburger commented on pull request #1251:
URL: https://github.com/apache/fineract/pull/1251#issuecomment-696929477


   @thesmallstar hope your exams went well! Whenever you have time to pick this 
up, we appreciate your contributions, very much!



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1179: FINERACT-826 Migrate to java.time from Joda API

2020-09-22 Thread GitBox


vorburger commented on pull request #1179:
URL: https://github.com/apache/fineract/pull/1179#issuecomment-696893220


   @ptuomola did you still want to review this PR one of these days?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1320: Change OAuth doc in apiLive.htm (FINERACT-629)

2020-09-22 Thread GitBox


vorburger commented on pull request #1320:
URL: https://github.com/apache/fineract/pull/1320#issuecomment-696880382


   Self merged documentation only PR after (almost) 2 weeks of no reaction from 
any other committer.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] SubhamPramanik commented on a change in pull request #1330: Interop KYC and Interop Loan Disbursement

2020-09-22 Thread GitBox


SubhamPramanik commented on a change in pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#discussion_r493073446



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java
##
@@ -437,6 +550,19 @@ private SavingsAccount 
validateAndGetSavingAccount(@NotNull InteropRequestData r
 return savingsAccount;
 }
 
+// private Loan validateAndGetLoan(@NotNull InteropRequestData request) {

Review comment:
   Removed

##
File path: 
fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java
##
@@ -373,4 +374,29 @@ public String performTransfer(@QueryParam("action") 
@Parameter(description = "ac
 
 return jsonSerializer.serialize(settings, result);
 }
+
+@GET
+@Consumes({ MediaType.APPLICATION_JSON })
+@Produces({ MediaType.APPLICATION_JSON })
+@Path("accounts/{accountId}/kyc")
+@Operation(summary = "Query KYC by Account Id", description = "")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = InteropKycResponseData.class))) })
+public String getClientKyc(@PathParam("accountId") @Parameter(description 
= "accountId") String accountId, @Context UriInfo uriInfo) {
+InteropKycResponseData result = interopService.getKyc(accountId);
+ApiRequestJsonSerializationSettings settings = 
this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());

Review comment:
   Not sure how to do it. Can you point to a refernce implementation? 





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract-cn-payroll] xurror merged pull request #16: revert renovate bot

2020-09-22 Thread GitBox


xurror merged pull request #16:
URL: https://github.com/apache/fineract-cn-payroll/pull/16


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger merged pull request #1342: Update dependency org.flywaydb:flyway-core to v6.5.7

2020-09-22 Thread GitBox


vorburger merged pull request #1342:
URL: https://github.com/apache/fineract/pull/1342


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] renovate-bot closed pull request #1343: Update dependency org.mock-server:mockserver-junit-jupiter to v5.11.1

2020-09-22 Thread GitBox


renovate-bot closed pull request #1343:
URL: https://github.com/apache/fineract/pull/1343


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


vorburger commented on pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#issuecomment-696892087


@rrpawar96 is this still a work in progress, or something that you would 
like to be reviewed and merged when OK? If so, then click the Ready for Review 
button above, to remove the Draft status. (If not, just keep working on it like 
this, as you are.)



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] thesmallstar commented on pull request #1344: Updated Report-name Regex

2020-09-22 Thread GitBox


thesmallstar commented on pull request #1344:
URL: https://github.com/apache/fineract/pull/1344#issuecomment-696944033







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] rrpawar96 commented on a change in pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


rrpawar96 commented on a change in pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#discussion_r492518373



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReportsReadPlatformServiceImpl.java
##
@@ -0,0 +1,347 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.infrastructure.creditbureau.service;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonNull;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import org.apache.fineract.commands.domain.CommandWrapper;
+import org.apache.fineract.commands.service.CommandWrapperBuilder;
+import org.apache.fineract.infrastructure.core.api.JsonCommand;
+import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
+import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
+import org.apache.fineract.infrastructure.creditbureau.data.CreditReportData;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauToken;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauTokenCredential;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenDataRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.serialization.CreditBureauTokenCommandFromApiJsonDeserializer;
+import 
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+public class CreditBureauReportsReadPlatformServiceImpl implements 
CreditBureauReportsReadPlatformService {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(CreditBureauReportsReadPlatformServiceImpl.class);
+private final JdbcTemplate jdbcTemplate;
+private final PlatformSecurityContext context;
+private final FromJsonHelper fromApiJsonHelper;
+private final TokenRepositoryWrapper tokenRepository;
+private final TokenDataRepositoryWrapper tokenDataRepository;
+private final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer;
+
+@Autowired
+public CreditBureauReportsReadPlatformServiceImpl(final 
PlatformSecurityContext context, final RoutingDataSource dataSource,
+final FromJsonHelper fromApiJsonHelper, final 
TokenRepositoryWrapper tokenRepository,
+final TokenDataRepositoryWrapper tokenDataRepository,
+final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer) {
+this.context = context;
+this.jdbcTemplate = new JdbcTemplate(dataSource);
+this.tokenRepository = tokenRepository;
+this.tokenDataRepository = tokenDataRepository;
+this.fromApiJsonHelper = fromApiJsonHelper;
+this.fromApiJsonDeserializer = fromApiJsonDeserializer;
+}
+
+String nrcId = null;
+Long uniqueID = 0L;
+String userName = "";
+String password = "";
+String subscriptionId = "";
+String subscriptionKey = "";
+
+StringBuilder response = new StringBuilder();
+HttpURLConnection postConnection;
+String tokenDate;
+String token = null;
+String process = null;
+String result = null;
+
+public void httpConnectionMethod() {

Review comment:
   Kept it public to make it accessible for test case

##
File path: 

[GitHub] [fineract] thesmallstar commented on pull request #1290: Added and Enforced AbbreviationAsWordInName Checkstyle (FINERACT-821)

2020-09-22 Thread GitBox


thesmallstar commented on pull request #1290:
URL: https://github.com/apache/fineract/pull/1290#issuecomment-696944678


   Thanks for the review, Let us not merge this yet, I will complete the 
remaining files :) 
   I agree It wont take much effort, and it makes more sense to get this 
completely done RN. :D 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] github-actions[bot] commented on pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


github-actions[bot] commented on pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#issuecomment-696453111


   This pull request seems to be stale.  Are you still planning to work on it?  
We will automatically close it in 30 days.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] thesmallstar commented on pull request #1330: Interop KYC and Interop Loan Disbursement

2020-09-22 Thread GitBox


thesmallstar commented on pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#issuecomment-696935962


   @SubhamPramanik  thank you for the PR, I see a checkstyle error in your 
code, that means address_line_1 that you made does not match the required regex 
it should.
   
   I also see a AvoidHidingCauseException, that happens when you catch a 
exception and throw another exception essentially hiding what actually caused 
the exception! 
   
   Will you fix this?
   
   cc @vorburger The checkstyles are helping!!
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] ptuomola merged pull request #1340: Update dependency com.diffplug.spotless:spotless-plugin-gradle to v5.6.1

2020-09-22 Thread GitBox


ptuomola merged pull request #1340:
URL: https://github.com/apache/fineract/pull/1340


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1344: Updated Report-name Regex

2020-09-22 Thread GitBox


vorburger commented on pull request #1344:
URL: https://github.com/apache/fineract/pull/1344#issuecomment-696941435


   > I got this issue in the email thread
   
   Which email thread? :smile: 
   
   > no jira Ticket:
   
   It would be great to create a JIRA issue, describing the problem, with the 
error message. With text, so that it's searchable, instead of an image. It 
helps when we look for it again in the future, when a user reports the same 
error on the mailing list later.
   
   > I am not sure how this worked in the past.
   
   It's possible that it hasn't worked in a long time and was just broken... 
:sweat_smile: 
   
   Would it be possible to add a simple integration test for this?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1302: FINERACT-1120-TFA-authentication-issue-fix

2020-09-22 Thread GitBox


vorburger commented on pull request #1302:
URL: https://github.com/apache/fineract/pull/1302#issuecomment-696890416







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger merged pull request #1341: Update dependency org.mock-server:mockserver-junit-jupiter to v5.11.1

2020-09-22 Thread GitBox


vorburger merged pull request #1341:
URL: https://github.com/apache/fineract/pull/1341


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on a change in pull request #1184: FINERACT-1089 removing the rs.previous()

2020-09-22 Thread GitBox


vorburger commented on a change in pull request #1184:
URL: https://github.com/apache/fineract/pull/1184#discussion_r492927273



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java
##
@@ -305,12 +305,8 @@ public DepositAccountInterestRateChartSlabData 
extractData(ResultSet rs) throws
 if (incentiveData != null) {
 chartSlabData.addIncentives(incentiveData);
 }
-} else {
-rs.previous();

Review comment:
   @percyashu will you have time to do that @ptuomola suggests above? /Cc 
@awasum FYI.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1303: FINERACT-1120-TFA-authentication-issue-fix

2020-09-22 Thread GitBox


vorburger commented on pull request #1303:
URL: https://github.com/apache/fineract/pull/1303#issuecomment-696888447







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1301: FINERACT-1120-TFA-authentication-issue-fix

2020-09-22 Thread GitBox


vorburger commented on pull request #1301:
URL: https://github.com/apache/fineract/pull/1301#issuecomment-696890545







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] percyashu commented on a change in pull request #1184: FINERACT-1089 removing the rs.previous()

2020-09-22 Thread GitBox


percyashu commented on a change in pull request #1184:
URL: https://github.com/apache/fineract/pull/1184#discussion_r493177869



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java
##
@@ -305,12 +305,8 @@ public DepositAccountInterestRateChartSlabData 
extractData(ResultSet rs) throws
 if (incentiveData != null) {
 chartSlabData.addIncentives(incentiveData);
 }
-} else {
-rs.previous();

Review comment:
   @vorburger Yeah I will make time, just the issues of setting up a test 
case to ensure the output stays unchanged and if you can confirm the functional 
knowledge of the data model.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] SubhamPramanik commented on a change in pull request #1330: Interop KYC and Interop Loan Disbursement

2020-09-22 Thread GitBox


SubhamPramanik commented on a change in pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#discussion_r493073780



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java
##
@@ -373,4 +374,29 @@ public String performTransfer(@QueryParam("action") 
@Parameter(description = "ac
 
 return jsonSerializer.serialize(settings, result);
 }
+
+@GET
+@Consumes({ MediaType.APPLICATION_JSON })
+@Produces({ MediaType.APPLICATION_JSON })
+@Path("accounts/{accountId}/kyc")
+@Operation(summary = "Query KYC by Account Id", description = "")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = InteropKycResponseData.class))) })
+public String getClientKyc(@PathParam("accountId") @Parameter(description 
= "accountId") String accountId, @Context UriInfo uriInfo) {
+InteropKycResponseData result = interopService.getKyc(accountId);
+ApiRequestJsonSerializationSettings settings = 
this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());

Review comment:
   Not sure how to do it. Can you point to a refernce implementation? 





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] SubhamPramanik commented on a change in pull request #1330: Interop KYC and Interop Loan Disbursement

2020-09-22 Thread GitBox


SubhamPramanik commented on a change in pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#discussion_r493073446



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java
##
@@ -437,6 +550,19 @@ private SavingsAccount 
validateAndGetSavingAccount(@NotNull InteropRequestData r
 return savingsAccount;
 }
 
+// private Loan validateAndGetLoan(@NotNull InteropRequestData request) {

Review comment:
   Removed





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] thesmallstar commented on pull request #1344: Updated Report-name Regex

2020-09-22 Thread GitBox


thesmallstar commented on pull request #1344:
URL: https://github.com/apache/fineract/pull/1344#issuecomment-696944880


   +1 for the integration test as well. 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] thesmallstar commented on pull request #1290: Added and Enforced AbbreviationAsWordInName Checkstyle (FINERACT-821)

2020-09-22 Thread GitBox


thesmallstar commented on pull request #1290:
URL: https://github.com/apache/fineract/pull/1290#issuecomment-696944678


   Thanks for the review, Let us not merge this yet, I will complete the 
remaining files :) 
   I agree It wont take much effort, and it makes more sense to get this 
completely done RN. :D 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] thesmallstar commented on pull request #1344: Updated Report-name Regex

2020-09-22 Thread GitBox


thesmallstar commented on pull request #1344:
URL: https://github.com/apache/fineract/pull/1344#issuecomment-696944033


   My bad :P 
   Let me quickly make a  jira ticket for this explaining the entire issue.  
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1344: Updated Report-name Regex

2020-09-22 Thread GitBox


vorburger commented on pull request #1344:
URL: https://github.com/apache/fineract/pull/1344#issuecomment-696941435


   > I got this issue in the email thread
   
   Which email thread? :smile: 
   
   > no jira Ticket:
   
   It would be great to create a JIRA issue, describing the problem, with the 
error message. With text, so that it's searchable, instead of an image. It 
helps when we look for it again in the future, when a user reports the same 
error on the mailing list later.
   
   > I am not sure how this worked in the past.
   
   It's possible that it hasn't worked in a long time and was just broken... 
:sweat_smile: 
   
   Would it be possible to add a simple integration test for this?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] thesmallstar commented on pull request #1330: Interop KYC and Interop Loan Disbursement

2020-09-22 Thread GitBox


thesmallstar commented on pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#issuecomment-696935962


   @SubhamPramanik  thank you for the PR, I see a checkstyle error in your 
code, that means address_line_1 that you made does not match the required regex 
it should.
   
   I also see a AvoidHidingCauseException, that happens when you catch a 
exception and throw another exception essentially hiding what actually caused 
the exception! 
   
   Will you fix this?
   
   cc @vorburger The checkstyles are helping!!
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] thesmallstar commented on pull request #1251: FINERACT-1095 Added status parameter in Loans API

2020-09-22 Thread GitBox


thesmallstar commented on pull request #1251:
URL: https://github.com/apache/fineract/pull/1251#issuecomment-696933182


   @vorburger  yes already working on it!



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] thesmallstar opened a new pull request #1344: Updated Report-name Regex

2020-09-22 Thread GitBox


thesmallstar opened a new pull request #1344:
URL: https://github.com/apache/fineract/pull/1344


   I got this issue in the email thread, no jira Ticket:
   
![image](https://user-images.githubusercontent.com/42006277/93928309-bcc0c500-fd37-11ea-8556-a2c7ebffa5f3.png)
   
   
   The report names with "(" threw SQL injection error, I identified the 
mistake to be incorrect Regex, I am not sure how this worked in the past. 
   
   Still testing this. 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1251: FINERACT-1095 Added status parameter in Loans API

2020-09-22 Thread GitBox


vorburger commented on pull request #1251:
URL: https://github.com/apache/fineract/pull/1251#issuecomment-696929477


   @thesmallstar hope your exams went well! Whenever you have time to pick this 
up, we appreciate your contributions, very much!



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on a change in pull request #1290: Added and Enforced AbbreviationAsWordInName Checkstyle (FINERACT-821)

2020-09-22 Thread GitBox


vorburger commented on a change in pull request #1290:
URL: https://github.com/apache/fineract/pull/1290#discussion_r492973111



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResourceSwagger.java
##
@@ -24,7 +24,7 @@
 /**
  * Created by sanyam on 23/8/17.
  */
-@SuppressWarnings({ "MemberName" })
+@SuppressWarnings({ "MemberName", "AbbreviationAsWordInName" })

Review comment:
   here it's probably OK, because you can't change it, as it's already part 
of the external Swagger API? But then it's worth to document it like this:
   
   ```suggestion
   // Cannot change names of public API without breaking backwards compatibility
   @SuppressWarnings({ "MemberName", "AbbreviationAsWordInName" })
   ```

##
File path: 
fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientSavingsIntegrationTest.java
##
@@ -60,7 +60,7 @@
 /**
  * Client Savings Integration Test for checking Savings Application.
  */
-@SuppressWarnings({ "rawtypes" })
+@SuppressWarnings({ "rawtypes", "AbbreviationAsWordInName" })

Review comment:
   are there many problems in this test, would it be hard to also fix this, 
just so that it's nice?

##
File path: 
fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
##
@@ -65,7 +65,7 @@
  * Client Loan Integration Test for checking Loan Application Repayments 
Schedule, loan charges, penalties, loan
  * repayments and verifying accounting transactions
  */
-@SuppressWarnings({ "rawtypes", "unchecked" })
+@SuppressWarnings({ "rawtypes", "unchecked", "AbbreviationAsWordInName" })
 public class ClientLoanIntegrationTest {

Review comment:
   @thesmallstar I would actually have to agree with @ptuomola that if just 
a little bit more work, it would be nice to finish this up.. but it depends on 
the effort, of course. How about we agree that we don't use 
`@SuppressWarnings("AbbreviationAsWordInName")` at least in the 2-3 `main` 
(non-`test`) code places I pointed out in this review, but that if there is any 
`test` code where it's an unreasonable amount of work to change it, we merge it 
anyway - would that seem fair?

##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesConstants.java
##
@@ -21,6 +21,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
+@SuppressWarnings({ "AbbreviationAsWordInName" })

Review comment:
   it would be nice to fix this as well.. I'm hoping Checkstyle is OK with 
`S3_SERVICE_NAME` (because those truly are global constants), but it probably 
just doesn't like `ExternalservicePropertiesJSONinputParams` and the others 
like it? Again, just refactor those to be e.g. 
`ExternalservicePropertiesJsonInputParams`, that's better, and more consistent.

##
File path: 
fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/GroupSavingsIntegrationTest.java
##
@@ -53,7 +53,7 @@
 /**
  * Group Savings Integration Test for checking Savings Application.
  */
-@SuppressWarnings({ "rawtypes", "unused" })
+@SuppressWarnings({ "rawtypes", "unused", "AbbreviationAsWordInName" })

Review comment:
   as above, would it be hard to fix this also here?

##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainService.java
##
@@ -21,6 +21,7 @@
 import java.util.Date;
 import org.apache.fineract.infrastructure.cache.domain.CacheType;
 
+@SuppressWarnings({ "AbbreviationAsWordInName" })

Review comment:
   this is not test code, so it should be fixed.. is it because of 
`isSMSOTPDeliveryEnabled` etc.? Just make that e.g. `isSmsOtpDeliveryEnabled` - 
it's fine, and actually more not less readable (once you are used to the 
"convention" - and it's better to have it "uniform" across the entire code 
base).





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1343: Update dependency org.mock-server:mockserver-junit-jupiter to v5.11.1

2020-09-22 Thread GitBox


vorburger commented on pull request #1343:
URL: https://github.com/apache/fineract/pull/1343#issuecomment-696918717


   #1341 dupe



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1179: FINERACT-826 Migrate to java.time from Joda API

2020-09-22 Thread GitBox


vorburger commented on pull request #1179:
URL: https://github.com/apache/fineract/pull/1179#issuecomment-696893220


   @ptuomola did you still want to review this PR one of these days?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


vorburger commented on pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#issuecomment-696892087


@rrpawar96 is this still a work in progress, or something that you would 
like to be reviewed and merged when OK? If so, then click the Ready for Review 
button above, to remove the Draft status. (If not, just keep working on it like 
this, as you are.)



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1303: FINERACT-1120-TFA-authentication-issue-fix

2020-09-22 Thread GitBox


vorburger commented on pull request #1303:
URL: https://github.com/apache/fineract/pull/1303#issuecomment-696890882


   @avikganguly01 do you know more about this?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1301: FINERACT-1120-TFA-authentication-issue-fix

2020-09-22 Thread GitBox


vorburger commented on pull request #1301:
URL: https://github.com/apache/fineract/pull/1301#issuecomment-696890744


   @avikganguly01 do you know more about this?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1302: FINERACT-1120-TFA-authentication-issue-fix

2020-09-22 Thread GitBox


vorburger commented on pull request #1302:
URL: https://github.com/apache/fineract/pull/1302#issuecomment-696890781


   @avikganguly01 do you know more about this?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1302: FINERACT-1120-TFA-authentication-issue-fix

2020-09-22 Thread GitBox


vorburger commented on pull request #1302:
URL: https://github.com/apache/fineract/pull/1302#issuecomment-696890416


   @fynmanoj what is this PR for? I'm confused about how this one relates to 
#1297 and #1303 re. FINERACT-1120 and FINERACT-1136 .. or did you mean to but 
just forgot to Abandon and Close this PR? Thank you.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1301: FINERACT-1120-TFA-authentication-issue-fix

2020-09-22 Thread GitBox


vorburger commented on pull request #1301:
URL: https://github.com/apache/fineract/pull/1301#issuecomment-696890545


   @fynmanoj what is this PR for? I'm confused about how this one relates to 
#1297 and #1303 re. FINERACT-1120 and FINERACT-1136 .. or did you mean to but 
just forgot to Abandon and Close this PR? Thank you.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1303: FINERACT-1120-TFA-authentication-issue-fix

2020-09-22 Thread GitBox


vorburger commented on pull request #1303:
URL: https://github.com/apache/fineract/pull/1303#issuecomment-696888447


   This appears to be the back-port of #1297 to 1.4.0 for FINERACT-1136 .. but 
1.4.0 has meanwhile sailed without this. @fynmanoj @vidakovic do you want to 
just close this PR, or do something else with it? -- PS: If were were to still 
merge this PR to the 1.4.0 now, it would be very confusing... see FINERACT-1154.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] renovate-bot closed pull request #1343: Update dependency org.mock-server:mockserver-junit-jupiter to v5.11.1

2020-09-22 Thread GitBox


renovate-bot closed pull request #1343:
URL: https://github.com/apache/fineract/pull/1343


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on a change in pull request #1184: FINERACT-1089 removing the rs.previous()

2020-09-22 Thread GitBox


vorburger commented on a change in pull request #1184:
URL: https://github.com/apache/fineract/pull/1184#discussion_r492927273



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java
##
@@ -305,12 +305,8 @@ public DepositAccountInterestRateChartSlabData 
extractData(ResultSet rs) throws
 if (incentiveData != null) {
 chartSlabData.addIncentives(incentiveData);
 }
-} else {
-rs.previous();

Review comment:
   @percyashu will you have time to do that @ptuomola suggests above? /Cc 
@awasum FYI.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] renovate-bot opened a new pull request #1343: Update dependency org.mock-server:mockserver-junit-jupiter to v5.11.1

2020-09-22 Thread GitBox


renovate-bot opened a new pull request #1343:
URL: https://github.com/apache/fineract/pull/1343


   This PR contains the following updates:
   
   | Package | Update | Change |
   |---|---|---|
   | [org.mock-server:mockserver-junit-jupiter](http://www.mock-server.com) | 
patch | `5.11.0` -> `5.11.1` |
   
   ---
   
   ### Renovate configuration
   
   :date: **Schedule**: At any time (no schedule defined).
   
   :vertical_traffic_light: **Automerge**: Disabled by config. Please merge 
this manually once you are satisfied.
   
   :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the 
rebase/retry checkbox.
   
   :no_bell: **Ignore**: Close this PR and you won't be reminded about this 
update again.
   
   ---
   
- [ ] If you want to rebase/retry this PR, check this 
box
   
   ---
   
   This PR has been generated by [WhiteSource 
Renovate](https://renovate.whitesourcesoftware.com). View repository job log 
[here](https://app.renovatebot.com/dashboard#github/apache/fineract).



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger commented on pull request #1320: Change OAuth doc in apiLive.htm (FINERACT-629)

2020-09-22 Thread GitBox


vorburger commented on pull request #1320:
URL: https://github.com/apache/fineract/pull/1320#issuecomment-696880382


   Self merged documentation only PR after (almost) 2 weeks of no reaction from 
any other committer.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] vorburger merged pull request #1320: Change OAuth doc in apiLive.htm (FINERACT-629)

2020-09-22 Thread GitBox


vorburger merged pull request #1320:
URL: https://github.com/apache/fineract/pull/1320


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[fineract] branch develop updated: Change OAuth doc in apiLive.htm (FINERACT-629)

2020-09-22 Thread vorburger
This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
 new f73f5ef  Change OAuth doc in apiLive.htm (FINERACT-629)
f73f5ef is described below

commit f73f5ef50f48b39b810577c2155290078387dc13
Author: Michael Vorburger 
AuthorDate: Fri Sep 11 00:08:51 2020 +0200

Change OAuth doc in apiLive.htm (FINERACT-629)
---
 .../src/main/resources/static/api-docs/apiLive.htm   | 20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/fineract-provider/src/main/resources/static/api-docs/apiLive.htm 
b/fineract-provider/src/main/resources/static/api-docs/apiLive.htm
index 129b099..d08103f 100644
--- a/fineract-provider/src/main/resources/static/api-docs/apiLive.htm
+++ b/fineract-provider/src/main/resources/static/api-docs/apiLive.htm
@@ -4402,22 +4402,28 @@ function executeAjaxRequest(url, verbType, jsonData, 
basicAuthKey, successFuncti


 
-// A Javascript/Jquery example of how to login to Apache Fineract and use its 
api.
-// Typically, the javascript application would
+// A Javascript/JQuery example of how to login to Apache Fineract and use its 
API.
+// Typically, the JavaScript application would:
 // 1) Display a login page to retrieve the username and password.
 // 2) Send the username, password, client_id , grant_type and client_secret to 
a function
-//such as getOauthToken below which sets the HTTP bearer Auth key.
+//such as getOauthToken() below which POSTs these as x-www-form-urlencoded 
(but NOT in the URL, see FINERACT-629)
+//and stores the token in a global variable.
 // 3) The HTTP bearer Auth key is used in all subsequent requests
-// (see the function executeAjaxRequest below).
+// (see the function executeAjaxRequest() below).
 
 function getOauthToken(username, password) {
 
var jqxhr = $.ajax({
-   url : "/fineract-provider/api/oauth/token?username=" + 
credentials.username + "=" + credentials.password 
+"_id=community-app_type=password_secret=123,
+   url : "/fineract-provider/api/oauth/token",
type : 'POST',
-   contentType : "application/json; charset=utf-8",
dataType : 'json',
-   data : "{}",
+   data : {
+   username: credentials.username,
+   password: credentials.password,
+   client_id: "community-app",
+   grant_type: "password",
+   client_secret: "123"
+   },
cache : false,
success : function(data, textStatus, jqXHR) {
authKey = data.access_token;



[GitHub] [fineract] vorburger merged pull request #1341: Update dependency org.mock-server:mockserver-junit-jupiter to v5.11.1

2020-09-22 Thread GitBox


vorburger merged pull request #1341:
URL: https://github.com/apache/fineract/pull/1341


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[fineract] branch develop updated: Update dependency org.mock-server:mockserver-junit-jupiter to v5.11.1

2020-09-22 Thread vorburger
This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
 new c269843  Update dependency org.mock-server:mockserver-junit-jupiter to 
v5.11.1
c269843 is described below

commit c2698438cc44c036d304ed8f8af3c1daf1f36937
Author: Renovate Bot 
AuthorDate: Tue Sep 22 04:22:04 2020 +

Update dependency org.mock-server:mockserver-junit-jupiter to v5.11.1
---
 fineract-provider/build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index e423191..478dbfb 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -127,7 +127,7 @@ dependencyManagement {
 dependency 'org.awaitility:awaitility:4.0.3'
 dependency 'com.github.spotbugs:spotbugs-annotations:4.1.2'
 dependency 'javax.cache:cache-api:1.1.1'
-dependency 'org.mock-server:mockserver-junit-jupiter:5.11.0'
+dependency 'org.mock-server:mockserver-junit-jupiter:5.11.1'
 dependency 'org.webjars.npm:swagger-ui-dist:3.34.0'
 dependency 'org.webjars:webjars-locator-core:0.46'
 



[fineract] branch develop updated: Update dependency org.flywaydb:flyway-core to v6.5.7

2020-09-22 Thread vorburger
This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
 new 961435e  Update dependency org.flywaydb:flyway-core to v6.5.7
961435e is described below

commit 961435ed2fc97e16b06f5b08de50bdb244d363cb
Author: Renovate Bot 
AuthorDate: Tue Sep 22 11:49:05 2020 +

Update dependency org.flywaydb:flyway-core to v6.5.7
---
 fineract-provider/build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index 87f79a8..e423191 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -106,7 +106,7 @@ dependencyManagement {
 dependency 'org.drizzle.jdbc:drizzle-jdbc:1.4'
 dependency 'com.github.librepdf:openpdf:1.3.21'
 dependency 'org.mnode.ical4j:ical4j:3.0.19'
-dependency 'org.flywaydb:flyway-core:6.5.6'
+dependency 'org.flywaydb:flyway-core:6.5.7'
 dependency 'org.quartz-scheduler:quartz:2.3.2'
 dependency 'com.amazonaws:aws-java-sdk-s3:1.11.852'
 dependency 'org.ehcache:ehcache:3.9.0'



[GitHub] [fineract] vorburger merged pull request #1342: Update dependency org.flywaydb:flyway-core to v6.5.7

2020-09-22 Thread GitBox


vorburger merged pull request #1342:
URL: https://github.com/apache/fineract/pull/1342


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] renovate-bot opened a new pull request #1342: Update dependency org.flywaydb:flyway-core to v6.5.7

2020-09-22 Thread GitBox


renovate-bot opened a new pull request #1342:
URL: https://github.com/apache/fineract/pull/1342


   This PR contains the following updates:
   
   | Package | Update | Change |
   |---|---|---|
   | [org.flywaydb:flyway-core](org/flywaydb/flyway-core) | patch | `6.5.6` -> 
`6.5.7` |
   
   ---
   
   ### Renovate configuration
   
   :date: **Schedule**: At any time (no schedule defined).
   
   :vertical_traffic_light: **Automerge**: Disabled by config. Please merge 
this manually once you are satisfied.
   
   :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the 
rebase/retry checkbox.
   
   :no_bell: **Ignore**: Close this PR and you won't be reminded about this 
update again.
   
   ---
   
- [ ] If you want to rebase/retry this PR, check this 
box
   
   ---
   
   This PR has been generated by [WhiteSource 
Renovate](https://renovate.whitesourcesoftware.com). View repository job log 
[here](https://app.renovatebot.com/dashboard#github/apache/fineract).



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] rrpawar96 commented on a change in pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


rrpawar96 commented on a change in pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#discussion_r492522694



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReportsReadPlatformServiceImpl.java
##
@@ -0,0 +1,347 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.infrastructure.creditbureau.service;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonNull;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import org.apache.fineract.commands.domain.CommandWrapper;
+import org.apache.fineract.commands.service.CommandWrapperBuilder;
+import org.apache.fineract.infrastructure.core.api.JsonCommand;
+import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
+import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
+import org.apache.fineract.infrastructure.creditbureau.data.CreditReportData;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauToken;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauTokenCredential;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenDataRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.serialization.CreditBureauTokenCommandFromApiJsonDeserializer;
+import 
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+public class CreditBureauReportsReadPlatformServiceImpl implements 
CreditBureauReportsReadPlatformService {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(CreditBureauReportsReadPlatformServiceImpl.class);
+private final JdbcTemplate jdbcTemplate;
+private final PlatformSecurityContext context;
+private final FromJsonHelper fromApiJsonHelper;
+private final TokenRepositoryWrapper tokenRepository;
+private final TokenDataRepositoryWrapper tokenDataRepository;
+private final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer;
+
+@Autowired
+public CreditBureauReportsReadPlatformServiceImpl(final 
PlatformSecurityContext context, final RoutingDataSource dataSource,
+final FromJsonHelper fromApiJsonHelper, final 
TokenRepositoryWrapper tokenRepository,
+final TokenDataRepositoryWrapper tokenDataRepository,
+final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer) {
+this.context = context;
+this.jdbcTemplate = new JdbcTemplate(dataSource);
+this.tokenRepository = tokenRepository;
+this.tokenDataRepository = tokenDataRepository;
+this.fromApiJsonHelper = fromApiJsonHelper;
+this.fromApiJsonDeserializer = fromApiJsonDeserializer;
+}
+
+String nrcId = null;
+Long uniqueID = 0L;
+String userName = "";
+String password = "";
+String subscriptionId = "";
+String subscriptionKey = "";
+
+StringBuilder response = new StringBuilder();
+HttpURLConnection postConnection;
+String tokenDate;
+String token = null;
+String process = null;
+String result = null;
+
+public void httpConnectionMethod() {
+try {
+String readLine = null;
+String post_params = null;
+
+if (process.equals("token")) {
+

[GitHub] [fineract] rrpawar96 commented on a change in pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


rrpawar96 commented on a change in pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#discussion_r492522601



##
File path: fineract-provider/config/swagger/fineract-input.yaml
##
@@ -0,0 +1,37 @@
+openapi: 3.0.3

Review comment:
   No, So it has been removed.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] rrpawar96 commented on a change in pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


rrpawar96 commented on a change in pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#discussion_r492522178



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauToken.java
##
@@ -0,0 +1,121 @@
+package org.apache.fineract.infrastructure.creditbureau.domain;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import org.apache.fineract.infrastructure.core.api.JsonCommand;
+import 
org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+@Entity
+@Table(name = "m_creditbureau_token")
+public class CreditBureauToken extends AbstractPersistableCustom {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(CreditBureauToken.class);
+
+@Column(name = "username")
+private String userName;
+
+@Column(name = "token")
+private String accessToken;
+
+@Column(name = "token_type")
+private String tokenType;
+
+@Column(name = "expires_in")
+private String expiresIn;
+
+@Column(name = "issued")
+private String issued;
+
+@Column(name = "expires")
+private Date expires;
+
+public CreditBureauToken(String userName, String accessToken, String 
tokenType, String expiresIn, String issued, Date expires) {
+this.userName = userName;
+this.accessToken = accessToken;
+this.tokenType = tokenType;
+this.expiresIn = expiresIn;
+this.issued = issued;
+this.expires = expires;
+}
+
+public CreditBureauToken() {
+this.userName = null;
+this.accessToken = null;
+this.tokenType = null;
+this.expiresIn = null;
+this.issued = null;
+this.expires = null;
+}
+
+public static CreditBureauToken fromJson(final JsonCommand command) {
+final String userName = 
command.stringValueOfParameterNamed("userName");
+final String accessToken = 
command.stringValueOfParameterNamed("access_token");
+final String tokenType = 
command.stringValueOfParameterNamed("token_type");
+final String expiresIn = 
command.stringValueOfParameterNamed("expires_in");
+final String issued = command.stringValueOfParameterNamed(".issued");
+final String expiry = command.stringValueOfParameterNamed(".expires");
+
+LOG.info("Expiry {}", expiry);
+
+DateFormat dateformat = new SimpleDateFormat("EEE, dd MMM  
kk:mm:ss zzz", Locale.ENGLISH);

Review comment:
   Comment Addressed.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] rrpawar96 commented on a change in pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


rrpawar96 commented on a change in pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#discussion_r492519683



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReportsReadPlatformServiceImpl.java
##
@@ -0,0 +1,347 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.infrastructure.creditbureau.service;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonNull;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import org.apache.fineract.commands.domain.CommandWrapper;
+import org.apache.fineract.commands.service.CommandWrapperBuilder;
+import org.apache.fineract.infrastructure.core.api.JsonCommand;
+import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
+import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
+import org.apache.fineract.infrastructure.creditbureau.data.CreditReportData;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauToken;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauTokenCredential;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenDataRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.serialization.CreditBureauTokenCommandFromApiJsonDeserializer;
+import 
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+public class CreditBureauReportsReadPlatformServiceImpl implements 
CreditBureauReportsReadPlatformService {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(CreditBureauReportsReadPlatformServiceImpl.class);
+private final JdbcTemplate jdbcTemplate;
+private final PlatformSecurityContext context;
+private final FromJsonHelper fromApiJsonHelper;
+private final TokenRepositoryWrapper tokenRepository;
+private final TokenDataRepositoryWrapper tokenDataRepository;
+private final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer;
+
+@Autowired
+public CreditBureauReportsReadPlatformServiceImpl(final 
PlatformSecurityContext context, final RoutingDataSource dataSource,
+final FromJsonHelper fromApiJsonHelper, final 
TokenRepositoryWrapper tokenRepository,
+final TokenDataRepositoryWrapper tokenDataRepository,
+final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer) {
+this.context = context;
+this.jdbcTemplate = new JdbcTemplate(dataSource);
+this.tokenRepository = tokenRepository;
+this.tokenDataRepository = tokenDataRepository;
+this.fromApiJsonHelper = fromApiJsonHelper;
+this.fromApiJsonDeserializer = fromApiJsonDeserializer;
+}
+
+String nrcId = null;
+Long uniqueID = 0L;
+String userName = "";
+String password = "";
+String subscriptionId = "";
+String subscriptionKey = "";
+
+StringBuilder response = new StringBuilder();
+HttpURLConnection postConnection;
+String tokenDate;
+String token = null;
+String process = null;
+String result = null;
+
+public void httpConnectionMethod() {
+try {
+String readLine = null;
+String post_params = null;
+
+if (process.equals("token")) {
+

[GitHub] [fineract] rrpawar96 commented on a change in pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


rrpawar96 commented on a change in pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#discussion_r492519326



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReportsReadPlatformServiceImpl.java
##
@@ -0,0 +1,347 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.infrastructure.creditbureau.service;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonNull;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import org.apache.fineract.commands.domain.CommandWrapper;
+import org.apache.fineract.commands.service.CommandWrapperBuilder;
+import org.apache.fineract.infrastructure.core.api.JsonCommand;
+import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
+import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
+import org.apache.fineract.infrastructure.creditbureau.data.CreditReportData;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauToken;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauTokenCredential;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenDataRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.serialization.CreditBureauTokenCommandFromApiJsonDeserializer;
+import 
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+public class CreditBureauReportsReadPlatformServiceImpl implements 
CreditBureauReportsReadPlatformService {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(CreditBureauReportsReadPlatformServiceImpl.class);
+private final JdbcTemplate jdbcTemplate;
+private final PlatformSecurityContext context;
+private final FromJsonHelper fromApiJsonHelper;
+private final TokenRepositoryWrapper tokenRepository;
+private final TokenDataRepositoryWrapper tokenDataRepository;
+private final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer;
+
+@Autowired
+public CreditBureauReportsReadPlatformServiceImpl(final 
PlatformSecurityContext context, final RoutingDataSource dataSource,
+final FromJsonHelper fromApiJsonHelper, final 
TokenRepositoryWrapper tokenRepository,
+final TokenDataRepositoryWrapper tokenDataRepository,
+final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer) {
+this.context = context;
+this.jdbcTemplate = new JdbcTemplate(dataSource);
+this.tokenRepository = tokenRepository;
+this.tokenDataRepository = tokenDataRepository;
+this.fromApiJsonHelper = fromApiJsonHelper;
+this.fromApiJsonDeserializer = fromApiJsonDeserializer;
+}
+
+String nrcId = null;

Review comment:
   Comment Addressed.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [fineract] rrpawar96 commented on a change in pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


rrpawar96 commented on a change in pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#discussion_r492518552



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReportsReadPlatformServiceImpl.java
##
@@ -0,0 +1,347 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.infrastructure.creditbureau.service;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonNull;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import org.apache.fineract.commands.domain.CommandWrapper;
+import org.apache.fineract.commands.service.CommandWrapperBuilder;
+import org.apache.fineract.infrastructure.core.api.JsonCommand;
+import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
+import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
+import org.apache.fineract.infrastructure.creditbureau.data.CreditReportData;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauToken;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauTokenCredential;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenDataRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.serialization.CreditBureauTokenCommandFromApiJsonDeserializer;
+import 
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+public class CreditBureauReportsReadPlatformServiceImpl implements 
CreditBureauReportsReadPlatformService {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(CreditBureauReportsReadPlatformServiceImpl.class);
+private final JdbcTemplate jdbcTemplate;
+private final PlatformSecurityContext context;
+private final FromJsonHelper fromApiJsonHelper;
+private final TokenRepositoryWrapper tokenRepository;
+private final TokenDataRepositoryWrapper tokenDataRepository;
+private final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer;
+
+@Autowired
+public CreditBureauReportsReadPlatformServiceImpl(final 
PlatformSecurityContext context, final RoutingDataSource dataSource,
+final FromJsonHelper fromApiJsonHelper, final 
TokenRepositoryWrapper tokenRepository,
+final TokenDataRepositoryWrapper tokenDataRepository,
+final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer) {
+this.context = context;
+this.jdbcTemplate = new JdbcTemplate(dataSource);
+this.tokenRepository = tokenRepository;
+this.tokenDataRepository = tokenDataRepository;
+this.fromApiJsonHelper = fromApiJsonHelper;
+this.fromApiJsonDeserializer = fromApiJsonDeserializer;
+}
+
+String nrcId = null;
+Long uniqueID = 0L;
+String userName = "";
+String password = "";
+String subscriptionId = "";
+String subscriptionKey = "";
+
+StringBuilder response = new StringBuilder();
+HttpURLConnection postConnection;
+String tokenDate;
+String token = null;
+String process = null;
+String result = null;
+
+public void httpConnectionMethod() {
+try {
+String readLine = null;
+String post_params = null;
+
+if (process.equals("token")) {
+

[GitHub] [fineract] rrpawar96 commented on a change in pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


rrpawar96 commented on a change in pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#discussion_r492518909



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReportsReadPlatformServiceImpl.java
##
@@ -0,0 +1,347 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.infrastructure.creditbureau.service;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonNull;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import org.apache.fineract.commands.domain.CommandWrapper;
+import org.apache.fineract.commands.service.CommandWrapperBuilder;
+import org.apache.fineract.infrastructure.core.api.JsonCommand;
+import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
+import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
+import org.apache.fineract.infrastructure.creditbureau.data.CreditReportData;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauToken;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauTokenCredential;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenDataRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.serialization.CreditBureauTokenCommandFromApiJsonDeserializer;
+import 
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+public class CreditBureauReportsReadPlatformServiceImpl implements 
CreditBureauReportsReadPlatformService {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(CreditBureauReportsReadPlatformServiceImpl.class);
+private final JdbcTemplate jdbcTemplate;
+private final PlatformSecurityContext context;
+private final FromJsonHelper fromApiJsonHelper;
+private final TokenRepositoryWrapper tokenRepository;
+private final TokenDataRepositoryWrapper tokenDataRepository;
+private final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer;
+
+@Autowired
+public CreditBureauReportsReadPlatformServiceImpl(final 
PlatformSecurityContext context, final RoutingDataSource dataSource,
+final FromJsonHelper fromApiJsonHelper, final 
TokenRepositoryWrapper tokenRepository,
+final TokenDataRepositoryWrapper tokenDataRepository,
+final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer) {
+this.context = context;
+this.jdbcTemplate = new JdbcTemplate(dataSource);
+this.tokenRepository = tokenRepository;
+this.tokenDataRepository = tokenDataRepository;
+this.fromApiJsonHelper = fromApiJsonHelper;
+this.fromApiJsonDeserializer = fromApiJsonDeserializer;
+}
+
+String nrcId = null;
+Long uniqueID = 0L;
+String userName = "";
+String password = "";
+String subscriptionId = "";
+String subscriptionKey = "";
+
+StringBuilder response = new StringBuilder();
+HttpURLConnection postConnection;
+String tokenDate;
+String token = null;
+String process = null;
+String result = null;
+
+public void httpConnectionMethod() {
+try {
+String readLine = null;
+String post_params = null;
+
+if (process.equals("token")) {
+

[GitHub] [fineract] rrpawar96 commented on a change in pull request #1235: FINERACT-734 Creditbureau-Integration-phase3

2020-09-22 Thread GitBox


rrpawar96 commented on a change in pull request #1235:
URL: https://github.com/apache/fineract/pull/1235#discussion_r492518373



##
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReportsReadPlatformServiceImpl.java
##
@@ -0,0 +1,347 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.infrastructure.creditbureau.service;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonNull;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import org.apache.fineract.commands.domain.CommandWrapper;
+import org.apache.fineract.commands.service.CommandWrapperBuilder;
+import org.apache.fineract.infrastructure.core.api.JsonCommand;
+import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
+import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
+import org.apache.fineract.infrastructure.creditbureau.data.CreditReportData;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauToken;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauTokenCredential;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenDataRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.domain.TokenRepositoryWrapper;
+import 
org.apache.fineract.infrastructure.creditbureau.serialization.CreditBureauTokenCommandFromApiJsonDeserializer;
+import 
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+public class CreditBureauReportsReadPlatformServiceImpl implements 
CreditBureauReportsReadPlatformService {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(CreditBureauReportsReadPlatformServiceImpl.class);
+private final JdbcTemplate jdbcTemplate;
+private final PlatformSecurityContext context;
+private final FromJsonHelper fromApiJsonHelper;
+private final TokenRepositoryWrapper tokenRepository;
+private final TokenDataRepositoryWrapper tokenDataRepository;
+private final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer;
+
+@Autowired
+public CreditBureauReportsReadPlatformServiceImpl(final 
PlatformSecurityContext context, final RoutingDataSource dataSource,
+final FromJsonHelper fromApiJsonHelper, final 
TokenRepositoryWrapper tokenRepository,
+final TokenDataRepositoryWrapper tokenDataRepository,
+final CreditBureauTokenCommandFromApiJsonDeserializer 
fromApiJsonDeserializer) {
+this.context = context;
+this.jdbcTemplate = new JdbcTemplate(dataSource);
+this.tokenRepository = tokenRepository;
+this.tokenDataRepository = tokenDataRepository;
+this.fromApiJsonHelper = fromApiJsonHelper;
+this.fromApiJsonDeserializer = fromApiJsonDeserializer;
+}
+
+String nrcId = null;
+Long uniqueID = 0L;
+String userName = "";
+String password = "";
+String subscriptionId = "";
+String subscriptionKey = "";
+
+StringBuilder response = new StringBuilder();
+HttpURLConnection postConnection;
+String tokenDate;
+String token = null;
+String process = null;
+String result = null;
+
+public void httpConnectionMethod() {

Review comment:
   Kept it public to make it accessible for test case