Commit c14fe7b6 authored by yannick legoc's avatar yannick legoc
Browse files

patch plugin applied

parent 3ba3ce58
......@@ -42,6 +42,8 @@ public abstract class ResourceManager {
}
protected abstract void init();
public abstract String[] getResourceFilesByExtension(String extension);
public abstract byte[] getBinaryFileContent(String controllerType, String fileName) throws ResourceNotFoundException;
public abstract String getFileContent(String controllerType, String fileName) throws ResourceNotFoundException;
public abstract void setFileContent(String controllerType, String fileName, String content);
}
......@@ -44,6 +44,13 @@ public class CorbaResourceManager extends ResourceManager {
this.servantManager = ServerSessionManager.getInstance(serverId).getServantManager();
}
public String[] getResourceFilesByExtension(String extension) {
return servantManager.getResourceFilesByExtension(extension);
}
public byte[] getBinaryFileContent(String controllerType, String fileName) throws ResourceNotFoundException {
return servantManager.readBinaryResourceFile(controllerType, fileName);
}
public String getFileContent(String controllerType, String fileName) throws ResourceNotFoundException {
return servantManager.readResourceFile(controllerType, fileName);
......
......@@ -503,6 +503,18 @@ public class CorbaServantManager {
}
public String[] getResourceFilesByExtension(String extension) {
return servantManager.getResourceFilesByExtension(extension);
}
public byte[] readBinaryResourceFile(String type, String fileName) throws ResourceNotFoundException {
try {
return servantManager.readBinaryResourceFile(type, fileName);
} catch (NoSuchFileException e) {
ResourceNotFoundException fnfe = new ResourceNotFoundException(fileName);
throw fnfe;
}
}
public String readResourceFile(String type, String fileName) throws ResourceNotFoundException {
try {
......
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