Commit 5d885f2a authored by ics's avatar ics

File management for multiclient version

parent 28960c47
......@@ -27,6 +27,10 @@ import fr.ill.ics.nscclient.servant.ResourceNotFoundException;
public class ResourceManager {
public final static String NAME = "name";
public final static String ISDIRECTORY = "isDirectory";
public final static String CHILDREN = "children";
private String serverId;
private static ResourceManager instance = null;
......@@ -96,8 +100,8 @@ public class ResourceManager {
}
public String getTree(String rootDirectory) {
return ServantManagerAccessor.getInstance(serverId).getTree(rootDirectory);
public String getTree(String rootDirectory, String extension) {
return ServantManagerAccessor.getInstance(serverId).getTree(rootDirectory, extension);
}
......
......@@ -1082,7 +1082,7 @@ public class ServantManagerAccessor {
}
public String getTree(String rootDirectory) {
public String getTree(String rootDirectory, String extension) {
// Create the message type.
ServantManagerRequest.Message type = ServantManagerRequest.Message.newBuilder()
.setType(ServantManagerRequest.Message.Type.GetTree)
......@@ -1091,6 +1091,7 @@ public class ServantManagerAccessor {
// Create the request.
ServantManagerRequest.GetTreeRequest request = ServantManagerRequest.GetTreeRequest.newBuilder()
.setRootDirectory(rootDirectory)
.setExtension(extension)
.build();
servantManagerRequester.sendTwoParts(type.toByteArray(), request.toByteArray());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment