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.journal.service;
24  
25  
26  /**
27   * <a href="JournalTemplateLocalServiceUtil.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.JournalTemplateLocalService</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.JournalTemplateLocalService
45   *
46   */
47  public class JournalTemplateLocalServiceUtil {
48      public static com.liferay.portlet.journal.model.JournalTemplate addJournalTemplate(
49          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
50          throws com.liferay.portal.SystemException {
51          return getService().addJournalTemplate(journalTemplate);
52      }
53  
54      public static com.liferay.portlet.journal.model.JournalTemplate createJournalTemplate(
55          long id) {
56          return getService().createJournalTemplate(id);
57      }
58  
59      public static void deleteJournalTemplate(long id)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteJournalTemplate(id);
63      }
64  
65      public static void deleteJournalTemplate(
66          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
67          throws com.liferay.portal.SystemException {
68          getService().deleteJournalTemplate(journalTemplate);
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.JournalTemplate getJournalTemplate(
84          long id)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getJournalTemplate(id);
88      }
89  
90      public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getJournalTemplates(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getJournalTemplates(start, end);
93      }
94  
95      public static int getJournalTemplatesCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getJournalTemplatesCount();
98      }
99  
100     public static com.liferay.portlet.journal.model.JournalTemplate updateJournalTemplate(
101         com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
102         throws com.liferay.portal.SystemException {
103         return getService().updateJournalTemplate(journalTemplate);
104     }
105 
106     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
107         long userId, java.lang.String templateId, boolean autoTemplateId,
108         long plid, java.lang.String structureId, java.lang.String name,
109         java.lang.String description, java.lang.String xsl, boolean formatXsl,
110         java.lang.String langType, boolean cacheable, boolean smallImage,
111         java.lang.String smallImageURL, java.io.File smallFile,
112         boolean addCommunityPermissions, boolean addGuestPermissions)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         return getService()
116                    .addTemplate(userId, templateId, autoTemplateId, plid,
117             structureId, name, description, xsl, formatXsl, langType,
118             cacheable, smallImage, smallImageURL, smallFile,
119             addCommunityPermissions, addGuestPermissions);
120     }
121 
122     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
123         java.lang.String uuid, long userId, java.lang.String templateId,
124         boolean autoTemplateId, long plid, java.lang.String structureId,
125         java.lang.String name, java.lang.String description,
126         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
127         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
128         java.io.File smallFile, boolean addCommunityPermissions,
129         boolean addGuestPermissions)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException {
132         return getService()
133                    .addTemplate(uuid, userId, templateId, autoTemplateId, plid,
134             structureId, name, description, xsl, formatXsl, langType,
135             cacheable, smallImage, smallImageURL, smallFile,
136             addCommunityPermissions, addGuestPermissions);
137     }
138 
139     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
140         long userId, java.lang.String templateId, boolean autoTemplateId,
141         long plid, java.lang.String structureId, java.lang.String name,
142         java.lang.String description, java.lang.String xsl, boolean formatXsl,
143         java.lang.String langType, boolean cacheable, boolean smallImage,
144         java.lang.String smallImageURL, java.io.File smallFile,
145         java.lang.String[] communityPermissions,
146         java.lang.String[] guestPermissions)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException {
149         return getService()
150                    .addTemplate(userId, templateId, autoTemplateId, plid,
151             structureId, name, description, xsl, formatXsl, langType,
152             cacheable, smallImage, smallImageURL, smallFile,
153             communityPermissions, guestPermissions);
154     }
155 
156     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
157         java.lang.String uuid, long userId, java.lang.String templateId,
158         boolean autoTemplateId, long plid, java.lang.String structureId,
159         java.lang.String name, java.lang.String description,
160         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
161         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
162         java.io.File smallFile, java.lang.Boolean addCommunityPermissions,
163         java.lang.Boolean addGuestPermissions,
164         java.lang.String[] communityPermissions,
165         java.lang.String[] guestPermissions)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         return getService()
169                    .addTemplate(uuid, userId, templateId, autoTemplateId, plid,
170             structureId, name, description, xsl, formatXsl, langType,
171             cacheable, smallImage, smallImageURL, smallFile,
172             addCommunityPermissions, addGuestPermissions, communityPermissions,
173             guestPermissions);
174     }
175 
176     public static com.liferay.portlet.journal.model.JournalTemplate addTemplateToGroup(
177         java.lang.String uuid, long userId, java.lang.String templateId,
178         boolean autoTemplateId, long groupId, java.lang.String structureId,
179         java.lang.String name, java.lang.String description,
180         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
181         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
182         java.io.File smallFile, java.lang.Boolean addCommunityPermissions,
183         java.lang.Boolean addGuestPermissions,
184         java.lang.String[] communityPermissions,
185         java.lang.String[] guestPermissions)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException {
188         return getService()
189                    .addTemplateToGroup(uuid, userId, templateId,
190             autoTemplateId, groupId, structureId, name, description, xsl,
191             formatXsl, langType, cacheable, smallImage, smallImageURL,
192             smallFile, addCommunityPermissions, addGuestPermissions,
193             communityPermissions, guestPermissions);
194     }
195 
196     public static void addTemplateResources(long groupId,
197         java.lang.String templateId, boolean addCommunityPermissions,
198         boolean addGuestPermissions)
199         throws com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException {
201         getService()
202             .addTemplateResources(groupId, templateId, addCommunityPermissions,
203             addGuestPermissions);
204     }
205 
206     public static void addTemplateResources(
207         com.liferay.portlet.journal.model.JournalTemplate template,
208         boolean addCommunityPermissions, boolean addGuestPermissions)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException {
211         getService()
212             .addTemplateResources(template, addCommunityPermissions,
213             addGuestPermissions);
214     }
215 
216     public static void addTemplateResources(long groupId,
217         java.lang.String templateId, java.lang.String[] communityPermissions,
218         java.lang.String[] guestPermissions)
219         throws com.liferay.portal.PortalException,
220             com.liferay.portal.SystemException {
221         getService()
222             .addTemplateResources(groupId, templateId, communityPermissions,
223             guestPermissions);
224     }
225 
226     public static void addTemplateResources(
227         com.liferay.portlet.journal.model.JournalTemplate template,
228         java.lang.String[] communityPermissions,
229         java.lang.String[] guestPermissions)
230         throws com.liferay.portal.PortalException,
231             com.liferay.portal.SystemException {
232         getService()
233             .addTemplateResources(template, communityPermissions,
234             guestPermissions);
235     }
236 
237     public static void checkNewLine(long groupId, java.lang.String templateId)
238         throws com.liferay.portal.PortalException,
239             com.liferay.portal.SystemException {
240         getService().checkNewLine(groupId, templateId);
241     }
242 
243     public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
244         long userId, long groupId, java.lang.String oldTemplateId,
245         java.lang.String newTemplateId, boolean autoTemplateId)
246         throws com.liferay.portal.PortalException,
247             com.liferay.portal.SystemException {
248         return getService()
249                    .copyTemplate(userId, groupId, oldTemplateId, newTemplateId,
250             autoTemplateId);
251     }
252 
253     public static void deleteTemplate(long groupId, java.lang.String templateId)
254         throws com.liferay.portal.PortalException,
255             com.liferay.portal.SystemException {
256         getService().deleteTemplate(groupId, templateId);
257     }
258 
259     public static void deleteTemplate(
260         com.liferay.portlet.journal.model.JournalTemplate template)
261         throws com.liferay.portal.PortalException,
262             com.liferay.portal.SystemException {
263         getService().deleteTemplate(template);
264     }
265 
266     public static void deleteTemplates(long groupId)
267         throws com.liferay.portal.PortalException,
268             com.liferay.portal.SystemException {
269         getService().deleteTemplates(groupId);
270     }
271 
272     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
273         long groupId, java.lang.String structureId)
274         throws com.liferay.portal.SystemException {
275         return getService().getStructureTemplates(groupId, structureId);
276     }
277 
278     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
279         long groupId, java.lang.String structureId, int start, int end)
280         throws com.liferay.portal.SystemException {
281         return getService()
282                    .getStructureTemplates(groupId, structureId, start, end);
283     }
284 
285     public static int getStructureTemplatesCount(long groupId,
286         java.lang.String structureId) throws com.liferay.portal.SystemException {
287         return getService().getStructureTemplatesCount(groupId, structureId);
288     }
289 
290     public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
291         long id)
292         throws com.liferay.portal.PortalException,
293             com.liferay.portal.SystemException {
294         return getService().getTemplate(id);
295     }
296 
297     public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
298         long groupId, java.lang.String templateId)
299         throws com.liferay.portal.PortalException,
300             com.liferay.portal.SystemException {
301         return getService().getTemplate(groupId, templateId);
302     }
303 
304     public static com.liferay.portlet.journal.model.JournalTemplate getTemplateBySmallImageId(
305         long smallImageId)
306         throws com.liferay.portal.PortalException,
307             com.liferay.portal.SystemException {
308         return getService().getTemplateBySmallImageId(smallImageId);
309     }
310 
311     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates()
312         throws com.liferay.portal.SystemException {
313         return getService().getTemplates();
314     }
315 
316     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
317         long groupId) throws com.liferay.portal.SystemException {
318         return getService().getTemplates(groupId);
319     }
320 
321     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
322         long groupId, int start, int end)
323         throws com.liferay.portal.SystemException {
324         return getService().getTemplates(groupId, start, end);
325     }
326 
327     public static int getTemplatesCount(long groupId)
328         throws com.liferay.portal.SystemException {
329         return getService().getTemplatesCount(groupId);
330     }
331 
332     public static boolean hasTemplate(long groupId, java.lang.String templateId)
333         throws com.liferay.portal.SystemException {
334         return getService().hasTemplate(groupId, templateId);
335     }
336 
337     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
338         long companyId, long groupId, java.lang.String keywords,
339         java.lang.String structureId, java.lang.String structureIdComparator,
340         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
341         throws com.liferay.portal.SystemException {
342         return getService()
343                    .search(companyId, groupId, keywords, structureId,
344             structureIdComparator, start, end, obc);
345     }
346 
347     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
348         long companyId, long groupId, java.lang.String templateId,
349         java.lang.String structureId, java.lang.String structureIdComparator,
350         java.lang.String name, java.lang.String description,
351         boolean andOperator, int start, int end,
352         com.liferay.portal.kernel.util.OrderByComparator obc)
353         throws com.liferay.portal.SystemException {
354         return getService()
355                    .search(companyId, groupId, templateId, structureId,
356             structureIdComparator, name, description, andOperator, start, end,
357             obc);
358     }
359 
360     public static int searchCount(long companyId, long groupId,
361         java.lang.String keywords, java.lang.String structureId,
362         java.lang.String structureIdComparator)
363         throws com.liferay.portal.SystemException {
364         return getService()
365                    .searchCount(companyId, groupId, keywords, structureId,
366             structureIdComparator);
367     }
368 
369     public static int searchCount(long companyId, long groupId,
370         java.lang.String templateId, java.lang.String structureId,
371         java.lang.String structureIdComparator, java.lang.String name,
372         java.lang.String description, boolean andOperator)
373         throws com.liferay.portal.SystemException {
374         return getService()
375                    .searchCount(companyId, groupId, templateId, structureId,
376             structureIdComparator, name, description, andOperator);
377     }
378 
379     public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
380         long groupId, java.lang.String templateId,
381         java.lang.String structureId, java.lang.String name,
382         java.lang.String description, java.lang.String xsl, boolean formatXsl,
383         java.lang.String langType, boolean cacheable, boolean smallImage,
384         java.lang.String smallImageURL, java.io.File smallFile)
385         throws com.liferay.portal.PortalException,
386             com.liferay.portal.SystemException {
387         return getService()
388                    .updateTemplate(groupId, templateId, structureId, name,
389             description, xsl, formatXsl, langType, cacheable, smallImage,
390             smallImageURL, smallFile);
391     }
392 
393     public static JournalTemplateLocalService getService() {
394         if (_service == null) {
395             throw new RuntimeException("JournalTemplateLocalService is not set");
396         }
397 
398         return _service;
399     }
400 
401     public void setService(JournalTemplateLocalService service) {
402         _service = service;
403     }
404 
405     private static JournalTemplateLocalService _service;
406 }