001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.commons.io.res.util; 020 021import java.io.IOException; 022import java.util.Map; 023 024import lucee.commons.io.res.Resource; 025import lucee.commons.io.res.ResourceProvider; 026import lucee.commons.io.res.ResourceProviderPro; 027import lucee.commons.io.res.Resources; 028 029public class ResourceProviderWrapper implements ResourceProviderPro { 030 031 private ResourceProvider provider; 032 033 public ResourceProviderWrapper(ResourceProvider provider){ 034 this.provider=provider; 035 } 036 037 @Override 038 public Map getArguments() { 039 return provider.getArguments(); 040 } 041 042 @Override 043 public Resource getResource(String path) { 044 return provider.getResource(path); 045 } 046 047 @Override 048 public String getScheme() { 049 return provider.getScheme(); 050 } 051 052 @Override 053 public ResourceProvider init(String scheme, Map arguments) { 054 return provider.init(scheme, arguments); 055 } 056 057 @Override 058 public boolean isAttributesSupported() { 059 return provider.isAttributesSupported(); 060 } 061 062 @Override 063 public boolean isCaseSensitive() { 064 return provider.isCaseSensitive(); 065 } 066 067 @Override 068 public boolean isModeSupported() { 069 return provider.isModeSupported(); 070 } 071 072 @Override 073 public void lock(Resource res) throws IOException { 074 provider.lock(res); 075 } 076 077 @Override 078 public void read(Resource res) throws IOException { 079 provider.read(res); 080 } 081 082 @Override 083 public void setResources(Resources resources) { 084 provider.setResources(resources); 085 } 086 087 @Override 088 public void unlock(Resource res) { 089 provider.unlock(res); 090 } 091 092 @Override 093 public char getSeparator() { 094 return ResourceUtil.getSeparator(provider); 095 } 096 097}