001
014
015 package com.liferay.portlet.documentlibrary.store;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019
020 import java.io.File;
021 import java.io.InputStream;
022
023
027 public class StoreWrapper implements Store {
028
029 public StoreWrapper(Store store) {
030 _store = store;
031 }
032
033 public void addDirectory(long companyId, long repositoryId, String dirName)
034 throws PortalException, SystemException {
035
036 _store.addDirectory(companyId, repositoryId, dirName);
037 }
038
039 public void addFile(
040 long companyId, long repositoryId, String fileName, byte[] bytes)
041 throws PortalException, SystemException {
042
043 _store.addFile(companyId, repositoryId, fileName, bytes);
044 }
045
046 public void addFile(
047 long companyId, long repositoryId, String fileName, File file)
048 throws PortalException, SystemException {
049
050 _store.addFile(companyId, repositoryId, fileName, file);
051 }
052
053 public void addFile(
054 long companyId, long repositoryId, String fileName, InputStream is)
055 throws PortalException, SystemException {
056
057 _store.addFile(companyId, repositoryId, fileName, is);
058 }
059
060 public void checkRoot(long companyId) throws SystemException {
061 _store.checkRoot(companyId);
062 }
063
064 public void copyFileVersion(
065 long companyId, long repositoryId, String fileName,
066 String fromVersionLabel, String toVersionLabel)
067 throws PortalException, SystemException {
068
069 _store.copyFileVersion(
070 companyId, repositoryId, fileName, fromVersionLabel,
071 toVersionLabel);
072 }
073
074 public void deleteDirectory(
075 long companyId, long repositoryId, String dirName)
076 throws PortalException, SystemException {
077
078 _store.deleteDirectory(companyId, repositoryId, dirName);
079 }
080
081 public void deleteFile(long companyId, long repositoryId, String fileName)
082 throws PortalException, SystemException {
083
084 _store.deleteFile(companyId, repositoryId, fileName);
085 }
086
087 public void deleteFile(
088 long companyId, long repositoryId, String fileName,
089 String versionLabel)
090 throws PortalException, SystemException {
091
092 _store.deleteFile(companyId, repositoryId, fileName, versionLabel);
093 }
094
095 public File getFile(long companyId, long repositoryId, String fileName)
096 throws PortalException, SystemException {
097
098 return _store.getFile(companyId, repositoryId, fileName);
099 }
100
101 public File getFile(
102 long companyId, long repositoryId, String fileName,
103 String versionLabel)
104 throws PortalException, SystemException {
105
106 return _store.getFile(companyId, repositoryId, fileName, versionLabel);
107 }
108
109 public byte[] getFileAsBytes(
110 long companyId, long repositoryId, String fileName)
111 throws PortalException, SystemException {
112
113 return _store.getFileAsBytes(companyId, repositoryId, fileName);
114 }
115
116 public byte[] getFileAsBytes(
117 long companyId, long repositoryId, String fileName,
118 String versionLabel)
119 throws PortalException, SystemException {
120
121 return _store.getFileAsBytes(
122 companyId, repositoryId, fileName, versionLabel);
123 }
124
125 public InputStream getFileAsStream(
126 long companyId, long repositoryId, String fileName)
127 throws PortalException, SystemException {
128
129 return _store.getFileAsStream(companyId, repositoryId, fileName);
130 }
131
132 public InputStream getFileAsStream(
133 long companyId, long repositoryId, String fileName,
134 String versionLabel)
135 throws PortalException, SystemException {
136
137 return _store.getFileAsStream(
138 companyId, repositoryId, fileName, versionLabel);
139 }
140
141 public String[] getFileNames(long companyId, long repositoryId)
142 throws SystemException {
143
144 return _store.getFileNames(companyId, repositoryId);
145 }
146
147 public String[] getFileNames(
148 long companyId, long repositoryId, String dirName)
149 throws PortalException, SystemException {
150
151 return _store.getFileNames(companyId, repositoryId, dirName);
152 }
153
154 public long getFileSize(long companyId, long repositoryId, String fileName)
155 throws PortalException, SystemException {
156
157 return _store.getFileSize(companyId, repositoryId, fileName);
158 }
159
160 public boolean hasDirectory(
161 long companyId, long repositoryId, String dirName)
162 throws PortalException, SystemException {
163
164 return _store.hasDirectory(companyId, repositoryId, dirName);
165 }
166
167 public boolean hasFile(long companyId, long repositoryId, String fileName)
168 throws PortalException, SystemException {
169
170 return _store.hasFile(companyId, repositoryId, fileName);
171 }
172
173 public boolean hasFile(
174 long companyId, long repositoryId, String fileName,
175 String versionLabel)
176 throws PortalException, SystemException {
177
178 return _store.hasFile(companyId, repositoryId, fileName, versionLabel);
179 }
180
181 public void move(String srcDir, String destDir) throws SystemException {
182 _store.move(srcDir, destDir);
183 }
184
185 public void updateFile(
186 long companyId, long repositoryId, long newRepositoryId,
187 String fileName)
188 throws PortalException, SystemException {
189
190 _store.updateFile(companyId, repositoryId, newRepositoryId, fileName);
191 }
192
193 public void updateFile(
194 long companyId, long repositoryId, String fileName,
195 String newFileName)
196 throws PortalException, SystemException {
197
198 _store.updateFile(companyId, repositoryId, fileName, newFileName);
199 }
200
201 public void updateFile(
202 long companyId, long repositoryId, String fileName,
203 String versionLabel, byte[] bytes)
204 throws PortalException, SystemException {
205
206 _store.updateFile(
207 companyId, repositoryId, fileName, versionLabel, bytes);
208 }
209
210 public void updateFile(
211 long companyId, long repositoryId, String fileName,
212 String versionLabel, File file)
213 throws PortalException, SystemException {
214
215 _store.updateFile(
216 companyId, repositoryId, fileName, versionLabel, file);
217 }
218
219 public void updateFile(
220 long companyId, long repositoryId, String fileName,
221 String versionLabel, InputStream is)
222 throws PortalException, SystemException {
223
224 _store.updateFile(companyId, repositoryId, fileName, versionLabel, is);
225 }
226
227 public void updateFileVersion(
228 long companyId, long repositoryId, String fileName,
229 String fromVersionLabel, String toVersionLabel)
230 throws PortalException, SystemException {
231
232 _store.updateFileVersion(
233 companyId, repositoryId, fileName, fromVersionLabel,
234 toVersionLabel);
235 }
236
237 private Store _store;
238
239 }