1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.documentlibrary.service;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="DLFileEntryLocalService.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This interface defines the service. The default implementation is
40   * <code>com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl</code>.
41   * Modify methods in that class and rerun ServiceBuilder to populate this class
42   * and all other generated classes.
43   * </p>
44   *
45   * <p>
46   * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
47   * </p>
48   *
49   * @author Brian Wing Shun Chan
50   *
51   * @see com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil
52   *
53   */
54  @Transactional(rollbackFor =  {
55      PortalException.class, SystemException.class})
56  public interface DLFileEntryLocalService {
57      public com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
58          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
59          throws com.liferay.portal.SystemException;
60  
61      public com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
62          long fileEntryId);
63  
64      public void deleteDLFileEntry(long fileEntryId)
65          throws com.liferay.portal.SystemException,
66              com.liferay.portal.PortalException;
67  
68      public void deleteDLFileEntry(
69          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
70          throws com.liferay.portal.SystemException;
71  
72      public java.util.List<Object> dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
74          throws com.liferay.portal.SystemException;
75  
76      public java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException;
79  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
82          long fileEntryId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portal.PortalException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
88          int start, int end) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public int getDLFileEntriesCount()
92          throws com.liferay.portal.SystemException;
93  
94      public com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
95          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
96          throws com.liferay.portal.SystemException;
97  
98      public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
99          long userId, long folderId, java.lang.String name,
100         java.lang.String title, java.lang.String description,
101         java.lang.String[] tagsEntries, java.lang.String extraSettings,
102         java.io.File file, boolean addCommunityPermissions,
103         boolean addGuestPermissions)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException;
106 
107     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
108         long userId, long folderId, java.lang.String name,
109         java.lang.String title, java.lang.String description,
110         java.lang.String[] tagsEntries, java.lang.String extraSettings,
111         byte[] bytes, boolean addCommunityPermissions,
112         boolean addGuestPermissions)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException;
115 
116     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
117         java.lang.String uuid, long userId, long folderId,
118         java.lang.String name, java.lang.String title,
119         java.lang.String description, java.lang.String[] tagsEntries,
120         java.lang.String extraSettings, byte[] bytes,
121         boolean addCommunityPermissions, boolean addGuestPermissions)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException;
124 
125     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
126         long userId, long folderId, java.lang.String name,
127         java.lang.String title, java.lang.String description,
128         java.lang.String[] tagsEntries, java.lang.String extraSettings,
129         java.io.File file, java.lang.String[] communityPermissions,
130         java.lang.String[] guestPermissions)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException;
133 
134     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
135         long userId, long folderId, java.lang.String name,
136         java.lang.String title, java.lang.String description,
137         java.lang.String[] tagsEntries, java.lang.String extraSettings,
138         byte[] bytes, java.lang.String[] communityPermissions,
139         java.lang.String[] guestPermissions)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException;
142 
143     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
144         long userId, long folderId, java.lang.String name,
145         java.lang.String title, java.lang.String description,
146         java.lang.String[] tagsEntries, java.lang.String extraSettings,
147         java.io.File file, java.lang.Boolean addCommunityPermissions,
148         java.lang.Boolean addGuestPermissions,
149         java.lang.String[] communityPermissions,
150         java.lang.String[] guestPermissions)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException;
153 
154     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
155         java.lang.String uuid, long userId, long folderId,
156         java.lang.String name, java.lang.String title,
157         java.lang.String description, java.lang.String[] tagsEntries,
158         java.lang.String extraSettings, byte[] bytes,
159         java.lang.Boolean addCommunityPermissions,
160         java.lang.Boolean addGuestPermissions,
161         java.lang.String[] communityPermissions,
162         java.lang.String[] guestPermissions)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException;
165 
166     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
167         java.lang.String uuid, long userId, long folderId,
168         java.lang.String name, java.lang.String title,
169         java.lang.String description, java.lang.String[] tagsEntries,
170         java.lang.String extraSettings, java.io.InputStream is, long size,
171         java.lang.Boolean addCommunityPermissions,
172         java.lang.Boolean addGuestPermissions,
173         java.lang.String[] communityPermissions,
174         java.lang.String[] guestPermissions)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException;
177 
178     public void addFileEntryResources(long folderId, java.lang.String name,
179         boolean addCommunityPermissions, boolean addGuestPermissions)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException;
182 
183     public void addFileEntryResources(
184         com.liferay.portlet.documentlibrary.model.DLFolder folder,
185         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
186         boolean addCommunityPermissions, boolean addGuestPermissions)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException;
189 
190     public void addFileEntryResources(long folderId, java.lang.String name,
191         java.lang.String[] communityPermissions,
192         java.lang.String[] guestPermissions)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException;
195 
196     public void addFileEntryResources(
197         com.liferay.portlet.documentlibrary.model.DLFolder folder,
198         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
199         java.lang.String[] communityPermissions,
200         java.lang.String[] guestPermissions)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException;
203 
204     public com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
205         long userId, long folderId, java.lang.String name,
206         java.lang.String sourceName, java.lang.String title,
207         java.lang.String description, java.lang.String[] tagsEntries,
208         java.lang.String extraSettings, java.io.File file,
209         boolean addCommunityPermissions, boolean addGuestPermissions)
210         throws com.liferay.portal.PortalException,
211             com.liferay.portal.SystemException;
212 
213     public void deleteFileEntries(long folderId)
214         throws com.liferay.portal.PortalException,
215             com.liferay.portal.SystemException;
216 
217     public void deleteFileEntry(long folderId, java.lang.String name)
218         throws com.liferay.portal.PortalException,
219             com.liferay.portal.SystemException;
220 
221     public void deleteFileEntry(long folderId, java.lang.String name,
222         double version)
223         throws com.liferay.portal.PortalException,
224             com.liferay.portal.SystemException;
225 
226     public void deleteFileEntry(
227         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
228         throws com.liferay.portal.PortalException,
229             com.liferay.portal.SystemException;
230 
231     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
233         long companyId, int start, int end)
234         throws com.liferay.portal.SystemException;
235 
236     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
238         long companyId, int start, int end,
239         com.liferay.portal.kernel.util.OrderByComparator obc)
240         throws com.liferay.portal.SystemException;
241 
242     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243     public int getCompanyFileEntriesCount(long companyId)
244         throws com.liferay.portal.SystemException;
245 
246     public java.io.InputStream getFileAsStream(long companyId, long userId,
247         long folderId, java.lang.String name)
248         throws com.liferay.portal.PortalException,
249             com.liferay.portal.SystemException;
250 
251     public java.io.InputStream getFileAsStream(long companyId, long userId,
252         long folderId, java.lang.String name, double version)
253         throws com.liferay.portal.PortalException,
254             com.liferay.portal.SystemException;
255 
256     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
258         long folderId) throws com.liferay.portal.SystemException;
259 
260     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
262         long folderId, int start, int end)
263         throws com.liferay.portal.SystemException;
264 
265     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
267         long folderId, int start, int end,
268         com.liferay.portal.kernel.util.OrderByComparator obc)
269         throws com.liferay.portal.SystemException;
270 
271     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272     public int getFileEntriesCount(long folderId)
273         throws com.liferay.portal.SystemException;
274 
275     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276     public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
277         long fileEntryId)
278         throws com.liferay.portal.PortalException,
279             com.liferay.portal.SystemException;
280 
281     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282     public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
283         long folderId, java.lang.String name)
284         throws com.liferay.portal.PortalException,
285             com.liferay.portal.SystemException;
286 
287     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288     public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
289         java.lang.String uuid, long groupId)
290         throws com.liferay.portal.PortalException,
291             com.liferay.portal.SystemException;
292 
293     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294     public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
295         long folderId, java.lang.String titleWithExtension)
296         throws com.liferay.portal.PortalException,
297             com.liferay.portal.SystemException;
298 
299     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300     public int getFoldersFileEntriesCount(java.util.List<Long> folderIds)
301         throws com.liferay.portal.SystemException;
302 
303     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
304     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
305         long groupId, int start, int end)
306         throws com.liferay.portal.SystemException;
307 
308     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
310         long groupId, int start, int end,
311         com.liferay.portal.kernel.util.OrderByComparator obc)
312         throws com.liferay.portal.SystemException;
313 
314     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
316         long groupId, long userId, int start, int end)
317         throws com.liferay.portal.SystemException;
318 
319     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
320     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
321         long groupId, long userId, int start, int end,
322         com.liferay.portal.kernel.util.OrderByComparator obc)
323         throws com.liferay.portal.SystemException;
324 
325     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326     public int getGroupFileEntriesCount(long groupId)
327         throws com.liferay.portal.SystemException;
328 
329     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330     public int getGroupFileEntriesCount(long groupId, long userId)
331         throws com.liferay.portal.SystemException;
332 
333     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
335         throws com.liferay.portal.SystemException;
336 
337     public void reIndex(long fileEntryId)
338         throws com.liferay.portal.SystemException;
339 
340     public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
341         long userId, long folderId, long newFolderId, java.lang.String name,
342         java.lang.String sourceFileName, java.lang.String title,
343         java.lang.String description, java.lang.String[] tagsEntries,
344         java.lang.String extraSettings, java.io.File file)
345         throws com.liferay.portal.PortalException,
346             com.liferay.portal.SystemException;
347 
348     public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
349         long userId, long folderId, long newFolderId, java.lang.String name,
350         java.lang.String sourceFileName, java.lang.String title,
351         java.lang.String description, java.lang.String[] tagsEntries,
352         java.lang.String extraSettings, byte[] bytes)
353         throws com.liferay.portal.PortalException,
354             com.liferay.portal.SystemException;
355 
356     public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
357         long userId, long folderId, long newFolderId, java.lang.String name,
358         java.lang.String sourceFileName, java.lang.String title,
359         java.lang.String description, java.lang.String[] tagsEntries,
360         java.lang.String extraSettings, java.io.InputStream is, long size)
361         throws com.liferay.portal.PortalException,
362             com.liferay.portal.SystemException;
363 
364     public void updateTagsAsset(long userId,
365         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
366         java.lang.String[] tagsEntries)
367         throws com.liferay.portal.PortalException,
368             com.liferay.portal.SystemException;
369 }