public void createChildDirectory(ServerResourcePath serverResourcePath) { directoryMap.addDirectory(serverResourcePath); } }
public void addResource(ServerResourcePath path, ServerResource resource) { children.addResource(path, resource); }
public ServerResource getResource(ServerResourcePath path) { return children.getResource(path); }
public void addResource(ServerResourcePath path, Resource resource) { if (null == path) { throw new IllegalArgumentException(); } String fileName = path.getFileName(); if (fileName == null) { throw new IllegalArgumentException(); } if (path.hasNextPath()) { Directory childResource = addDirectory(fileName); adapter.addResource(childResource, path.getNextPath(), resource); } else { putChild(fileName, resource); } }
public Set<String> getPaths() { return children.getResourceNames(); }
public Directory addDirectory(String fileName) { if (fileName == null) { throw new IllegalArgumentException(); } Resource childResource = children.get(fileName); Directory result = adapter.asDirectory(childResource); if (result == null) { String resourcePath = adapter.getResourcePath(directory); if (resourcePath == null) { resourcePath = ""; } result = adapter.createChildDirectory(resourcePath + "/" + fileName); putChild(fileName, result); } return result; }
@Override public void release() { for (Resource childResource : directoryMap.getResources()) { childResource.release(); } }
public void addResource(ServerResourcePath path, Resource resource) { if (null == path) { throw new IllegalArgumentException(); } String fileName = path.getFileName(); if (fileName == null) { throw new IllegalArgumentException(); } if (path.hasNextPath()) { Directory childResource = addDirectory(fileName); adapter.addResource(childResource, path.getNextPath(), resource); } else { putChild(fileName, resource); } }
public Set<String> getPaths() { return children.getResourceNames(); }
public Directory addDirectory(String fileName) { if (fileName == null) { throw new IllegalArgumentException(); } Resource childResource = children.get(fileName); Directory result = adapter.asDirectory(childResource); if (result == null) { String resourcePath = adapter.getResourcePath(directory); if (resourcePath == null) { resourcePath = ""; } result = adapter.createChildDirectory(resourcePath + "/" + fileName); putChild(fileName, result); } return result; }
public ServerResourceDirectory addDirectory(String fileName) { return children.addDirectory(fileName); }
public ServerResource getResource(ServerResourcePath path) { return children.getResource(path); }
@Override public String[] list() { return directoryMap.getResourceNames().toArray(EMPTY_STRINGS_ARRAY); }
public void addResource(ServerResourcePath path, ServerResource resource) { children.addResource(path, resource); }
public ServerResourceDirectory addDirectory(ServerResourcePath path) { return children.addDirectory(path); }
@Override public Resource addPath(String path) throws IOException, MalformedURLException { Resource resource = directoryMap.getResource(new ServerResourcePath("/" + path)); if (resource == null) { resource = new BadResource(path); } return resource; }
public void addResource(String string, Resource childResource) { directoryMap.addResource(new ServerResourcePath(string), childResource); }
public ServerResourceDirectory addDirectory(String fileName) { return children.addDirectory(fileName); }
public ServerResourceDirectory addDirectory(ServerResourcePath path) { return children.addDirectory(path); }
public VirtualDirectoryResource createChildDirectory(String name) { return directoryMap.addDirectory(name); }