From b0827da4980c41d52ba80eb6540c595145d0717a Mon Sep 17 00:00:00 2001 From: gotty Date: Wed, 15 Jan 2020 04:29:52 +0300 Subject: [PATCH] [LIB-13] Add new scanner settings --- src/main/java/org/hedgecode/chess/scanner/Settings.java | 2 ++ src/main/java/org/hedgecode/chess/scanner/json/JSONSettings.java | 8 ++++++++ .../services/org.hedgecode.chess.scanner.format.FormatBuilder | 1 + 3 files changed, 11 insertions(+) create mode 100644 src/main/resources/META-INF/services/org.hedgecode.chess.scanner.format.FormatBuilder diff --git a/src/main/java/org/hedgecode/chess/scanner/Settings.java b/src/main/java/org/hedgecode/chess/scanner/Settings.java index e2a6bf9..6a14f9b 100644 --- a/src/main/java/org/hedgecode/chess/scanner/Settings.java +++ b/src/main/java/org/hedgecode/chess/scanner/Settings.java @@ -41,4 +41,6 @@ public interface Settings { String getGameQueryParams(); + String getGameUrlRegex(); + } diff --git a/src/main/java/org/hedgecode/chess/scanner/json/JSONSettings.java b/src/main/java/org/hedgecode/chess/scanner/json/JSONSettings.java index d4fa8cc..474acbe 100644 --- a/src/main/java/org/hedgecode/chess/scanner/json/JSONSettings.java +++ b/src/main/java/org/hedgecode/chess/scanner/json/JSONSettings.java @@ -54,6 +54,9 @@ public class JSONSettings implements Settings { @SerializedName("gameQueryParams") private String gameQueryParams; + @SerializedName("gameUrlRegex") + private String gameUrlRegex; + @Override public String getTournamentUrl() { return tournamentUrl; @@ -99,4 +102,9 @@ public class JSONSettings implements Settings { return gameQueryParams; } + @Override + public String getGameUrlRegex() { + return gameUrlRegex; + } + } diff --git a/src/main/resources/META-INF/services/org.hedgecode.chess.scanner.format.FormatBuilder b/src/main/resources/META-INF/services/org.hedgecode.chess.scanner.format.FormatBuilder new file mode 100644 index 0000000..f383f01 --- /dev/null +++ b/src/main/resources/META-INF/services/org.hedgecode.chess.scanner.format.FormatBuilder @@ -0,0 +1 @@ +org.hedgecode.chess.scanner.json.format.JSONFormatBuilder \ No newline at end of file -- 2.10.0