1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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="JournalTemplateServiceUtil.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   * {@link JournalTemplateService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       JournalTemplateService
44   * @generated
45   */
46  public class JournalTemplateServiceUtil {
47      public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
48          long groupId, java.lang.String templateId, boolean autoTemplateId,
49          java.lang.String structureId, java.lang.String name,
50          java.lang.String description, java.lang.String xsl, boolean formatXsl,
51          java.lang.String langType, boolean cacheable,
52          com.liferay.portal.service.ServiceContext serviceContext)
53          throws com.liferay.portal.PortalException,
54              com.liferay.portal.SystemException {
55          return getService()
56                     .addTemplate(groupId, templateId, autoTemplateId,
57              structureId, name, description, xsl, formatXsl, langType,
58              cacheable, serviceContext);
59      }
60  
61      public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
62          long groupId, java.lang.String templateId, boolean autoTemplateId,
63          java.lang.String structureId, java.lang.String name,
64          java.lang.String description, java.lang.String xsl, boolean formatXsl,
65          java.lang.String langType, boolean cacheable, boolean smallImage,
66          java.lang.String smallImageURL, java.io.File smallFile,
67          com.liferay.portal.service.ServiceContext serviceContext)
68          throws com.liferay.portal.PortalException,
69              com.liferay.portal.SystemException {
70          return getService()
71                     .addTemplate(groupId, templateId, autoTemplateId,
72              structureId, name, description, xsl, formatXsl, langType,
73              cacheable, smallImage, smallImageURL, smallFile, serviceContext);
74      }
75  
76      public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
77          long groupId, java.lang.String oldTemplateId,
78          java.lang.String newTemplateId, boolean autoTemplateId)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException {
81          return getService()
82                     .copyTemplate(groupId, oldTemplateId, newTemplateId,
83              autoTemplateId);
84      }
85  
86      public static void deleteTemplate(long groupId, java.lang.String templateId)
87          throws com.liferay.portal.PortalException,
88              com.liferay.portal.SystemException {
89          getService().deleteTemplate(groupId, templateId);
90      }
91  
92      public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
93          long groupId, java.lang.String structureId)
94          throws com.liferay.portal.PortalException,
95              com.liferay.portal.SystemException {
96          return getService().getStructureTemplates(groupId, structureId);
97      }
98  
99      public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
100         long groupId, java.lang.String templateId)
101         throws com.liferay.portal.PortalException,
102             com.liferay.portal.SystemException {
103         return getService().getTemplate(groupId, templateId);
104     }
105 
106     public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
107         long groupId, java.lang.String templateId,
108         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,
111         com.liferay.portal.service.ServiceContext serviceContext)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException {
114         return getService()
115                    .updateTemplate(groupId, templateId, structureId, name,
116             description, xsl, formatXsl, langType, cacheable, serviceContext);
117     }
118 
119     public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
120         long groupId, java.lang.String templateId,
121         java.lang.String structureId, java.lang.String name,
122         java.lang.String description, java.lang.String xsl, boolean formatXsl,
123         java.lang.String langType, boolean cacheable, boolean smallImage,
124         java.lang.String smallImageURL, java.io.File smallFile,
125         com.liferay.portal.service.ServiceContext serviceContext)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService()
129                    .updateTemplate(groupId, templateId, structureId, name,
130             description, xsl, formatXsl, langType, cacheable, smallImage,
131             smallImageURL, smallFile, serviceContext);
132     }
133 
134     public static JournalTemplateService getService() {
135         if (_service == null) {
136             throw new RuntimeException("JournalTemplateService is not set");
137         }
138 
139         return _service;
140     }
141 
142     public void setService(JournalTemplateService service) {
143         _service = service;
144     }
145 
146     private static JournalTemplateService _service;
147 }