1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.journal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="JournalTemplateServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link JournalTemplateService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       JournalTemplateService
37   * @generated
38   */
39  public class JournalTemplateServiceUtil {
40      public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
41          long groupId, java.lang.String templateId, boolean autoTemplateId,
42          java.lang.String structureId, java.lang.String name,
43          java.lang.String description, java.lang.String xsl, boolean formatXsl,
44          java.lang.String langType, boolean cacheable,
45          com.liferay.portal.service.ServiceContext serviceContext)
46          throws com.liferay.portal.kernel.exception.PortalException,
47              com.liferay.portal.kernel.exception.SystemException {
48          return getService()
49                     .addTemplate(groupId, templateId, autoTemplateId,
50              structureId, name, description, xsl, formatXsl, langType,
51              cacheable, serviceContext);
52      }
53  
54      public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
55          long groupId, java.lang.String templateId, boolean autoTemplateId,
56          java.lang.String structureId, java.lang.String name,
57          java.lang.String description, java.lang.String xsl, boolean formatXsl,
58          java.lang.String langType, boolean cacheable, boolean smallImage,
59          java.lang.String smallImageURL, java.io.File smallFile,
60          com.liferay.portal.service.ServiceContext serviceContext)
61          throws com.liferay.portal.kernel.exception.PortalException,
62              com.liferay.portal.kernel.exception.SystemException {
63          return getService()
64                     .addTemplate(groupId, templateId, autoTemplateId,
65              structureId, name, description, xsl, formatXsl, langType,
66              cacheable, smallImage, smallImageURL, smallFile, serviceContext);
67      }
68  
69      public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
70          long groupId, java.lang.String oldTemplateId,
71          java.lang.String newTemplateId, boolean autoTemplateId)
72          throws com.liferay.portal.kernel.exception.PortalException,
73              com.liferay.portal.kernel.exception.SystemException {
74          return getService()
75                     .copyTemplate(groupId, oldTemplateId, newTemplateId,
76              autoTemplateId);
77      }
78  
79      public static void deleteTemplate(long groupId, java.lang.String templateId)
80          throws com.liferay.portal.kernel.exception.PortalException,
81              com.liferay.portal.kernel.exception.SystemException {
82          getService().deleteTemplate(groupId, templateId);
83      }
84  
85      public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
86          long groupId, java.lang.String structureId)
87          throws com.liferay.portal.kernel.exception.PortalException,
88              com.liferay.portal.kernel.exception.SystemException {
89          return getService().getStructureTemplates(groupId, structureId);
90      }
91  
92      public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
93          long groupId, java.lang.String templateId)
94          throws com.liferay.portal.kernel.exception.PortalException,
95              com.liferay.portal.kernel.exception.SystemException {
96          return getService().getTemplate(groupId, templateId);
97      }
98  
99      public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
100         long groupId, java.lang.String templateId,
101         java.lang.String structureId, java.lang.String name,
102         java.lang.String description, java.lang.String xsl, boolean formatXsl,
103         java.lang.String langType, boolean cacheable,
104         com.liferay.portal.service.ServiceContext serviceContext)
105         throws com.liferay.portal.kernel.exception.PortalException,
106             com.liferay.portal.kernel.exception.SystemException {
107         return getService()
108                    .updateTemplate(groupId, templateId, structureId, name,
109             description, xsl, formatXsl, langType, cacheable, serviceContext);
110     }
111 
112     public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
113         long groupId, java.lang.String templateId,
114         java.lang.String structureId, java.lang.String name,
115         java.lang.String description, java.lang.String xsl, boolean formatXsl,
116         java.lang.String langType, boolean cacheable, boolean smallImage,
117         java.lang.String smallImageURL, java.io.File smallFile,
118         com.liferay.portal.service.ServiceContext serviceContext)
119         throws com.liferay.portal.kernel.exception.PortalException,
120             com.liferay.portal.kernel.exception.SystemException {
121         return getService()
122                    .updateTemplate(groupId, templateId, structureId, name,
123             description, xsl, formatXsl, langType, cacheable, smallImage,
124             smallImageURL, smallFile, serviceContext);
125     }
126 
127     public static JournalTemplateService getService() {
128         if (_service == null) {
129             _service = (JournalTemplateService)PortalBeanLocatorUtil.locate(JournalTemplateService.class.getName());
130         }
131 
132         return _service;
133     }
134 
135     public void setService(JournalTemplateService service) {
136         _service = service;
137     }
138 
139     private static JournalTemplateService _service;
140 }