PROX-446: bump depends (#22)

This commit is contained in:
Anatoly Cherkasov 2020-08-20 16:10:56 +03:00 committed by GitHub
parent 128916014e
commit 6747ff344d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 81 additions and 36 deletions

@ -1 +1 @@
Subproject commit ea4aa042f482551d624fd49a570d28488f479e93
Subproject commit e89b885839df8013df804d48ff24dff10c9c451e

74
pom.xml
View File

@ -1,11 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.rbkmoney</groupId>
<parent>
<groupId>com.rbkmoney</groupId>
<artifactId>parent</artifactId>
<version>1.0.5</version>
<relativePath/>
</parent>
<artifactId>adapter-bank-payout-spring-boot-starter</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
<packaging>jar</packaging>
<name>Adapter-bank-payout-spring-boot-starter</name>
@ -14,11 +20,23 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>8</java.version>
<spring-boot.version>2.1.1.RELEASE</spring-boot.version>
<damsel.version>1.392-0f6a308</damsel.version>
<serializer.version>0.6.7</serializer.version>
<error-mapping.version>1.0.4</error-mapping.version>
<adapter-common-lib.version>0.0.23</adapter-common-lib.version>
<adapter-client-lib.version>2.1.27</adapter-client-lib.version>
<adapter-thrift-lib.version>1.0.5</adapter-thrift-lib.version>
<adapter-common-lib.version>0.0.26</adapter-common-lib.version>
<damsel.version>1.439-b18f037</damsel.version>
<cds-proto.version>1.62-07f2b0f</cds-proto.version>
<spring-boot.version>2.3.2.RELEASE</spring-boot.version>
<woody.version>[1.1.21,)</woody.version>
<geck.version>[0.6.11,)</geck.version>
<lombok.version>1.18.4</lombok.version>
<slf4j-api.version>1.7.30</slf4j-api.version>
<javax.servlet-api.version>4.0.1</javax.servlet-api.version>
<hibernate-validator.version>6.1.5.Final</hibernate-validator.version>
<error-mapping-java.version>1.0.6</error-mapping-java.version>
<junit.version>4.12</junit.version>
</properties>
<dependencies>
@ -26,21 +44,26 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<version>${javax.servlet-api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
<version>${slf4j-api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.4</version>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
<!--spring-->
<dependency>
@ -68,6 +91,12 @@
</dependency>
<!--rbk-->
<dependency>
<groupId>com.rbkmoney.woody</groupId>
<artifactId>woody-thrift</artifactId>
<version>${woody.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.rbkmoney</groupId>
<artifactId>adapter-common-lib</artifactId>
@ -76,13 +105,13 @@
<dependency>
<groupId>com.rbkmoney</groupId>
<artifactId>error-mapping-java</artifactId>
<version>${error-mapping.version}</version>
<version>${error-mapping-java.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.rbkmoney.geck</groupId>
<artifactId>serializer</artifactId>
<version>0.6.7</version>
<version>${geck.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
@ -96,27 +125,10 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<downloadUrl>http://java-nexus.msk1.rbkmoney.net:8081/nexus/content/groups/public</downloadUrl>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>releases</id>
<name>RBKmoney releases repository</name>
<url>http://java-nexus.msk1.rbkmoney.net:8081/nexus/content/repositories/releases</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<uniqueVersion>true</uniqueVersion>
<id>snapshots</id>
<name>RBKmoney snapshots repository</name>
<url>http://java-nexus.msk1.rbkmoney.net:8081/nexus/content/repositories/snapshots</url>
<layout>default</layout>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>

View File

@ -0,0 +1,12 @@
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler;
import com.rbkmoney.damsel.msgpack.Value;
import com.rbkmoney.damsel.withdrawals.provider_adapter.Callback;
import com.rbkmoney.damsel.withdrawals.provider_adapter.CallbackResult;
import com.rbkmoney.damsel.withdrawals.provider_adapter.Withdrawal;
import java.util.Map;
public interface HandleCallbackHandler {
CallbackResult handleCallback(Callback callback, Withdrawal withdrawal, Value value, Map<String, String> map);
}

View File

@ -1,11 +1,11 @@
package com.rbkmoney.adapter.bank.payout.spring.boot.starter.service;
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.converter.ExitStateToProcessResultConverter;
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.converter.WithdrawalToEntryStateConverter;
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.flow.StepResolver;
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler.CommonHandler;
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler.GetQuoteHandler;
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.handler.HandleCallbackHandler;
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.EntryStateModel;
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.model.ExitStateModel;
import com.rbkmoney.adapter.bank.payout.spring.boot.starter.validator.WithdrawalValidator;
@ -29,6 +29,7 @@ public class PayoutAdapterService<T extends EntryStateModel, X extends ExitState
private final StepResolver<T, X> resolver;
private final WithdrawalValidator validator;
private final GetQuoteHandler getQuoteHandler;
private final HandleCallbackHandler handleCallbackHandler;
@Override
public ProcessResult processWithdrawal(Withdrawal withdrawal, Value state, Map<String, String> options) throws TException {
@ -51,4 +52,9 @@ public class PayoutAdapterService<T extends EntryStateModel, X extends ExitState
public Quote getQuote(GetQuoteParams getQuoteParams, Map<String, String> map) throws GetQuoteFailure, TException {
return getQuoteHandler.handle(getQuoteParams, map);
}
@Override
public CallbackResult handleCallback(Callback callback, Withdrawal withdrawal, Value value, Map<String, String> map) throws TException {
return handleCallbackHandler.handleCallback(callback, withdrawal, value, map);
}
}

View File

@ -25,7 +25,7 @@ public class PayoutAdapterServiceLogDecorator implements AdapterSrv.Iface {
log.info("processWithdrawal: finish {} with withdrawalId {}", processResult, withdrawalId);
return processResult;
} catch (Exception ex) {
String message = "Exception in processPayment with withdrawalId " + withdrawalId;
String message = "Exception in processWithdrawal with withdrawalId " + withdrawalId;
logMessage(ex, message);
throw ex;
}
@ -34,10 +34,10 @@ public class PayoutAdapterServiceLogDecorator implements AdapterSrv.Iface {
@Override
public Quote getQuote(GetQuoteParams getQuoteParams, Map<String, String> map) throws GetQuoteFailure, TException {
String withdrawalId = getQuoteParams.getIdempotencyId();
log.info("processWithdrawal: start with withdrawalId {}", withdrawalId);
log.info("getQuote: start with withdrawalId {}", withdrawalId);
try {
Quote quote = payoutAdapterService.getQuote(getQuoteParams, map);
log.info("processWithdrawal: finish {} with withdrawalId {}", quote, withdrawalId);
log.info("getQuote: finish {} with withdrawalId {}", quote, withdrawalId);
return quote;
} catch (Exception ex) {
String message = "Exception in getQuote with withdrawalId " + withdrawalId;
@ -46,6 +46,21 @@ public class PayoutAdapterServiceLogDecorator implements AdapterSrv.Iface {
}
}
@Override
public CallbackResult handleCallback(Callback callback, Withdrawal withdrawal, Value value, Map<String, String> map) throws TException {
String withdrawalId = withdrawal.getId();
log.info("handleCallback: start with withdrawalId {}", withdrawalId);
try {
CallbackResult callbackResult = payoutAdapterService.handleCallback(callback, withdrawal, value, map);
log.info("handleCallback: finish {} with withdrawalId {}", callbackResult, withdrawalId);
return callbackResult;
} catch (Exception ex) {
String message = "Exception in handleCallback with withdrawalId " + withdrawalId;
logMessage(ex, message);
throw ex;
}
}
private void logMessage(Exception ex, String message) {
if (isUndefinedResultOrUnavailable(ex)) {
log.warn(message, ex);