[LIB-13] Add new scanner settings
authorgotty <gotty@hedgecode.org>
Wed, 15 Jan 2020 01:29:52 +0000 (04:29 +0300)
committergotty <gotty@hedgecode.org>
Wed, 15 Jan 2020 01:29:52 +0000 (04:29 +0300)
src/main/java/org/hedgecode/chess/scanner/Settings.java
src/main/java/org/hedgecode/chess/scanner/json/JSONSettings.java
src/main/resources/META-INF/services/org.hedgecode.chess.scanner.format.FormatBuilder [new file with mode: 0644]

index e2a6bf9..6a14f9b 100644 (file)
@@ -41,4 +41,6 @@ public interface Settings {
 
     String getGameQueryParams();
 
+    String getGameUrlRegex();
+
 }
index d4fa8cc..474acbe 100644 (file)
@@ -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 (file)
index 0000000..f383f01
--- /dev/null
@@ -0,0 +1 @@
+org.hedgecode.chess.scanner.json.format.JSONFormatBuilder
\ No newline at end of file