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