1   /**
2    * Copyright (c) 2000-2008 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  
26  /**
27   * <a href="DLFileShortcutLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService
50   * @see com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalServiceFactory
51   *
52   */
53  public class DLFileShortcutLocalServiceUtil {
54      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addDLFileShortcut(
55          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
56          throws com.liferay.portal.SystemException {
57          DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
58  
59          return dlFileShortcutLocalService.addDLFileShortcut(dlFileShortcut);
60      }
61  
62      public static void deleteDLFileShortcut(long fileShortcutId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
66  
67          dlFileShortcutLocalService.deleteDLFileShortcut(fileShortcutId);
68      }
69  
70      public static void deleteDLFileShortcut(
71          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
72          throws com.liferay.portal.SystemException {
73          DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
74  
75          dlFileShortcutLocalService.deleteDLFileShortcut(dlFileShortcut);
76      }
77  
78      public static java.util.List<Object> dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80          throws com.liferay.portal.SystemException {
81          DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
82  
83          return dlFileShortcutLocalService.dynamicQuery(dynamicQuery);
84      }
85  
86      public static java.util.List<Object> dynamicQuery(
87          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88          int end) throws com.liferay.portal.SystemException {
89          DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
90  
91          return dlFileShortcutLocalService.dynamicQuery(dynamicQuery, start, end);
92      }
93  
94      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcut(
95          long fileShortcutId)
96          throws com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException {
98          DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
99  
100         return dlFileShortcutLocalService.getDLFileShortcut(fileShortcutId);
101     }
102 
103     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateDLFileShortcut(
104         com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
105         throws com.liferay.portal.SystemException {
106         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
107 
108         return dlFileShortcutLocalService.updateDLFileShortcut(dlFileShortcut);
109     }
110 
111     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
112         long userId, long folderId, long toFolderId, java.lang.String toName,
113         boolean addCommunityPermissions, boolean addGuestPermissions)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException {
116         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
117 
118         return dlFileShortcutLocalService.addFileShortcut(userId, folderId,
119             toFolderId, toName, addCommunityPermissions, addGuestPermissions);
120     }
121 
122     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
123         java.lang.String uuid, long userId, long folderId, long toFolderId,
124         java.lang.String toName, boolean addCommunityPermissions,
125         boolean addGuestPermissions)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
129 
130         return dlFileShortcutLocalService.addFileShortcut(uuid, userId,
131             folderId, toFolderId, toName, addCommunityPermissions,
132             addGuestPermissions);
133     }
134 
135     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
136         long userId, long folderId, long toFolderId, java.lang.String toName,
137         java.lang.String[] communityPermissions,
138         java.lang.String[] guestPermissions)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException {
141         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
142 
143         return dlFileShortcutLocalService.addFileShortcut(userId, folderId,
144             toFolderId, toName, communityPermissions, guestPermissions);
145     }
146 
147     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
148         java.lang.String uuid, long userId, long folderId, long toFolderId,
149         java.lang.String toName, java.lang.Boolean addCommunityPermissions,
150         java.lang.Boolean addGuestPermissions,
151         java.lang.String[] communityPermissions,
152         java.lang.String[] guestPermissions)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException {
155         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
156 
157         return dlFileShortcutLocalService.addFileShortcut(uuid, userId,
158             folderId, toFolderId, toName, addCommunityPermissions,
159             addGuestPermissions, communityPermissions, guestPermissions);
160     }
161 
162     public static void addFileShortcutResources(long fileShortcutId,
163         boolean addCommunityPermissions, boolean addGuestPermissions)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
167 
168         dlFileShortcutLocalService.addFileShortcutResources(fileShortcutId,
169             addCommunityPermissions, addGuestPermissions);
170     }
171 
172     public static void addFileShortcutResources(
173         com.liferay.portlet.documentlibrary.model.DLFolder folder,
174         com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut,
175         boolean addCommunityPermissions, boolean addGuestPermissions)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException {
178         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
179 
180         dlFileShortcutLocalService.addFileShortcutResources(folder,
181             fileShortcut, addCommunityPermissions, addGuestPermissions);
182     }
183 
184     public static void addFileShortcutResources(long fileShortcutId,
185         java.lang.String[] communityPermissions,
186         java.lang.String[] guestPermissions)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException {
189         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
190 
191         dlFileShortcutLocalService.addFileShortcutResources(fileShortcutId,
192             communityPermissions, guestPermissions);
193     }
194 
195     public static void addFileShortcutResources(
196         com.liferay.portlet.documentlibrary.model.DLFolder folder,
197         com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut,
198         java.lang.String[] communityPermissions,
199         java.lang.String[] guestPermissions)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
203 
204         dlFileShortcutLocalService.addFileShortcutResources(folder,
205             fileShortcut, communityPermissions, guestPermissions);
206     }
207 
208     public static void deleteFileShortcut(long fileShortcutId)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException {
211         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
212 
213         dlFileShortcutLocalService.deleteFileShortcut(fileShortcutId);
214     }
215 
216     public static void deleteFileShortcut(
217         com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut)
218         throws com.liferay.portal.PortalException,
219             com.liferay.portal.SystemException {
220         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
221 
222         dlFileShortcutLocalService.deleteFileShortcut(fileShortcut);
223     }
224 
225     public static void deleteFileShortcuts(long toFolderId,
226         java.lang.String toName)
227         throws com.liferay.portal.PortalException,
228             com.liferay.portal.SystemException {
229         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
230 
231         dlFileShortcutLocalService.deleteFileShortcuts(toFolderId, toName);
232     }
233 
234     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut(
235         long fileShortcutId)
236         throws com.liferay.portal.PortalException,
237             com.liferay.portal.SystemException {
238         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
239 
240         return dlFileShortcutLocalService.getFileShortcut(fileShortcutId);
241     }
242 
243     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut(
244         long userId, long fileShortcutId, long folderId, long toFolderId,
245         java.lang.String toName)
246         throws com.liferay.portal.PortalException,
247             com.liferay.portal.SystemException {
248         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
249 
250         return dlFileShortcutLocalService.updateFileShortcut(userId,
251             fileShortcutId, folderId, toFolderId, toName);
252     }
253 
254     public static void updateFileShortcuts(long oldToFolderId,
255         java.lang.String oldToName, long newToFolderId,
256         java.lang.String newToName) throws com.liferay.portal.SystemException {
257         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
258 
259         dlFileShortcutLocalService.updateFileShortcuts(oldToFolderId,
260             oldToName, newToFolderId, newToName);
261     }
262 }