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="DLFolderLocalService.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.DLFolderLocalServiceImpl</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.DLFolderLocalServiceUtil
52   *
53   */
54  @Transactional(rollbackFor =  {
55      PortalException.class, SystemException.class})
56  public interface DLFolderLocalService {
57      public com.liferay.portlet.documentlibrary.model.DLFolder addDLFolder(
58          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
59          throws com.liferay.portal.SystemException;
60  
61      public com.liferay.portlet.documentlibrary.model.DLFolder createDLFolder(
62          long folderId);
63  
64      public void deleteDLFolder(long folderId)
65          throws com.liferay.portal.SystemException,
66              com.liferay.portal.PortalException;
67  
68      public void deleteDLFolder(
69          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
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.DLFolder getDLFolder(
82          long folderId)
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.DLFolder> getDLFolders(
88          int start, int end) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public int getDLFoldersCount() throws com.liferay.portal.SystemException;
92  
93      public com.liferay.portlet.documentlibrary.model.DLFolder updateDLFolder(
94          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
95          throws com.liferay.portal.SystemException;
96  
97      public com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
98          long userId, long groupId, long parentFolderId, java.lang.String name,
99          java.lang.String description, boolean addCommunityPermissions,
100         boolean addGuestPermissions)
101         throws com.liferay.portal.PortalException,
102             com.liferay.portal.SystemException;
103 
104     public com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
105         java.lang.String uuid, long userId, long groupId, long parentFolderId,
106         java.lang.String name, java.lang.String description,
107         boolean addCommunityPermissions, boolean addGuestPermissions)
108         throws com.liferay.portal.PortalException,
109             com.liferay.portal.SystemException;
110 
111     public com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
112         long userId, long groupId, long parentFolderId, java.lang.String name,
113         java.lang.String description, java.lang.String[] communityPermissions,
114         java.lang.String[] guestPermissions)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException;
117 
118     public com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
119         java.lang.String uuid, long userId, long groupId, long parentFolderId,
120         java.lang.String name, java.lang.String description,
121         java.lang.Boolean addCommunityPermissions,
122         java.lang.Boolean addGuestPermissions,
123         java.lang.String[] communityPermissions,
124         java.lang.String[] guestPermissions)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException;
127 
128     public void addFolderResources(long folderId,
129         boolean addCommunityPermissions, boolean addGuestPermissions)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException;
132 
133     public void addFolderResources(
134         com.liferay.portlet.documentlibrary.model.DLFolder folder,
135         boolean addCommunityPermissions, boolean addGuestPermissions)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException;
138 
139     public void addFolderResources(long folderId,
140         java.lang.String[] communityPermissions,
141         java.lang.String[] guestPermissions)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException;
144 
145     public void addFolderResources(
146         com.liferay.portlet.documentlibrary.model.DLFolder folder,
147         java.lang.String[] communityPermissions,
148         java.lang.String[] guestPermissions)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException;
151 
152     public void deleteFolder(long folderId)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException;
155 
156     public void deleteFolder(
157         com.liferay.portlet.documentlibrary.model.DLFolder folder)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException;
160 
161     public void deleteFolders(long groupId)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException;
164 
165     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166     public java.util.List<Object> getFileEntriesAndFileShortcuts(
167         long folderId, int start, int end)
168         throws com.liferay.portal.SystemException;
169 
170     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171     public java.util.List<Object> getFileEntriesAndFileShortcuts(
172         java.util.List<Long> folderIds, int start, int end)
173         throws com.liferay.portal.SystemException;
174 
175     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176     public int getFileEntriesAndFileShortcutsCount(long folderId)
177         throws com.liferay.portal.SystemException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public int getFileEntriesAndFileShortcutsCount(
181         java.util.List<Long> folderIds)
182         throws com.liferay.portal.SystemException;
183 
184     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185     public com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
186         long folderId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException;
189 
190     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191     public com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
192         long groupId, long parentFolderId, java.lang.String name)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException;
195 
196     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197     public java.util.List<Object> getFoldersAndFileEntriesAndFileShortcuts(
198         long folderId, int start, int end)
199         throws com.liferay.portal.SystemException;
200 
201     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202     public java.util.List<Object> getFoldersAndFileEntriesAndFileShortcuts(
203         java.util.List<Long> folderIds, int start, int end)
204         throws com.liferay.portal.SystemException;
205 
206     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207     public int getFoldersAndFileEntriesAndFileShortcutsCount(long folderId)
208         throws com.liferay.portal.SystemException;
209 
210     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211     public int getFoldersAndFileEntriesAndFileShortcutsCount(
212         java.util.List<Long> folderIds)
213         throws com.liferay.portal.SystemException;
214 
215     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
217         long companyId) throws com.liferay.portal.SystemException;
218 
219     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
221         long groupId, long parentFolderId)
222         throws com.liferay.portal.SystemException;
223 
224     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
226         long groupId, long parentFolderId, int start, int end)
227         throws com.liferay.portal.SystemException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public int getFoldersCount(long groupId, long parentFolderId)
231         throws com.liferay.portal.SystemException;
232 
233     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234     public void getSubfolderIds(java.util.List<Long> folderIds, long groupId,
235         long folderId) throws com.liferay.portal.SystemException;
236 
237     public void reIndex(java.lang.String[] ids)
238         throws com.liferay.portal.SystemException;
239 
240     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241     public com.liferay.portal.kernel.search.Hits search(long companyId,
242         long groupId, long userId, long[] folderIds, java.lang.String keywords,
243         int start, int end) throws com.liferay.portal.SystemException;
244 
245     public com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
246         long folderId, long parentFolderId, java.lang.String name,
247         java.lang.String description)
248         throws com.liferay.portal.PortalException,
249             com.liferay.portal.SystemException;
250 }