001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.journal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the journal template remote service. This utility wraps {@link com.liferay.portlet.journal.service.impl.JournalTemplateServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see JournalTemplateService
030     * @see com.liferay.portlet.journal.service.base.JournalTemplateServiceBaseImpl
031     * @see com.liferay.portlet.journal.service.impl.JournalTemplateServiceImpl
032     * @generated
033     */
034    public class JournalTemplateServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalTemplateServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
041                    long groupId, java.lang.String templateId, boolean autoTemplateId,
042                    java.lang.String structureId, java.lang.String name,
043                    java.lang.String description, java.lang.String xsl, boolean formatXsl,
044                    java.lang.String langType, boolean cacheable,
045                    com.liferay.portal.service.ServiceContext serviceContext)
046                    throws com.liferay.portal.kernel.exception.PortalException,
047                            com.liferay.portal.kernel.exception.SystemException {
048                    return getService()
049                                       .addTemplate(groupId, templateId, autoTemplateId,
050                            structureId, name, description, xsl, formatXsl, langType,
051                            cacheable, serviceContext);
052            }
053    
054            public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
055                    long groupId, java.lang.String templateId, boolean autoTemplateId,
056                    java.lang.String structureId, java.lang.String name,
057                    java.lang.String description, java.lang.String xsl, boolean formatXsl,
058                    java.lang.String langType, boolean cacheable, boolean smallImage,
059                    java.lang.String smallImageURL, java.io.File smallFile,
060                    com.liferay.portal.service.ServiceContext serviceContext)
061                    throws com.liferay.portal.kernel.exception.PortalException,
062                            com.liferay.portal.kernel.exception.SystemException {
063                    return getService()
064                                       .addTemplate(groupId, templateId, autoTemplateId,
065                            structureId, name, description, xsl, formatXsl, langType,
066                            cacheable, smallImage, smallImageURL, smallFile, serviceContext);
067            }
068    
069            public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
070                    long groupId, java.lang.String oldTemplateId,
071                    java.lang.String newTemplateId, boolean autoTemplateId)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    return getService()
075                                       .copyTemplate(groupId, oldTemplateId, newTemplateId,
076                            autoTemplateId);
077            }
078    
079            public static void deleteTemplate(long groupId, java.lang.String templateId)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException {
082                    getService().deleteTemplate(groupId, templateId);
083            }
084    
085            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
086                    long groupId, java.lang.String structureId)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException {
089                    return getService().getStructureTemplates(groupId, structureId);
090            }
091    
092            public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
093                    long groupId, java.lang.String templateId)
094                    throws com.liferay.portal.kernel.exception.PortalException,
095                            com.liferay.portal.kernel.exception.SystemException {
096                    return getService().getTemplate(groupId, templateId);
097            }
098    
099            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.kernel.exception.PortalException,
106                            com.liferay.portal.kernel.exception.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.kernel.exception.PortalException,
120                            com.liferay.portal.kernel.exception.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                            ReferenceRegistry.registerReference(JournalTemplateServiceUtil.class,
132                                    "_service");
133                            MethodCache.remove(JournalTemplateService.class);
134                    }
135    
136                    return _service;
137            }
138    
139            public void setService(JournalTemplateService service) {
140                    MethodCache.remove(JournalTemplateService.class);
141    
142                    _service = service;
143    
144                    ReferenceRegistry.registerReference(JournalTemplateServiceUtil.class,
145                            "_service");
146                    MethodCache.remove(JournalTemplateService.class);
147            }
148    
149            private static JournalTemplateService _service;
150    }