private WebResource getResource(String path, boolean validate, boolean useClassLoaderResources) { if (validate) { path = validate(path); } if (isCachingAllowed()) { return cache.getResource(path, useClassLoaderResources); } else { return getResourceInternal(path, useClassLoaderResources); } }
private WebResource[] getResources(String path, boolean useClassLoaderResources) { path = validate(path); if (isCachingAllowed()) { return cache.getResources(path, useClassLoaderResources); } else { return getResourcesInternal(path, useClassLoaderResources); } }
private WebResource[] getResources(String path, boolean useClassLoaderResources) { path = validate(path); if (isCachingAllowed()) { return cache.getResources(path, useClassLoaderResources); } else { return getResourcesInternal(path, useClassLoaderResources); } }
private WebResource getResource(String path, boolean validate, boolean useClassLoaderResources) { if (validate) { path = validate(path); } if (isCachingAllowed()) { return cache.getResource(path, useClassLoaderResources); } else { return getResourceInternal(path, useClassLoaderResources); } }
private WebResource getResource(String path, boolean validate, boolean useClassLoaderResources) { if (validate) { path = validate(path); } if (isCachingAllowed()) { return cache.getResource(path, useClassLoaderResources); } else { return getResourceInternal(path, useClassLoaderResources); } }
@Override public boolean write(String path, InputStream is, boolean overwrite) { path = validate(path); if (!overwrite && preResourceExists(path)) { return false; } boolean writeResult = main.write(path, is, overwrite); if (writeResult && isCachingAllowed()) { // Remove the entry from the cache so the new resource is visible cache.removeCacheEntry(path); } return writeResult; }
@Override public boolean write(String path, InputStream is, boolean overwrite) { path = validate(path); if (!overwrite && preResourceExists(path)) { return false; } boolean writeResult = main.write(path, is, overwrite); if (writeResult && isCachingAllowed()) { // Remove the entry from the cache so the new resource is visible cache.removeCacheEntry(path); } return writeResult; }
@Override public boolean mkdir(String path) { path = validate(path); if (preResourceExists(path)) { return false; } boolean mkdirResult = main.mkdir(path); if (mkdirResult && isCachingAllowed()) { // Remove the entry from the cache so the new directory is visible cache.removeCacheEntry(path); } return mkdirResult; }
@Override public boolean mkdir(String path) { path = validate(path); if (preResourceExists(path)) { return false; } boolean mkdirResult = main.mkdir(path); if (mkdirResult && isCachingAllowed()) { // Remove the entry from the cache so the new directory is visible cache.removeCacheEntry(path); } return mkdirResult; }