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 addStructure(
107         long userId, long groupId, java.lang.String structureId,
108         boolean autoStructureId, java.lang.String parentStructureId,
109         java.lang.String name, java.lang.String description,
110         java.lang.String xsd, boolean addCommunityPermissions,
111         boolean addGuestPermissions)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException {
114         return getService()
115                    .addStructure(userId, groupId, structureId, autoStructureId,
116             parentStructureId, name, description, xsd, addCommunityPermissions,
117             addGuestPermissions);
118     }
119 
120     public static com.liferay.portlet.journal.model.JournalStructure addStructure(
121         java.lang.String uuid, long userId, long groupId,
122         java.lang.String structureId, boolean autoStructureId,
123         java.lang.String parentStructureId, java.lang.String name,
124         java.lang.String description, java.lang.String xsd,
125         boolean addCommunityPermissions, boolean addGuestPermissions)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService()
129                    .addStructure(uuid, userId, groupId, structureId,
130             autoStructureId, parentStructureId, name, description, xsd,
131             addCommunityPermissions, addGuestPermissions);
132     }
133 
134     public static com.liferay.portlet.journal.model.JournalStructure addStructure(
135         long userId, long groupId, java.lang.String structureId,
136         boolean autoStructureId, java.lang.String parentStructureId,
137         java.lang.String name, java.lang.String description,
138         java.lang.String xsd, java.lang.String[] communityPermissions,
139         java.lang.String[] guestPermissions)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         return getService()
143                    .addStructure(userId, groupId, structureId, autoStructureId,
144             parentStructureId, name, description, xsd, communityPermissions,
145             guestPermissions);
146     }
147 
148     public static com.liferay.portlet.journal.model.JournalStructure addStructure(
149         java.lang.String uuid, long userId, long groupId,
150         java.lang.String structureId, boolean autoStructureId,
151         java.lang.String parentStructureId, java.lang.String name,
152         java.lang.String description, java.lang.String xsd,
153         java.lang.Boolean addCommunityPermissions,
154         java.lang.Boolean addGuestPermissions,
155         java.lang.String[] communityPermissions,
156         java.lang.String[] guestPermissions)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         return getService()
160                    .addStructure(uuid, userId, groupId, structureId,
161             autoStructureId, parentStructureId, name, description, xsd,
162             addCommunityPermissions, addGuestPermissions, communityPermissions,
163             guestPermissions);
164     }
165 
166     public static void addStructureResources(long groupId,
167         java.lang.String structureId, boolean addCommunityPermissions,
168         boolean addGuestPermissions)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException {
171         getService()
172             .addStructureResources(groupId, structureId,
173             addCommunityPermissions, addGuestPermissions);
174     }
175 
176     public static void addStructureResources(
177         com.liferay.portlet.journal.model.JournalStructure structure,
178         boolean addCommunityPermissions, boolean addGuestPermissions)
179         throws com.liferay.portal.PortalException,
180             com.liferay.portal.SystemException {
181         getService()
182             .addStructureResources(structure, addCommunityPermissions,
183             addGuestPermissions);
184     }
185 
186     public static void addStructureResources(long groupId,
187         java.lang.String structureId, java.lang.String[] communityPermissions,
188         java.lang.String[] guestPermissions)
189         throws com.liferay.portal.PortalException,
190             com.liferay.portal.SystemException {
191         getService()
192             .addStructureResources(groupId, structureId, communityPermissions,
193             guestPermissions);
194     }
195 
196     public static void addStructureResources(
197         com.liferay.portlet.journal.model.JournalStructure structure,
198         java.lang.String[] communityPermissions,
199         java.lang.String[] guestPermissions)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         getService()
203             .addStructureResources(structure, communityPermissions,
204             guestPermissions);
205     }
206 
207     public static void checkNewLine(long groupId, java.lang.String structureId)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException {
210         getService().checkNewLine(groupId, structureId);
211     }
212 
213     public static com.liferay.portlet.journal.model.JournalStructure copyStructure(
214         long userId, long groupId, java.lang.String oldStructureId,
215         java.lang.String newStructureId, boolean autoStructureId)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         return getService()
219                    .copyStructure(userId, groupId, oldStructureId,
220             newStructureId, autoStructureId);
221     }
222 
223     public static void deleteStructure(long groupId,
224         java.lang.String structureId)
225         throws com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException {
227         getService().deleteStructure(groupId, structureId);
228     }
229 
230     public static void deleteStructure(
231         com.liferay.portlet.journal.model.JournalStructure structure)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException {
234         getService().deleteStructure(structure);
235     }
236 
237     public static void deleteStructures(long groupId)
238         throws com.liferay.portal.PortalException,
239             com.liferay.portal.SystemException {
240         getService().deleteStructures(groupId);
241     }
242 
243     public static com.liferay.portlet.journal.model.JournalStructure getStructure(
244         long id)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException {
247         return getService().getStructure(id);
248     }
249 
250     public static com.liferay.portlet.journal.model.JournalStructure getStructure(
251         long groupId, java.lang.String structureId)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException {
254         return getService().getStructure(groupId, structureId);
255     }
256 
257     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getStructures()
258         throws com.liferay.portal.SystemException {
259         return getService().getStructures();
260     }
261 
262     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getStructures(
263         long groupId) throws com.liferay.portal.SystemException {
264         return getService().getStructures(groupId);
265     }
266 
267     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getStructures(
268         long groupId, int start, int end)
269         throws com.liferay.portal.SystemException {
270         return getService().getStructures(groupId, start, end);
271     }
272 
273     public static int getStructuresCount(long groupId)
274         throws com.liferay.portal.SystemException {
275         return getService().getStructuresCount(groupId);
276     }
277 
278     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
279         long companyId, long groupId, java.lang.String keywords, int start,
280         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
281         throws com.liferay.portal.SystemException {
282         return getService().search(companyId, groupId, keywords, start, end, obc);
283     }
284 
285     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
286         long companyId, long groupId, java.lang.String structureId,
287         java.lang.String name, java.lang.String description,
288         boolean andOperator, int start, int end,
289         com.liferay.portal.kernel.util.OrderByComparator obc)
290         throws com.liferay.portal.SystemException {
291         return getService()
292                    .search(companyId, groupId, structureId, name, description,
293             andOperator, start, end, obc);
294     }
295 
296     public static int searchCount(long companyId, long groupId,
297         java.lang.String keywords) throws com.liferay.portal.SystemException {
298         return getService().searchCount(companyId, groupId, keywords);
299     }
300 
301     public static int searchCount(long companyId, long groupId,
302         java.lang.String structureId, java.lang.String name,
303         java.lang.String description, boolean andOperator)
304         throws com.liferay.portal.SystemException {
305         return getService()
306                    .searchCount(companyId, groupId, structureId, name,
307             description, andOperator);
308     }
309 
310     public static com.liferay.portlet.journal.model.JournalStructure updateStructure(
311         long groupId, java.lang.String structureId,
312         java.lang.String parentStructureId, java.lang.String name,
313         java.lang.String description, java.lang.String xsd)
314         throws com.liferay.portal.PortalException,
315             com.liferay.portal.SystemException {
316         return getService()
317                    .updateStructure(groupId, structureId, parentStructureId,
318             name, description, xsd);
319     }
320 
321     public static JournalStructureLocalService getService() {
322         if (_service == null) {
323             throw new RuntimeException(
324                 "JournalStructureLocalService is not set");
325         }
326 
327         return _service;
328     }
329 
330     public void setService(JournalStructureLocalService service) {
331         _service = service;
332     }
333 
334     private static JournalStructureLocalService _service;
335 }