Skip to content

Commit

Permalink
CF-638: watchlist notification with extended information
Browse files Browse the repository at this point in the history
  • Loading branch information
drocek committed Jul 12, 2024
1 parent b13496a commit 0b8f5ec
Show file tree
Hide file tree
Showing 5 changed files with 174 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# buildscript - project id
projectGroup=com.generalbytes.batm.public
projectVersion=1.6.3
projectVersion=1.6.4

# buildscript - common dependency versions
bitrafaelVersion=1.0.44
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************************
* Copyright (C) 2014-2020 GENERAL BYTES s.r.o. All rights reserved.
* Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved.
*
* This software may be distributed and modified under the terms of the GNU
* General Public License version 2 (GPL2) as published by the Free Software
Expand All @@ -17,6 +17,8 @@
************************************************************************************/
package com.generalbytes.batm.server.extensions;

import com.generalbytes.batm.server.extensions.watchlist.WatchListScanIdentityMatchesData;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
Expand Down Expand Up @@ -289,10 +291,20 @@ default void watchedIdentityTransaction(String terminalSerialNumber, String iden
default void watchlistScanBan(String terminalSerialNumber) {}

/**
* There is a match for Identity on a Watchlist
* Deprecated since 1.6.4, use {@link INotificationListener#watchlistScanIdentityMatches(WatchListScanIdentityMatchesData)} instead.
*
* @param identityPublicId Public ID of Identity.
*/
@Deprecated
default void watchlistScanIdentityMatches(String identityPublicId) {}

/**
* Triggered if there is a match on the WatchList with the Identity. Contains detailed information.
*
* @param data Object containing detailed information about match result.
*/
default void watchlistScanIdentityMatches(WatchListScanIdentityMatchesData data) {}

default void lifetimeIdentityVolumeReached(String terminalSerialNumber, BigDecimal lifetimeVolume, String cashCurrency, BigDecimal preConditionAmount, String identityPublicId) {}

default void transactionSupplyLimitReached(String terminalSerialNumber) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*************************************************************************************
* Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved.
*
* This software may be distributed and modified under the terms of the GNU
* General Public License version 2 (GPL2) as published by the Free Software
* Foundation and appearing in the file GPL2.TXT included in the packaging of
* this file. Please note that GPL2 Section 2[b] requires that all works based
* on this software must also be made publicly available under the terms of
* the GPL2 ("Copyleft").
*
* Contact information
* -------------------
*
* GENERAL BYTES s.r.o.
* Web : http://www.generalbytes.com
*
************************************************************************************/
package com.generalbytes.batm.server.extensions.watchlist;

public class WatchListScanIdentityMatchesData {

/**
* Public ID of identity. Can be null.
*/
private final String identityPublicId;
/**
* Message body.
*/
private final String messageBody;
/**
* Type of WatchList trigger.
*/
private final WatchListTrigger trigger;
/**
* Terminal serial number. Can be null.
*/
private final String terminalSerialNumber;
/**
* Match score by WatchList provider. Can be null.
*/
private final Integer matchScore;
/**
* Result of scan.
*/
private final WatchListScanResult scanResult;

public WatchListScanIdentityMatchesData(String identityPublicId,
String messageBody,
WatchListTrigger trigger,
String terminalSerialNumber,
Integer matchScore,
WatchListScanResult scanResult
) {
this.identityPublicId = identityPublicId;
this.messageBody = messageBody;
this.trigger = trigger;
this.terminalSerialNumber = terminalSerialNumber;
this.matchScore = matchScore;
this.scanResult = scanResult;
}

public String getIdentityPublicId() {
return identityPublicId;
}

public String getMessageBody() {
return messageBody;
}

public WatchListTrigger getTrigger() {
return trigger;
}

public String getTerminalSerialNumber() {
return terminalSerialNumber;
}

public Integer getMatchScore() {
return matchScore;
}

public WatchListScanResult getScanResult() {
return scanResult;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*************************************************************************************
* Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved.
*
* This software may be distributed and modified under the terms of the GNU
* General Public License version 2 (GPL2) as published by the Free Software
* Foundation and appearing in the file GPL2.TXT included in the packaging of
* this file. Please note that GPL2 Section 2[b] requires that all works based
* on this software must also be made publicly available under the terms of
* the GPL2 ("Copyleft").
*
* Contact information
* -------------------
*
* GENERAL BYTES s.r.o.
* Web : http://www.generalbytes.com
*
************************************************************************************/
package com.generalbytes.batm.server.extensions.watchlist;

public enum WatchListScanResult {

NO_MATCH("OK"),
PARTIAL_MATCH("Partial Match"),
FULL_MATCH("Full Match");

private final String title;

WatchListScanResult(String title) {
this.title = title;
}

public String getTitle() {
return title;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*************************************************************************************
* Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved.
*
* This software may be distributed and modified under the terms of the GNU
* General Public License version 2 (GPL2) as published by the Free Software
* Foundation and appearing in the file GPL2.TXT included in the packaging of
* this file. Please note that GPL2 Section 2[b] requires that all works based
* on this software must also be made publicly available under the terms of
* the GPL2 ("Copyleft").
*
* Contact information
* -------------------
*
* GENERAL BYTES s.r.o.
* Web : http://www.generalbytes.com
*
************************************************************************************/
package com.generalbytes.batm.server.extensions.watchlist;

public enum WatchListTrigger {

MANUAL("Manual"),
PRE_TRANSACTION("Pre-Transaction"),
PERIODIC("Periodic"),
EXTENSION("Extension");

private final String title;

WatchListTrigger(String title) {
this.title = title;
}

public String getTitle() {
return title;
}

}

0 comments on commit 0b8f5ec

Please sign in to comment.