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.journal.service;
24  
25  /**
26   * <a href="JournalStructureLocalServiceUtil.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.journal.service.JournalStructureLocalService</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.journal.service.JournalStructureLocalServiceFactory</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.journal.service.JournalStructureLocalService
48   * @see com.liferay.portlet.journal.service.JournalStructureLocalServiceFactory
49   *
50   */
51  public class JournalStructureLocalServiceUtil {
52      public static com.liferay.portlet.journal.model.JournalStructure addJournalStructure(
53          com.liferay.portlet.journal.model.JournalStructure model)
54          throws com.liferay.portal.SystemException {
55          JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
56  
57          return journalStructureLocalService.addJournalStructure(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          JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
64  
65          return journalStructureLocalService.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          JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
72  
73          return journalStructureLocalService.dynamicQuery(queryInitializer,
74              begin, end);
75      }
76  
77      public static com.liferay.portlet.journal.model.JournalStructure updateJournalStructure(
78          com.liferay.portlet.journal.model.JournalStructure model)
79          throws com.liferay.portal.SystemException {
80          JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
81  
82          return journalStructureLocalService.updateJournalStructure(model);
83      }
84  
85      public static com.liferay.portlet.journal.model.JournalStructure addStructure(
86          long userId, java.lang.String structureId, boolean autoStructureId,
87          long plid, java.lang.String name, java.lang.String description,
88          java.lang.String xsd, boolean addCommunityPermissions,
89          boolean addGuestPermissions)
90          throws com.liferay.portal.PortalException, 
91              com.liferay.portal.SystemException {
92          JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
93  
94          return journalStructureLocalService.addStructure(userId, structureId,
95              autoStructureId, plid, name, description, xsd,
96              addCommunityPermissions, addGuestPermissions);
97      }
98  
99      public static com.liferay.portlet.journal.model.JournalStructure addStructure(
100         long userId, java.lang.String structureId, boolean autoStructureId,
101         long plid, java.lang.String name, java.lang.String description,
102         java.lang.String xsd, java.lang.String[] communityPermissions,
103         java.lang.String[] guestPermissions)
104         throws com.liferay.portal.PortalException, 
105             com.liferay.portal.SystemException {
106         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
107 
108         return journalStructureLocalService.addStructure(userId, structureId,
109             autoStructureId, plid, name, description, xsd,
110             communityPermissions, guestPermissions);
111     }
112 
113     public static com.liferay.portlet.journal.model.JournalStructure addStructure(
114         long userId, java.lang.String structureId, boolean autoStructureId,
115         long plid, java.lang.String name, java.lang.String description,
116         java.lang.String xsd, java.lang.Boolean addCommunityPermissions,
117         java.lang.Boolean addGuestPermissions,
118         java.lang.String[] communityPermissions,
119         java.lang.String[] guestPermissions)
120         throws com.liferay.portal.PortalException, 
121             com.liferay.portal.SystemException {
122         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
123 
124         return journalStructureLocalService.addStructure(userId, structureId,
125             autoStructureId, plid, name, description, xsd,
126             addCommunityPermissions, addGuestPermissions, communityPermissions,
127             guestPermissions);
128     }
129 
130     public static com.liferay.portlet.journal.model.JournalStructure addStructureToGroup(
131         long userId, java.lang.String structureId, boolean autoStructureId,
132         long groupId, java.lang.String name, java.lang.String description,
133         java.lang.String xsd, java.lang.Boolean addCommunityPermissions,
134         java.lang.Boolean addGuestPermissions,
135         java.lang.String[] communityPermissions,
136         java.lang.String[] guestPermissions)
137         throws com.liferay.portal.PortalException, 
138             com.liferay.portal.SystemException {
139         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
140 
141         return journalStructureLocalService.addStructureToGroup(userId,
142             structureId, autoStructureId, groupId, name, description, xsd,
143             addCommunityPermissions, addGuestPermissions, communityPermissions,
144             guestPermissions);
145     }
146 
147     public static void addStructureResources(long groupId,
148         java.lang.String structureId, boolean addCommunityPermissions,
149         boolean addGuestPermissions)
150         throws com.liferay.portal.PortalException, 
151             com.liferay.portal.SystemException {
152         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
153         journalStructureLocalService.addStructureResources(groupId,
154             structureId, addCommunityPermissions, addGuestPermissions);
155     }
156 
157     public static void addStructureResources(
158         com.liferay.portlet.journal.model.JournalStructure structure,
159         boolean addCommunityPermissions, boolean addGuestPermissions)
160         throws com.liferay.portal.PortalException, 
161             com.liferay.portal.SystemException {
162         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
163         journalStructureLocalService.addStructureResources(structure,
164             addCommunityPermissions, addGuestPermissions);
165     }
166 
167     public static void addStructureResources(long groupId,
168         java.lang.String structureId, java.lang.String[] communityPermissions,
169         java.lang.String[] guestPermissions)
170         throws com.liferay.portal.PortalException, 
171             com.liferay.portal.SystemException {
172         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
173         journalStructureLocalService.addStructureResources(groupId,
174             structureId, communityPermissions, guestPermissions);
175     }
176 
177     public static void addStructureResources(
178         com.liferay.portlet.journal.model.JournalStructure structure,
179         java.lang.String[] communityPermissions,
180         java.lang.String[] guestPermissions)
181         throws com.liferay.portal.PortalException, 
182             com.liferay.portal.SystemException {
183         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
184         journalStructureLocalService.addStructureResources(structure,
185             communityPermissions, guestPermissions);
186     }
187 
188     public static void checkNewLine(long groupId, java.lang.String structureId)
189         throws com.liferay.portal.PortalException, 
190             com.liferay.portal.SystemException {
191         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
192         journalStructureLocalService.checkNewLine(groupId, structureId);
193     }
194 
195     public static void deleteStructure(long groupId,
196         java.lang.String structureId)
197         throws com.liferay.portal.PortalException, 
198             com.liferay.portal.SystemException {
199         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
200         journalStructureLocalService.deleteStructure(groupId, structureId);
201     }
202 
203     public static void deleteStructure(
204         com.liferay.portlet.journal.model.JournalStructure structure)
205         throws com.liferay.portal.PortalException, 
206             com.liferay.portal.SystemException {
207         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
208         journalStructureLocalService.deleteStructure(structure);
209     }
210 
211     public static com.liferay.portlet.journal.model.JournalStructure getStructure(
212         long id)
213         throws com.liferay.portal.PortalException, 
214             com.liferay.portal.SystemException {
215         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
216 
217         return journalStructureLocalService.getStructure(id);
218     }
219 
220     public static com.liferay.portlet.journal.model.JournalStructure getStructure(
221         long groupId, java.lang.String structureId)
222         throws com.liferay.portal.PortalException, 
223             com.liferay.portal.SystemException {
224         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
225 
226         return journalStructureLocalService.getStructure(groupId, structureId);
227     }
228 
229     public static java.util.List getStructures()
230         throws com.liferay.portal.SystemException {
231         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
232 
233         return journalStructureLocalService.getStructures();
234     }
235 
236     public static java.util.List getStructures(long groupId)
237         throws com.liferay.portal.SystemException {
238         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
239 
240         return journalStructureLocalService.getStructures(groupId);
241     }
242 
243     public static java.util.List getStructures(long groupId, int begin, int end)
244         throws com.liferay.portal.SystemException {
245         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
246 
247         return journalStructureLocalService.getStructures(groupId, begin, end);
248     }
249 
250     public static int getStructuresCount(long groupId)
251         throws com.liferay.portal.SystemException {
252         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
253 
254         return journalStructureLocalService.getStructuresCount(groupId);
255     }
256 
257     public static java.util.List search(long companyId, long groupId,
258         java.lang.String keywords, int begin, int end,
259         com.liferay.portal.kernel.util.OrderByComparator obc)
260         throws com.liferay.portal.SystemException {
261         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
262 
263         return journalStructureLocalService.search(companyId, groupId,
264             keywords, begin, end, obc);
265     }
266 
267     public static java.util.List search(long companyId, long groupId,
268         java.lang.String structureId, java.lang.String name,
269         java.lang.String description, boolean andOperator, int begin, int end,
270         com.liferay.portal.kernel.util.OrderByComparator obc)
271         throws com.liferay.portal.SystemException {
272         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
273 
274         return journalStructureLocalService.search(companyId, groupId,
275             structureId, name, description, andOperator, begin, end, obc);
276     }
277 
278     public static int searchCount(long companyId, long groupId,
279         java.lang.String keywords) throws com.liferay.portal.SystemException {
280         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
281 
282         return journalStructureLocalService.searchCount(companyId, groupId,
283             keywords);
284     }
285 
286     public static int searchCount(long companyId, long groupId,
287         java.lang.String structureId, java.lang.String name,
288         java.lang.String description, boolean andOperator)
289         throws com.liferay.portal.SystemException {
290         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
291 
292         return journalStructureLocalService.searchCount(companyId, groupId,
293             structureId, name, description, andOperator);
294     }
295 
296     public static com.liferay.portlet.journal.model.JournalStructure updateStructure(
297         long groupId, java.lang.String structureId, java.lang.String name,
298         java.lang.String description, java.lang.String xsd)
299         throws com.liferay.portal.PortalException, 
300             com.liferay.portal.SystemException {
301         JournalStructureLocalService journalStructureLocalService = JournalStructureLocalServiceFactory.getService();
302 
303         return journalStructureLocalService.updateStructure(groupId,
304             structureId, name, description, xsd);
305     }
306 }