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