1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.journal.service;
21  
22  
23  /**
24   * <a href="JournalTemplateServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.journal.service.JournalTemplateService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.journal.service.JournalTemplateService
42   *
43   */
44  public class JournalTemplateServiceUtil {
45      public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
46          long groupId, java.lang.String templateId, boolean autoTemplateId,
47          java.lang.String structureId, java.lang.String name,
48          java.lang.String description, java.lang.String xsl, boolean formatXsl,
49          java.lang.String langType, boolean cacheable,
50          com.liferay.portal.service.ServiceContext serviceContext)
51          throws com.liferay.portal.PortalException,
52              com.liferay.portal.SystemException {
53          return getService()
54                     .addTemplate(groupId, templateId, autoTemplateId,
55              structureId, name, description, xsl, formatXsl, langType,
56              cacheable, serviceContext);
57      }
58  
59      public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
60          long groupId, java.lang.String templateId, boolean autoTemplateId,
61          java.lang.String structureId, java.lang.String name,
62          java.lang.String description, java.lang.String xsl, boolean formatXsl,
63          java.lang.String langType, boolean cacheable, boolean smallImage,
64          java.lang.String smallImageURL, java.io.File smallFile,
65          com.liferay.portal.service.ServiceContext serviceContext)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException {
68          return getService()
69                     .addTemplate(groupId, templateId, autoTemplateId,
70              structureId, name, description, xsl, formatXsl, langType,
71              cacheable, smallImage, smallImageURL, smallFile, serviceContext);
72      }
73  
74      public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
75          long groupId, java.lang.String oldTemplateId,
76          java.lang.String newTemplateId, boolean autoTemplateId)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException {
79          return getService()
80                     .copyTemplate(groupId, oldTemplateId, newTemplateId,
81              autoTemplateId);
82      }
83  
84      public static void deleteTemplate(long groupId, java.lang.String templateId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          getService().deleteTemplate(groupId, templateId);
88      }
89  
90      public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
91          long groupId, java.lang.String structureId)
92          throws com.liferay.portal.PortalException,
93              com.liferay.portal.SystemException {
94          return getService().getStructureTemplates(groupId, structureId);
95      }
96  
97      public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
98          long groupId, java.lang.String templateId)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException {
101         return getService().getTemplate(groupId, templateId);
102     }
103 
104     public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
105         long groupId, java.lang.String templateId,
106         java.lang.String structureId, java.lang.String name,
107         java.lang.String description, java.lang.String xsl, boolean formatXsl,
108         java.lang.String langType, boolean cacheable,
109         com.liferay.portal.service.ServiceContext serviceContext)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException {
112         return getService()
113                    .updateTemplate(groupId, templateId, structureId, name,
114             description, xsl, formatXsl, langType, cacheable, serviceContext);
115     }
116 
117     public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
118         long groupId, java.lang.String templateId,
119         java.lang.String structureId, java.lang.String name,
120         java.lang.String description, java.lang.String xsl, boolean formatXsl,
121         java.lang.String langType, boolean cacheable, boolean smallImage,
122         java.lang.String smallImageURL, java.io.File smallFile,
123         com.liferay.portal.service.ServiceContext serviceContext)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException {
126         return getService()
127                    .updateTemplate(groupId, templateId, structureId, name,
128             description, xsl, formatXsl, langType, cacheable, smallImage,
129             smallImageURL, smallFile, serviceContext);
130     }
131 
132     public static JournalTemplateService getService() {
133         if (_service == null) {
134             throw new RuntimeException("JournalTemplateService is not set");
135         }
136 
137         return _service;
138     }
139 
140     public void setService(JournalTemplateService service) {
141         _service = service;
142     }
143 
144     private static JournalTemplateService _service;
145 }