1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
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.PortalException,
47              com.liferay.portal.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.PortalException,
62              com.liferay.portal.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.PortalException,
73              com.liferay.portal.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.PortalException,
81              com.liferay.portal.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.PortalException,
88              com.liferay.portal.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.PortalException,
95              com.liferay.portal.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.PortalException,
106             com.liferay.portal.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.PortalException,
120             com.liferay.portal.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 }