001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.journal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link JournalTemplateService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       JournalTemplateService
030     * @generated
031     */
032    public class JournalTemplateServiceUtil {
033            public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
034                    long groupId, java.lang.String templateId, boolean autoTemplateId,
035                    java.lang.String structureId, java.lang.String name,
036                    java.lang.String description, java.lang.String xsl, boolean formatXsl,
037                    java.lang.String langType, boolean cacheable,
038                    com.liferay.portal.service.ServiceContext serviceContext)
039                    throws com.liferay.portal.kernel.exception.PortalException,
040                            com.liferay.portal.kernel.exception.SystemException {
041                    return getService()
042                                       .addTemplate(groupId, templateId, autoTemplateId,
043                            structureId, name, description, xsl, formatXsl, langType,
044                            cacheable, serviceContext);
045            }
046    
047            public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
048                    long groupId, java.lang.String templateId, boolean autoTemplateId,
049                    java.lang.String structureId, java.lang.String name,
050                    java.lang.String description, java.lang.String xsl, boolean formatXsl,
051                    java.lang.String langType, boolean cacheable, boolean smallImage,
052                    java.lang.String smallImageURL, java.io.File smallFile,
053                    com.liferay.portal.service.ServiceContext serviceContext)
054                    throws com.liferay.portal.kernel.exception.PortalException,
055                            com.liferay.portal.kernel.exception.SystemException {
056                    return getService()
057                                       .addTemplate(groupId, templateId, autoTemplateId,
058                            structureId, name, description, xsl, formatXsl, langType,
059                            cacheable, smallImage, smallImageURL, smallFile, serviceContext);
060            }
061    
062            public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
063                    long groupId, java.lang.String oldTemplateId,
064                    java.lang.String newTemplateId, boolean autoTemplateId)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    return getService()
068                                       .copyTemplate(groupId, oldTemplateId, newTemplateId,
069                            autoTemplateId);
070            }
071    
072            public static void deleteTemplate(long groupId, java.lang.String templateId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    getService().deleteTemplate(groupId, templateId);
076            }
077    
078            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
079                    long groupId, java.lang.String structureId)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException {
082                    return getService().getStructureTemplates(groupId, structureId);
083            }
084    
085            public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
086                    long groupId, java.lang.String templateId)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException {
089                    return getService().getTemplate(groupId, templateId);
090            }
091    
092            public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
093                    long groupId, java.lang.String templateId,
094                    java.lang.String structureId, java.lang.String name,
095                    java.lang.String description, java.lang.String xsl, boolean formatXsl,
096                    java.lang.String langType, boolean cacheable,
097                    com.liferay.portal.service.ServiceContext serviceContext)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException {
100                    return getService()
101                                       .updateTemplate(groupId, templateId, structureId, name,
102                            description, xsl, formatXsl, langType, cacheable, serviceContext);
103            }
104    
105            public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
106                    long groupId, java.lang.String templateId,
107                    java.lang.String structureId, java.lang.String name,
108                    java.lang.String description, java.lang.String xsl, boolean formatXsl,
109                    java.lang.String langType, boolean cacheable, boolean smallImage,
110                    java.lang.String smallImageURL, java.io.File smallFile,
111                    com.liferay.portal.service.ServiceContext serviceContext)
112                    throws com.liferay.portal.kernel.exception.PortalException,
113                            com.liferay.portal.kernel.exception.SystemException {
114                    return getService()
115                                       .updateTemplate(groupId, templateId, structureId, name,
116                            description, xsl, formatXsl, langType, cacheable, smallImage,
117                            smallImageURL, smallFile, serviceContext);
118            }
119    
120            public static JournalTemplateService getService() {
121                    if (_service == null) {
122                            _service = (JournalTemplateService)PortalBeanLocatorUtil.locate(JournalTemplateService.class.getName());
123                    }
124    
125                    return _service;
126            }
127    
128            public void setService(JournalTemplateService service) {
129                    _service = service;
130            }
131    
132            private static JournalTemplateService _service;
133    }