From a2419d0ba15afb9a2dbaecfabcbfb4d07ad34279 Mon Sep 17 00:00:00 2001 From: Maximilien LEDOUX Date: Sat, 19 Mar 2022 13:08:22 +0100 Subject: [PATCH] =?UTF-8?q?Nouvelles=20Regex=20:=20SBE=5FSEND=5FRESULT=5FO?= =?UTF-8?q?K=20valid=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../protocol/rules/reader/SendOkRule.java | 6 ++++- app/src/main/resources/appdata.json | 27 +------------------ 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/SendOkRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/SendOkRule.java index d7fb36d..1336eb6 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SendOkRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SendOkRule.java @@ -3,15 +3,19 @@ package lightcontainer.protocol.rules.reader; import lightcontainer.domains.client.Context; import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.protocol.ProtocolReader; +import lightcontainer.protocol.StandardizedDefinitions; import lightcontainer.protocol.rules.writer.SaveFileOkRule; +import static lightcontainer.protocol.StandardizedDefinitions.SBE_SEND_RESULT_OK; + /** * Règle permettant de de confirmer la sauvegrade d'un fichier. */ public class SendOkRule extends ProtocolReader { // Constants - private static final String PATTERN = "^SEND_OK\r\n$"; + //"^SEND_OK\r\n$" + private static final String PATTERN = SBE_SEND_RESULT_OK; private static final String NAME = "SEND_OK"; diff --git a/app/src/main/resources/appdata.json b/app/src/main/resources/appdata.json index db1f233..27d00bb 100644 --- a/app/src/main/resources/appdata.json +++ b/app/src/main/resources/appdata.json @@ -1,26 +1 @@ -{ - "unicast_port": 8000, - "multicast_ip": "224.66.66.1", - "multicast_port": 15502, - "network_interface": "lo", - "tls": true, - "storagePath": "C:\\Users\\ledou\\Documents\\ffe", - "users": [ - { - "name": "aaaaa", - "password": "$2a$10$Tuh5xmGEy0g26hQO1SHNY.TNy8rY9VCkpzRLP3rlpnVHtwYew4.km", - "aes_key": "a68CqbWmmf0cuvgvMhm9OC+Y24ut3DY/0WBqtd3nGfU=", - "files": [ - { - "name": "tes", - "fileNameSalt": "DlxEqOb4l9rbbRi8E8k+EA==", - "size": 0, - "iv": "HpJr8VZOFEIRuxj9z1Uzig==", - "storage": [ - "lightcontainerSB01" - ] - } - ] - } - ] -} \ No newline at end of file +{"unicast_port":8000,"multicast_ip":"224.66.66.1","multicast_port":15502,"network_interface":"lo","tls":true,"storagePath":"C:\\Users\\ledou\\Documents\\ffe","users":[{"name":"aaaaa","password":"$2a$10$Tuh5xmGEy0g26hQO1SHNY.TNy8rY9VCkpzRLP3rlpnVHtwYew4.km","aes_key":"a68CqbWmmf0cuvgvMhm9OC+Y24ut3DY/0WBqtd3nGfU=","files":[{"name":"test.txt","fileNameSalt":"RlrRzOXSrcetsVQjqOKB6g==","size":301,"iv":"NHrHwZRdshh5JQQA5Sw/UA==","storage":["lightcontainerSB01"]}]}]} \ No newline at end of file