001    /**
002     * Copyright (c) 2000-2013 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    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * Provides the remote service utility for JournalTemplate. This utility wraps
022     * {@link com.liferay.portlet.journal.service.impl.JournalTemplateServiceImpl} and is the
023     * primary access point for service operations in application layer code running
024     * on a remote server. Methods of this service are expected to have security
025     * checks based on the propagated JAAS credentials because this service can be
026     * accessed remotely.
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     * @deprecated As of 6.2.0, since Web Content Administration now uses the
033    Dynamic Data Mapping framework to handle templates
034     * @generated
035     */
036    public class JournalTemplateServiceUtil {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * 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.
041             */
042    
043            /**
044            * Returns the Spring bean ID for this bean.
045            *
046            * @return the Spring bean ID for this bean
047            */
048            public static java.lang.String getBeanIdentifier() {
049                    return getService().getBeanIdentifier();
050            }
051    
052            /**
053            * Sets the Spring bean ID for this bean.
054            *
055            * @param beanIdentifier the Spring bean ID for this bean
056            */
057            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
058                    getService().setBeanIdentifier(beanIdentifier);
059            }
060    
061            public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
062                    long groupId, java.lang.String templateId, boolean autoTemplateId,
063                    java.lang.String structureId,
064                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
065                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
066                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
067                    boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
068                    java.io.File smallFile,
069                    com.liferay.portal.service.ServiceContext serviceContext)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException {
072                    return getService()
073                                       .addTemplate(groupId, templateId, autoTemplateId,
074                            structureId, nameMap, descriptionMap, xsl, formatXsl, langType,
075                            cacheable, smallImage, smallImageURL, smallFile, serviceContext);
076            }
077    
078            public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
079                    long groupId, java.lang.String templateId, boolean autoTemplateId,
080                    java.lang.String structureId,
081                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
082                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
083                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
084                    boolean cacheable,
085                    com.liferay.portal.service.ServiceContext serviceContext)
086                    throws com.liferay.portal.kernel.exception.PortalException,
087                            com.liferay.portal.kernel.exception.SystemException {
088                    return getService()
089                                       .addTemplate(groupId, templateId, autoTemplateId,
090                            structureId, nameMap, descriptionMap, xsl, formatXsl, langType,
091                            cacheable, serviceContext);
092            }
093    
094            public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
095                    long groupId, java.lang.String oldTemplateId,
096                    java.lang.String newTemplateId, boolean autoTemplateId)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    return getService()
100                                       .copyTemplate(groupId, oldTemplateId, newTemplateId,
101                            autoTemplateId);
102            }
103    
104            public static void deleteTemplate(long groupId, java.lang.String templateId)
105                    throws com.liferay.portal.kernel.exception.PortalException,
106                            com.liferay.portal.kernel.exception.SystemException {
107                    getService().deleteTemplate(groupId, templateId);
108            }
109    
110            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
111                    long groupId, java.lang.String structureId)
112                    throws com.liferay.portal.kernel.exception.PortalException,
113                            com.liferay.portal.kernel.exception.SystemException {
114                    return getService().getStructureTemplates(groupId, structureId);
115            }
116    
117            public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
118                    long groupId, java.lang.String templateId)
119                    throws com.liferay.portal.kernel.exception.PortalException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    return getService().getTemplate(groupId, templateId);
122            }
123    
124            public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
125                    long groupId, java.lang.String templateId,
126                    boolean includeGlobalTemplates)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException {
129                    return getService()
130                                       .getTemplate(groupId, templateId, includeGlobalTemplates);
131            }
132    
133            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
134                    long companyId, long[] groupIds, java.lang.String keywords,
135                    java.lang.String structureId, java.lang.String structureIdComparator,
136                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return getService()
139                                       .search(companyId, groupIds, keywords, structureId,
140                            structureIdComparator, start, end, obc);
141            }
142    
143            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
144                    long companyId, long[] groupIds, java.lang.String templateId,
145                    java.lang.String structureId, java.lang.String structureIdComparator,
146                    java.lang.String name, java.lang.String description,
147                    boolean andOperator, int start, int end,
148                    com.liferay.portal.kernel.util.OrderByComparator obc)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return getService()
151                                       .search(companyId, groupIds, templateId, structureId,
152                            structureIdComparator, name, description, andOperator, start, end,
153                            obc);
154            }
155    
156            public static int searchCount(long companyId, long[] groupIds,
157                    java.lang.String keywords, java.lang.String structureId,
158                    java.lang.String structureIdComparator)
159                    throws com.liferay.portal.kernel.exception.SystemException {
160                    return getService()
161                                       .searchCount(companyId, groupIds, keywords, structureId,
162                            structureIdComparator);
163            }
164    
165            public static int searchCount(long companyId, long[] groupIds,
166                    java.lang.String templateId, java.lang.String structureId,
167                    java.lang.String structureIdComparator, java.lang.String name,
168                    java.lang.String description, boolean andOperator)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return getService()
171                                       .searchCount(companyId, groupIds, templateId, structureId,
172                            structureIdComparator, name, description, andOperator);
173            }
174    
175            public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
176                    long groupId, java.lang.String templateId,
177                    java.lang.String structureId,
178                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
179                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
180                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
181                    boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
182                    java.io.File smallFile,
183                    com.liferay.portal.service.ServiceContext serviceContext)
184                    throws com.liferay.portal.kernel.exception.PortalException,
185                            com.liferay.portal.kernel.exception.SystemException {
186                    return getService()
187                                       .updateTemplate(groupId, templateId, structureId, nameMap,
188                            descriptionMap, xsl, formatXsl, langType, cacheable, smallImage,
189                            smallImageURL, smallFile, serviceContext);
190            }
191    
192            public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
193                    long groupId, java.lang.String templateId,
194                    java.lang.String structureId,
195                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
196                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
197                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
198                    boolean cacheable,
199                    com.liferay.portal.service.ServiceContext serviceContext)
200                    throws com.liferay.portal.kernel.exception.PortalException,
201                            com.liferay.portal.kernel.exception.SystemException {
202                    return getService()
203                                       .updateTemplate(groupId, templateId, structureId, nameMap,
204                            descriptionMap, xsl, formatXsl, langType, cacheable, serviceContext);
205            }
206    
207            public static JournalTemplateService getService() {
208                    if (_service == null) {
209                            _service = (JournalTemplateService)PortalBeanLocatorUtil.locate(JournalTemplateService.class.getName());
210    
211                            ReferenceRegistry.registerReference(JournalTemplateServiceUtil.class,
212                                    "_service");
213                    }
214    
215                    return _service;
216            }
217    
218            /**
219             * @deprecated As of 6.2.0
220             */
221            public void setService(JournalTemplateService service) {
222            }
223    
224            private static JournalTemplateService _service;
225    }