1
22
23 package com.liferay.documentlibrary.util;
24
25 import com.liferay.portal.PortalException;
26 import com.liferay.portal.SystemException;
27 import com.liferay.portal.kernel.search.SearchException;
28
29 import java.io.File;
30 import java.io.InputStream;
31
32 import java.util.Date;
33
34
39 public class HookWrapper implements Hook {
40
41 public HookWrapper(Hook hook) {
42 _hook = hook;
43 }
44
45 public void addDirectory(long companyId, long repositoryId, String dirName)
46 throws PortalException, SystemException {
47
48 _hook.addDirectory(companyId, repositoryId, dirName);
49 }
50
51 public void addFile(
52 long companyId, String portletId, long groupId, long repositoryId,
53 String fileName, long fileEntryId, String properties,
54 Date modifiedDate, String[] tagsCategories, String[] tagsEntries,
55 byte[] bytes)
56 throws PortalException, SystemException {
57
58 _hook.addFile(
59 companyId, portletId, groupId, repositoryId, fileName, fileEntryId,
60 properties, modifiedDate, tagsCategories, tagsEntries, bytes);
61 }
62
63 public void addFile(
64 long companyId, String portletId, long groupId, long repositoryId,
65 String fileName, long fileEntryId, String properties,
66 Date modifiedDate, String[] tagsCategories, String[] tagsEntries,
67 File file)
68 throws PortalException, SystemException {
69
70 _hook.addFile(
71 companyId, portletId, groupId, repositoryId, fileName, fileEntryId,
72 properties, modifiedDate, tagsCategories, tagsEntries, file);
73 }
74
75 public void addFile(
76 long companyId, String portletId, long groupId, long repositoryId,
77 String fileName, long fileEntryId, String properties,
78 Date modifiedDate, String[] tagsCategories, String[] tagsEntries,
79 InputStream is)
80 throws PortalException, SystemException {
81
82 _hook.addFile(
83 companyId, portletId, groupId, repositoryId, fileName, fileEntryId,
84 properties, modifiedDate, tagsCategories, tagsEntries, is);
85 }
86
87 public void checkRoot(long companyId) throws SystemException {
88 _hook.checkRoot(companyId);
89 }
90
91 public void deleteDirectory(
92 long companyId, String portletId, long repositoryId, String dirName)
93 throws PortalException, SystemException {
94
95 _hook.deleteDirectory(companyId, portletId, repositoryId, dirName);
96 }
97
98 public void deleteFile(
99 long companyId, String portletId, long repositoryId,
100 String fileName)
101 throws PortalException, SystemException {
102
103 _hook.deleteFile(companyId, portletId, repositoryId, fileName);
104 }
105
106 public void deleteFile(
107 long companyId, String portletId, long repositoryId,
108 String fileName, double versionNumber)
109 throws PortalException, SystemException {
110
111 _hook.deleteFile(
112 companyId, portletId, repositoryId, fileName, versionNumber);
113 }
114
115 public byte[] getFile(long companyId, long repositoryId, String fileName)
116 throws PortalException, SystemException {
117
118 return _hook.getFile(companyId, repositoryId, fileName);
119 }
120
121 public byte[] getFile(
122 long companyId, long repositoryId, String fileName,
123 double versionNumber)
124 throws PortalException, SystemException {
125
126 return _hook.getFile(companyId, repositoryId, fileName, versionNumber);
127 }
128
129 public InputStream getFileAsStream(
130 long companyId, long repositoryId, String fileName)
131 throws PortalException, SystemException {
132
133 return _hook.getFileAsStream(companyId, repositoryId, fileName);
134 }
135
136 public InputStream getFileAsStream(
137 long companyId, long repositoryId, String fileName,
138 double versionNumber)
139 throws PortalException, SystemException {
140
141 return _hook.getFileAsStream(
142 companyId, repositoryId, fileName, versionNumber);
143 }
144
145 public String[] getFileNames(
146 long companyId, long repositoryId, String dirName)
147 throws PortalException, SystemException {
148
149 return _hook.getFileNames(companyId, repositoryId, dirName);
150 }
151
152 public long getFileSize(
153 long companyId, long repositoryId, String fileName)
154 throws PortalException, SystemException {
155
156 return _hook.getFileSize(companyId, repositoryId, fileName);
157 }
158
159 public boolean hasFile(
160 long companyId, long repositoryId, String fileName,
161 double versionNumber)
162 throws PortalException, SystemException {
163
164 return _hook.hasFile(companyId, repositoryId, fileName, versionNumber);
165 }
166
167 public void move(String srcDir, String destDir) throws SystemException {
168 _hook.move(srcDir, destDir);
169 }
170
171 public void reIndex(String[] ids) throws SearchException {
172 _hook.reIndex(ids);
173 }
174
175 public void updateFile(
176 long companyId, String portletId, long groupId, long repositoryId,
177 long newRepositoryId, String fileName, long fileEntryId)
178 throws PortalException, SystemException {
179
180 _hook.updateFile(
181 companyId, portletId, groupId, repositoryId, newRepositoryId,
182 fileName, fileEntryId);
183 }
184
185 public void updateFile(
186 long companyId, String portletId, long groupId, long repositoryId,
187 String fileName, double versionNumber, String sourceFileName,
188 long fileEntryId, String properties, Date modifiedDate,
189 String[] tagsCategories, String[] tagsEntries, byte[] bytes)
190 throws PortalException, SystemException {
191
192 _hook.updateFile(
193 companyId, portletId, groupId, repositoryId, fileName,
194 versionNumber, sourceFileName, fileEntryId, properties,
195 modifiedDate, tagsCategories, tagsEntries, bytes);
196 }
197
198 public void updateFile(
199 long companyId, String portletId, long groupId, long repositoryId,
200 String fileName, double versionNumber, String sourceFileName,
201 long fileEntryId, String properties, Date modifiedDate,
202 String[] tagsCategories, String[] tagsEntries, File file)
203 throws PortalException, SystemException {
204
205 _hook.updateFile(
206 companyId, portletId, groupId, repositoryId, fileName,
207 versionNumber, sourceFileName, fileEntryId, properties,
208 modifiedDate, tagsCategories, tagsEntries, file);
209 }
210
211 public void updateFile(
212 long companyId, String portletId, long groupId, long repositoryId,
213 String fileName, double versionNumber, String sourceFileName,
214 long fileEntryId, String properties, Date modifiedDate,
215 String[] tagsCategories, String[] tagsEntries, InputStream is)
216 throws PortalException, SystemException {
217
218 _hook.updateFile(
219 companyId, portletId, groupId, repositoryId, fileName,
220 versionNumber, sourceFileName, fileEntryId, properties,
221 modifiedDate, tagsCategories, tagsEntries, is);
222 }
223
224 private Hook _hook;
225
226 }