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