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          java.lang.String templateId, boolean autoTemplateId, long plid,
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, boolean smallImage,
45          java.lang.String smallImageURL, java.io.File smallFile,
46          boolean addCommunityPermissions, boolean addGuestPermissions)
47          throws com.liferay.portal.PortalException,
48              com.liferay.portal.SystemException, java.rmi.RemoteException {
49          return getService()
50                     .addTemplate(templateId, autoTemplateId, plid, structureId,
51              name, description, xsl, formatXsl, langType, cacheable, smallImage,
52              smallImageURL, smallFile, addCommunityPermissions,
53              addGuestPermissions);
54      }
55  
56      public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
57          java.lang.String templateId, boolean autoTemplateId, long plid,
58          java.lang.String structureId, java.lang.String name,
59          java.lang.String description, java.lang.String xsl, boolean formatXsl,
60          java.lang.String langType, boolean cacheable, boolean smallImage,
61          java.lang.String smallImageURL, java.io.File smallFile,
62          java.lang.String[] communityPermissions,
63          java.lang.String[] guestPermissions)
64          throws com.liferay.portal.PortalException,
65              com.liferay.portal.SystemException, java.rmi.RemoteException {
66          return getService()
67                     .addTemplate(templateId, autoTemplateId, plid, structureId,
68              name, description, xsl, formatXsl, langType, cacheable, smallImage,
69              smallImageURL, smallFile, communityPermissions, guestPermissions);
70      }
71  
72      public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
73          long groupId, java.lang.String oldTemplateId,
74          java.lang.String newTemplateId, boolean autoTemplateId)
75          throws com.liferay.portal.PortalException,
76              com.liferay.portal.SystemException, java.rmi.RemoteException {
77          return getService()
78                     .copyTemplate(groupId, oldTemplateId, newTemplateId,
79              autoTemplateId);
80      }
81  
82      public static void deleteTemplate(long groupId, java.lang.String templateId)
83          throws com.liferay.portal.PortalException,
84              com.liferay.portal.SystemException, java.rmi.RemoteException {
85          getService().deleteTemplate(groupId, templateId);
86      }
87  
88      public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
89          long groupId, java.lang.String structureId)
90          throws com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException, java.rmi.RemoteException {
92          return getService().getStructureTemplates(groupId, structureId);
93      }
94  
95      public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
96          long groupId, java.lang.String templateId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException, java.rmi.RemoteException {
99          return getService().getTemplate(groupId, templateId);
100     }
101 
102     public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
103         long groupId, java.lang.String templateId,
104         java.lang.String structureId, java.lang.String name,
105         java.lang.String description, java.lang.String xsl, boolean formatXsl,
106         java.lang.String langType, boolean cacheable, boolean smallImage,
107         java.lang.String smallImageURL, java.io.File smallFile)
108         throws com.liferay.portal.PortalException,
109             com.liferay.portal.SystemException, java.rmi.RemoteException {
110         return getService()
111                    .updateTemplate(groupId, templateId, structureId, name,
112             description, xsl, formatXsl, langType, cacheable, smallImage,
113             smallImageURL, smallFile);
114     }
115 
116     public static JournalTemplateService getService() {
117         if (_service == null) {
118             _service = (JournalTemplateService)PortalBeanLocatorUtil.locate(JournalTemplateService.class.getName());
119         }
120 
121         return _service;
122     }
123 
124     public void setService(JournalTemplateService service) {
125         _service = service;
126     }
127 
128     private static JournalTemplateService _service;
129 }