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, String properties, Date modifiedDate,
46 String[] tagsEntries, byte[] bytes)
47 throws PortalException, SystemException {
48
49 _hook.addFile(
50 companyId, portletId, groupId, repositoryId, fileName, properties,
51 modifiedDate, tagsEntries, bytes);
52 }
53
54 public void addFile(
55 long companyId, String portletId, long groupId, long repositoryId,
56 String fileName, String properties, Date modifiedDate,
57 String[] tagsEntries, File file)
58 throws PortalException, SystemException {
59
60 _hook.addFile(
61 companyId, portletId, groupId, repositoryId, fileName, properties,
62 modifiedDate, tagsEntries, file);
63 }
64
65 public void addFile(
66 long companyId, String portletId, long groupId, long repositoryId,
67 String fileName, String properties, Date modifiedDate,
68 String[] tagsEntries, InputStream is)
69 throws PortalException, SystemException {
70
71 _hook.addFile(
72 companyId, portletId, groupId, repositoryId, fileName, properties,
73 modifiedDate, tagsEntries, is);
74 }
75
76 public void checkRoot(long companyId) throws SystemException {
77 _hook.checkRoot(companyId);
78 }
79
80 public void deleteDirectory(
81 long companyId, String portletId, long repositoryId, String dirName)
82 throws PortalException, SystemException {
83
84 _hook.deleteDirectory(companyId, portletId, repositoryId, dirName);
85 }
86
87 public void deleteFile(
88 long companyId, String portletId, long repositoryId,
89 String fileName)
90 throws PortalException, SystemException {
91
92 _hook.deleteFile(companyId, portletId, repositoryId, fileName);
93 }
94
95 public void deleteFile(
96 long companyId, String portletId, long repositoryId,
97 String fileName, double versionNumber)
98 throws PortalException, SystemException {
99
100 _hook.deleteFile(
101 companyId, portletId, repositoryId, fileName, versionNumber);
102 }
103
104 public byte[] getFile(long companyId, long repositoryId, String fileName)
105 throws PortalException, SystemException {
106
107 return _hook.getFile(companyId, repositoryId, fileName);
108 }
109
110 public byte[] getFile(
111 long companyId, long repositoryId, String fileName,
112 double versionNumber)
113 throws PortalException, SystemException {
114
115 return _hook.getFile(companyId, repositoryId, fileName, versionNumber);
116 }
117
118 public InputStream getFileAsStream(
119 long companyId, long repositoryId, String fileName)
120 throws PortalException, SystemException {
121
122 return _hook.getFileAsStream(companyId, repositoryId, fileName);
123 }
124
125 public InputStream getFileAsStream(
126 long companyId, long repositoryId, String fileName,
127 double versionNumber)
128 throws PortalException, SystemException {
129
130 return _hook.getFileAsStream(
131 companyId, repositoryId, fileName, versionNumber);
132 }
133
134 public String[] getFileNames(
135 long companyId, long repositoryId, String dirName)
136 throws PortalException, SystemException {
137
138 return _hook.getFileNames(companyId, repositoryId, dirName);
139 }
140
141 public long getFileSize(
142 long companyId, long repositoryId, String fileName)
143 throws PortalException, SystemException {
144
145 return _hook.getFileSize(companyId, repositoryId, fileName);
146 }
147
148 public boolean hasFile(
149 long companyId, long repositoryId, String fileName,
150 double versionNumber)
151 throws PortalException, SystemException {
152
153 return _hook.hasFile(companyId, repositoryId, fileName, versionNumber);
154 }
155
156 public void move(String srcDir, String destDir) throws SystemException {
157 _hook.move(srcDir, destDir);
158 }
159
160 public void reIndex(String[] ids) throws SearchException {
161 _hook.reIndex(ids);
162 }
163
164 public void updateFile(
165 long companyId, String portletId, long groupId, long repositoryId,
166 long newRepositoryId, String fileName)
167 throws PortalException, SystemException {
168
169 _hook.updateFile(
170 companyId, portletId, groupId, repositoryId, newRepositoryId,
171 fileName);
172 }
173
174 public void updateFile(
175 long companyId, String portletId, long groupId, long repositoryId,
176 String fileName, double versionNumber, String sourceFileName,
177 String properties, Date modifiedDate, String[] tagsEntries,
178 byte[] bytes)
179 throws PortalException, SystemException {
180
181 _hook.updateFile(
182 companyId, portletId, groupId, repositoryId, fileName,
183 versionNumber, sourceFileName, properties, modifiedDate,
184 tagsEntries, bytes);
185 }
186
187 public void updateFile(
188 long companyId, String portletId, long groupId, long repositoryId,
189 String fileName, double versionNumber, String sourceFileName,
190 String properties, Date modifiedDate, String[] tagsEntries,
191 File file)
192 throws PortalException, SystemException {
193
194 _hook.updateFile(
195 companyId, portletId, groupId, repositoryId, fileName,
196 versionNumber, sourceFileName, properties, modifiedDate,
197 tagsEntries, file);
198 }
199
200 public void updateFile(
201 long companyId, String portletId, long groupId, long repositoryId,
202 String fileName, double versionNumber, String sourceFileName,
203 String properties, Date modifiedDate, String[] tagsEntries,
204 InputStream is)
205 throws PortalException, SystemException {
206
207 _hook.updateFile(
208 companyId, portletId, groupId, repositoryId, fileName,
209 versionNumber, sourceFileName, properties, modifiedDate,
210 tagsEntries, is);
211 }
212
213 private Hook _hook;
214
215 }