diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/FilelistRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/FilelistRule.java index 18bfeea..fea0128 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/FilelistRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/FilelistRule.java @@ -7,16 +7,18 @@ import lightcontainer.protocol.rules.writer.FilesRule; import java.util.List; +import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_FILE_LIST; + /** * Règle permettant de récupérer la liste des fichiers d'un utilisateur */ public class FilelistRule extends ProtocolReader { // Constants - private static final String PATTERN = "^FILELIST\r\n$"; + private static final String PATTERN = CLIENT_FILE_LIST; private static final String NAME = "FILELIST"; - private ProtocolRepository protocolRep; + private final ProtocolRepository protocolRep; // Constructor public FilelistRule(ProtocolRepository protocolRep) { diff --git a/app/src/main/resources/appdata.json b/app/src/main/resources/appdata.json index a99218c..e3bd969 100644 --- a/app/src/main/resources/appdata.json +++ b/app/src/main/resources/appdata.json @@ -1,16 +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": [] - } - ] -} \ 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":"3yLVBqM/zf8CcCFPqdh15Q==","size":301,"iv":"WfokhcAIefnnZnk3sYLjiA==","storage":["lightcontainerSB01"]}]}]} \ No newline at end of file