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.Isolation;
28  import com.liferay.portal.kernel.annotation.Propagation;
29  import com.liferay.portal.kernel.annotation.Transactional;
30  
31  /**
32   * <a href="DLFileEntryLocalService.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This interface defines the service. The default implementation is
41   * <code>com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl</code>.
42   * Modify methods in that class and rerun ServiceBuilder to populate this class
43   * and all other generated classes.
44   * </p>
45   *
46   * <p>
47   * 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.
48   * </p>
49   *
50   * @author Brian Wing Shun Chan
51   *
52   * @see com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil
53   *
54   */
55  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
56      PortalException.class, SystemException.class})
57  public interface DLFileEntryLocalService {
58      public com.liferay.portlet.documentlibrary.model.DLFileEntry addDLFileEntry(
59          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
60          throws com.liferay.portal.SystemException;
61  
62      public com.liferay.portlet.documentlibrary.model.DLFileEntry createDLFileEntry(
63          long fileEntryId);
64  
65      public void deleteDLFileEntry(long fileEntryId)
66          throws com.liferay.portal.SystemException,
67              com.liferay.portal.PortalException;
68  
69      public void deleteDLFileEntry(
70          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
71          throws com.liferay.portal.SystemException;
72  
73      public java.util.List<Object> dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
75          throws com.liferay.portal.SystemException;
76  
77      public java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException;
80  
81      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
82      public com.liferay.portlet.documentlibrary.model.DLFileEntry getDLFileEntry(
83          long fileEntryId)
84          throws com.liferay.portal.SystemException,
85              com.liferay.portal.PortalException;
86  
87      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
88      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getDLFileEntries(
89          int start, int end) throws com.liferay.portal.SystemException;
90  
91      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
92      public int getDLFileEntriesCount()
93          throws com.liferay.portal.SystemException;
94  
95      public com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
96          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
97          throws com.liferay.portal.SystemException;
98  
99      public com.liferay.portlet.documentlibrary.model.DLFileEntry updateDLFileEntry(
100         com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
101         boolean merge) throws com.liferay.portal.SystemException;
102 
103     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
104         long userId, long folderId, java.lang.String name,
105         java.lang.String title, java.lang.String description,
106         java.lang.String extraSettings, byte[] bytes,
107         com.liferay.portal.service.ServiceContext serviceContext)
108         throws com.liferay.portal.PortalException,
109             com.liferay.portal.SystemException;
110 
111     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
112         long userId, long folderId, java.lang.String name,
113         java.lang.String title, java.lang.String description,
114         java.lang.String extraSettings, java.io.File file,
115         com.liferay.portal.service.ServiceContext serviceContext)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException;
118 
119     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
120         java.lang.String uuid, long userId, long folderId,
121         java.lang.String name, java.lang.String title,
122         java.lang.String description, java.lang.String extraSettings,
123         byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException;
126 
127     public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
128         java.lang.String uuid, long userId, long folderId,
129         java.lang.String name, java.lang.String title,
130         java.lang.String description, java.lang.String extraSettings,
131         java.io.InputStream is, long size,
132         com.liferay.portal.service.ServiceContext serviceContext)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException;
135 
136     public void addFileEntryResources(long fileEntryId,
137         boolean addCommunityPermissions, boolean addGuestPermissions)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException;
140 
141     public void addFileEntryResources(
142         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
143         boolean addCommunityPermissions, boolean addGuestPermissions)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException;
146 
147     public void addFileEntryResources(long fileEntryId,
148         java.lang.String[] communityPermissions,
149         java.lang.String[] guestPermissions)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException;
152 
153     public void addFileEntryResources(
154         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
155         java.lang.String[] communityPermissions,
156         java.lang.String[] guestPermissions)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException;
159 
160     public com.liferay.portlet.documentlibrary.model.DLFileEntry addOrOverwriteFileEntry(
161         long userId, long folderId, java.lang.String name,
162         java.lang.String sourceName, java.lang.String title,
163         java.lang.String description, java.lang.String extraSettings,
164         java.io.File file,
165         com.liferay.portal.service.ServiceContext serviceContext)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException;
168 
169     public void deleteFileEntries(long folderId)
170         throws com.liferay.portal.PortalException,
171             com.liferay.portal.SystemException;
172 
173     public void deleteFileEntry(long folderId, java.lang.String name)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException;
176 
177     public void deleteFileEntry(long folderId, java.lang.String name,
178         double version)
179         throws com.liferay.portal.PortalException,
180             com.liferay.portal.SystemException;
181 
182     public void deleteFileEntry(
183         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException;
186 
187     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
189         long companyId, int start, int end)
190         throws com.liferay.portal.SystemException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getCompanyFileEntries(
194         long companyId, int start, int end,
195         com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.SystemException;
197 
198     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199     public int getCompanyFileEntriesCount(long companyId)
200         throws com.liferay.portal.SystemException;
201 
202     public java.io.InputStream getFileAsStream(long companyId, long userId,
203         long folderId, java.lang.String name)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException;
206 
207     public java.io.InputStream getFileAsStream(long companyId, long userId,
208         long folderId, java.lang.String name, double version)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
214         long folderId) throws com.liferay.portal.SystemException;
215 
216     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
218         long folderId, int start, int end)
219         throws com.liferay.portal.SystemException;
220 
221     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
223         long folderId, int start, int end,
224         com.liferay.portal.kernel.util.OrderByComparator obc)
225         throws com.liferay.portal.SystemException;
226 
227     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228     public int getFileEntriesCount(long folderId)
229         throws com.liferay.portal.SystemException;
230 
231     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232     public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
233         long fileEntryId)
234         throws com.liferay.portal.PortalException,
235             com.liferay.portal.SystemException;
236 
237     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238     public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
239         long folderId, java.lang.String name)
240         throws com.liferay.portal.PortalException,
241             com.liferay.portal.SystemException;
242 
243     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244     public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
245         java.lang.String uuid, long groupId)
246         throws com.liferay.portal.PortalException,
247             com.liferay.portal.SystemException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
251         long folderId, java.lang.String titleWithExtension)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException;
254 
255     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256     public int getFoldersFileEntriesCount(java.util.List<Long> folderIds)
257         throws com.liferay.portal.SystemException;
258 
259     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
260     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
261         long groupId, int start, int end)
262         throws com.liferay.portal.SystemException;
263 
264     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
266         long groupId, int start, int end,
267         com.liferay.portal.kernel.util.OrderByComparator obc)
268         throws com.liferay.portal.SystemException;
269 
270     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
272         long groupId, long userId, int start, int end)
273         throws com.liferay.portal.SystemException;
274 
275     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
277         long groupId, long userId, int start, int end,
278         com.liferay.portal.kernel.util.OrderByComparator obc)
279         throws com.liferay.portal.SystemException;
280 
281     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282     public int getGroupFileEntriesCount(long groupId)
283         throws com.liferay.portal.SystemException;
284 
285     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286     public int getGroupFileEntriesCount(long groupId, long userId)
287         throws com.liferay.portal.SystemException;
288 
289     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getNoAssetFileEntries()
291         throws com.liferay.portal.SystemException;
292 
293     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294     public void reIndex(long fileEntryId)
295         throws com.liferay.portal.SystemException;
296 
297     public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
298         long userId, long folderId, long newFolderId, java.lang.String name,
299         java.lang.String sourceFileName, java.lang.String title,
300         java.lang.String description, java.lang.String extraSettings,
301         java.io.File file,
302         com.liferay.portal.service.ServiceContext serviceContext)
303         throws com.liferay.portal.PortalException,
304             com.liferay.portal.SystemException;
305 
306     public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
307         long userId, long folderId, long newFolderId, java.lang.String name,
308         java.lang.String sourceFileName, java.lang.String title,
309         java.lang.String description, java.lang.String extraSettings,
310         byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
311         throws com.liferay.portal.PortalException,
312             com.liferay.portal.SystemException;
313 
314     public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
315         long userId, long folderId, long newFolderId, java.lang.String name,
316         java.lang.String sourceFileName, java.lang.String title,
317         java.lang.String description, java.lang.String extraSettings,
318         java.io.InputStream is, long size,
319         com.liferay.portal.service.ServiceContext serviceContext)
320         throws com.liferay.portal.PortalException,
321             com.liferay.portal.SystemException;
322 
323     public void updateTagsAsset(long userId,
324         com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
325         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
326         throws com.liferay.portal.PortalException,
327             com.liferay.portal.SystemException;
328 }