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