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.PortalException,
73              com.liferay.portal.SystemException {
74          DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
75  
76          dlFileShortcutLocalService.deleteDLFileShortcut(dlFileShortcut);
77      }
78  
79      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> dynamicQuery(
80          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
81          throws com.liferay.portal.SystemException {
82          DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
83  
84          return dlFileShortcutLocalService.dynamicQuery(queryInitializer);
85      }
86  
87      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> dynamicQuery(
88          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
89          int begin, int end) throws com.liferay.portal.SystemException {
90          DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
91  
92          return dlFileShortcutLocalService.dynamicQuery(queryInitializer, begin,
93              end);
94      }
95  
96      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateDLFileShortcut(
97          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
98          throws com.liferay.portal.SystemException {
99          DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
100 
101         return dlFileShortcutLocalService.updateDLFileShortcut(dlFileShortcut);
102     }
103 
104     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
105         long userId, long folderId, long toFolderId, java.lang.String toName,
106         boolean addCommunityPermissions, boolean addGuestPermissions)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException {
109         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
110 
111         return dlFileShortcutLocalService.addFileShortcut(userId, folderId,
112             toFolderId, toName, addCommunityPermissions, addGuestPermissions);
113     }
114 
115     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
116         java.lang.String uuid, long userId, long folderId, long toFolderId,
117         java.lang.String toName, boolean addCommunityPermissions,
118         boolean addGuestPermissions)
119         throws com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException {
121         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
122 
123         return dlFileShortcutLocalService.addFileShortcut(uuid, userId,
124             folderId, toFolderId, toName, addCommunityPermissions,
125             addGuestPermissions);
126     }
127 
128     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
129         long userId, long folderId, long toFolderId, java.lang.String toName,
130         java.lang.String[] communityPermissions,
131         java.lang.String[] guestPermissions)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
135 
136         return dlFileShortcutLocalService.addFileShortcut(userId, folderId,
137             toFolderId, toName, communityPermissions, guestPermissions);
138     }
139 
140     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut(
141         java.lang.String uuid, long userId, long folderId, long toFolderId,
142         java.lang.String toName, java.lang.Boolean addCommunityPermissions,
143         java.lang.Boolean addGuestPermissions,
144         java.lang.String[] communityPermissions,
145         java.lang.String[] guestPermissions)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException {
148         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
149 
150         return dlFileShortcutLocalService.addFileShortcut(uuid, userId,
151             folderId, toFolderId, toName, addCommunityPermissions,
152             addGuestPermissions, communityPermissions, guestPermissions);
153     }
154 
155     public static void addFileShortcutResources(long fileShortcutId,
156         boolean addCommunityPermissions, boolean addGuestPermissions)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
160 
161         dlFileShortcutLocalService.addFileShortcutResources(fileShortcutId,
162             addCommunityPermissions, addGuestPermissions);
163     }
164 
165     public static void addFileShortcutResources(
166         com.liferay.portlet.documentlibrary.model.DLFolder folder,
167         com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut,
168         boolean addCommunityPermissions, boolean addGuestPermissions)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException {
171         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
172 
173         dlFileShortcutLocalService.addFileShortcutResources(folder,
174             fileShortcut, addCommunityPermissions, addGuestPermissions);
175     }
176 
177     public static void addFileShortcutResources(long fileShortcutId,
178         java.lang.String[] communityPermissions,
179         java.lang.String[] guestPermissions)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException {
182         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
183 
184         dlFileShortcutLocalService.addFileShortcutResources(fileShortcutId,
185             communityPermissions, guestPermissions);
186     }
187 
188     public static void addFileShortcutResources(
189         com.liferay.portlet.documentlibrary.model.DLFolder folder,
190         com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut,
191         java.lang.String[] communityPermissions,
192         java.lang.String[] guestPermissions)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException {
195         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
196 
197         dlFileShortcutLocalService.addFileShortcutResources(folder,
198             fileShortcut, communityPermissions, guestPermissions);
199     }
200 
201     public static void deleteFileShortcut(long fileShortcutId)
202         throws com.liferay.portal.PortalException,
203             com.liferay.portal.SystemException {
204         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
205 
206         dlFileShortcutLocalService.deleteFileShortcut(fileShortcutId);
207     }
208 
209     public static void deleteFileShortcut(
210         com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut)
211         throws com.liferay.portal.PortalException,
212             com.liferay.portal.SystemException {
213         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
214 
215         dlFileShortcutLocalService.deleteFileShortcut(fileShortcut);
216     }
217 
218     public static void deleteFileShortcuts(long toFolderId,
219         java.lang.String toName)
220         throws com.liferay.portal.PortalException,
221             com.liferay.portal.SystemException {
222         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
223 
224         dlFileShortcutLocalService.deleteFileShortcuts(toFolderId, toName);
225     }
226 
227     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut(
228         long fileShortcutId)
229         throws com.liferay.portal.PortalException,
230             com.liferay.portal.SystemException {
231         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
232 
233         return dlFileShortcutLocalService.getFileShortcut(fileShortcutId);
234     }
235 
236     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut(
237         long userId, long fileShortcutId, long folderId, long toFolderId,
238         java.lang.String toName)
239         throws com.liferay.portal.PortalException,
240             com.liferay.portal.SystemException {
241         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
242 
243         return dlFileShortcutLocalService.updateFileShortcut(userId,
244             fileShortcutId, folderId, toFolderId, toName);
245     }
246 
247     public static void updateFileShortcuts(long oldToFolderId,
248         java.lang.String oldToName, long newToFolderId,
249         java.lang.String newToName)
250         throws com.liferay.portal.PortalException,
251             com.liferay.portal.SystemException {
252         DLFileShortcutLocalService dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getService();
253 
254         dlFileShortcutLocalService.updateFileShortcuts(oldToFolderId,
255             oldToName, newToFolderId, newToName);
256     }
257 }