If you are using GitLab outside of the ILL, then you will need to use HTTPS and not SSH for clone/push/pull operations. SSH will work normally if you are using the VPN.

Commit 83035e50 authored by ics's avatar ics

New code to manage files moved from client to server side (scans, xbu,

pal, settings)
parent 9e77bd4a
......@@ -61,28 +61,6 @@ public class ResourceManager {
public String getFileContent(String controllerType, String fileName) throws ResourceNotFoundException {
return ServantManagerAccessor.getInstance(serverId).readResourceFile(controllerType, fileName);
/*
String fullFilePath = "/home/dpt/ortizh/tmp/" + fileName;
if (new File(fullFilePath).exists()) {
try {
String content = "";
String line;
BufferedReader in = new BufferedReader(new FileReader(fullFilePath));
while ((line = in.readLine()) != null) {
content = content + line + "\n";
}
in.close();
return content;
} catch (IOException e) {
System.err.println("IOException while getting content of file " + fullFilePath);
e.printStackTrace();
}
} else {
throw new ResourceNotFoundException(fileName);
}
return null;
*/
}
public void setFileContent(String controllerType, String fileName, String content) {
......@@ -107,6 +85,22 @@ public class ResourceManager {
*/
}
public void saveFile(String fileName, String content) {
ServantManagerAccessor.getInstance(serverId).saveFile(fileName, content);
}
public String getFileContent(String fileName) throws ResourceNotFoundException {
return ServantManagerAccessor.getInstance(serverId).getFileContent(fileName);
}
public String getTree(String rootDirectory) {
return ServantManagerAccessor.getInstance(serverId).getTree(rootDirectory);
}
public HashMap<String, String> getFamilyImageKeys() {
return ServantManagerAccessor.getInstance(serverId).getFamilyImageKeys();
}
......
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