mirror of
https://github.com/valitydev/adapter-common-lib.git
synced 2024-11-06 10:15:23 +00:00
changed variables
This commit is contained in:
parent
7867290ab1
commit
4a96f2344d
@ -11,11 +11,11 @@ public class PatternMaskingLayout extends PatternLayout {
|
||||
|
||||
private Pattern multilinePattern;
|
||||
private List<String> maskPatterns = new ArrayList<>();
|
||||
private final String delimiter = "|";
|
||||
private static final String DELIMITER = "|";
|
||||
|
||||
public void addMaskPattern(String maskPattern) {
|
||||
maskPatterns.add(maskPattern);
|
||||
multilinePattern = Pattern.compile(String.join(delimiter, maskPatterns), Pattern.MULTILINE);
|
||||
multilinePattern = Pattern.compile(String.join(DELIMITER, maskPatterns), Pattern.MULTILINE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -18,11 +18,11 @@ public class PatternMaskingMessageJsonProvider extends AbstractFieldJsonProvider
|
||||
private Pattern multilinePattern;
|
||||
private List<String> maskPatterns = new ArrayList<>();
|
||||
public static final String FIELD_MESSAGE = "message";
|
||||
private final String delimiter = "|";
|
||||
private static final String DELIMITER = "|";
|
||||
|
||||
public void addMaskPattern(String maskPattern) {
|
||||
maskPatterns.add(maskPattern);
|
||||
multilinePattern = Pattern.compile(String.join(delimiter, maskPatterns), Pattern.MULTILINE);
|
||||
multilinePattern = Pattern.compile(String.join(DELIMITER, maskPatterns), Pattern.MULTILINE);
|
||||
}
|
||||
|
||||
public PatternMaskingMessageJsonProvider() {
|
||||
|
@ -10,18 +10,18 @@ import java.util.Map;
|
||||
|
||||
public class MdcContext {
|
||||
|
||||
private static String keyAmount = "amount";
|
||||
private static final String AMOUNT_KEY = "amount";
|
||||
public static void mdcPutContext(RecurrentTokenContext context, String[] fieldsToPutInMdc) {
|
||||
TransactionInfo transactionInfo = context.getTokenInfo().getTrx();
|
||||
String amount = PaymentDataConverter.getFormattedAmount(context.getTokenInfo().getPaymentTool().getMinimalPaymentCost().getAmount()).toString();
|
||||
MDC.put(keyAmount, amount);
|
||||
MDC.put(AMOUNT_KEY, amount);
|
||||
mdcPutContextTransactionInfo(transactionInfo, fieldsToPutInMdc);
|
||||
}
|
||||
|
||||
public static void mdcPutContext(PaymentContext context, String[] fieldsToPutInMdc) {
|
||||
TransactionInfo transactionInfo = context.getPaymentInfo().getPayment().getTrx();
|
||||
String amount = PaymentDataConverter.getFormattedAmount(context.getPaymentInfo().getPayment().getCost().getAmount()).toString();
|
||||
MDC.put(keyAmount, amount);
|
||||
MDC.put(AMOUNT_KEY, amount);
|
||||
mdcPutContextTransactionInfo(transactionInfo, fieldsToPutInMdc);
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ public class MdcContext {
|
||||
}
|
||||
|
||||
public static void mdcRemoveContext(String[] fieldsToPutInMdc) {
|
||||
MDC.remove(keyAmount);
|
||||
MDC.remove(AMOUNT_KEY);
|
||||
for (String field : fieldsToPutInMdc) {
|
||||
MDC.remove(field);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user