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 local service utility for JournalTemplate. This utility wraps
022     * {@link com.liferay.portlet.journal.service.impl.JournalTemplateLocalServiceImpl} and is the
023     * primary access point for service operations in application layer code running
024     * on the local server. Methods of this service will not have security checks
025     * based on the propagated JAAS credentials because this service can only be
026     * accessed from within the same VM.
027     *
028     * @author Brian Wing Shun Chan
029     * @see JournalTemplateLocalService
030     * @see com.liferay.portlet.journal.service.base.JournalTemplateLocalServiceBaseImpl
031     * @see com.liferay.portlet.journal.service.impl.JournalTemplateLocalServiceImpl
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 JournalTemplateLocalServiceUtil {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalTemplateLocalServiceImpl} 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 addJournalTemplate(
062                    com.liferay.portlet.journal.model.JournalTemplate template)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    return getService().addJournalTemplate(template);
066            }
067    
068            public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
069                    long userId, long groupId, java.lang.String templateId,
070                    boolean autoTemplateId, java.lang.String structureId,
071                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
072                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
073                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
074                    boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
075                    java.io.File smallImageFile,
076                    com.liferay.portal.service.ServiceContext serviceContext)
077                    throws com.liferay.portal.kernel.exception.PortalException,
078                            com.liferay.portal.kernel.exception.SystemException {
079                    return getService()
080                                       .addTemplate(userId, groupId, templateId, autoTemplateId,
081                            structureId, nameMap, descriptionMap, xsl, formatXsl, langType,
082                            cacheable, smallImage, smallImageURL, smallImageFile, serviceContext);
083            }
084    
085            public static void addTemplateResources(
086                    com.liferay.portlet.journal.model.JournalTemplate template,
087                    boolean addGroupPermissions, boolean addGuestPermissions)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    getService()
091                            .addTemplateResources(template, addGroupPermissions,
092                            addGuestPermissions);
093            }
094    
095            public static void addTemplateResources(
096                    com.liferay.portlet.journal.model.JournalTemplate template,
097                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException {
100                    getService()
101                            .addTemplateResources(template, groupPermissions, guestPermissions);
102            }
103    
104            public static void addTemplateResources(long groupId,
105                    java.lang.String templateId, boolean addGroupPermissions,
106                    boolean addGuestPermissions)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException {
109                    getService()
110                            .addTemplateResources(groupId, templateId, addGroupPermissions,
111                            addGuestPermissions);
112            }
113    
114            public static void addTemplateResources(long groupId,
115                    java.lang.String templateId, java.lang.String[] groupPermissions,
116                    java.lang.String[] guestPermissions)
117                    throws com.liferay.portal.kernel.exception.PortalException,
118                            com.liferay.portal.kernel.exception.SystemException {
119                    getService()
120                            .addTemplateResources(groupId, templateId, groupPermissions,
121                            guestPermissions);
122            }
123    
124            public static void checkNewLine(long groupId, java.lang.String templateId)
125                    throws com.liferay.portal.kernel.exception.PortalException,
126                            com.liferay.portal.kernel.exception.SystemException {
127                    getService().checkNewLine(groupId, templateId);
128            }
129    
130            public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
131                    long userId, long groupId, java.lang.String oldTemplateId,
132                    java.lang.String newTemplateId, boolean autoTemplateId)
133                    throws com.liferay.portal.kernel.exception.PortalException,
134                            com.liferay.portal.kernel.exception.SystemException {
135                    return getService()
136                                       .copyTemplate(userId, groupId, oldTemplateId, newTemplateId,
137                            autoTemplateId);
138            }
139    
140            public static com.liferay.portlet.journal.model.JournalTemplate createJournalTemplate(
141                    long id) {
142                    return getService().createJournalTemplate(id);
143            }
144    
145            public static void deleteTemplate(
146                    com.liferay.portlet.journal.model.JournalTemplate template)
147                    throws com.liferay.portal.kernel.exception.PortalException,
148                            com.liferay.portal.kernel.exception.SystemException {
149                    getService().deleteTemplate(template);
150            }
151    
152            public static void deleteTemplate(long groupId, java.lang.String templateId)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    getService().deleteTemplate(groupId, templateId);
156            }
157    
158            public static void deleteTemplates(long groupId)
159                    throws com.liferay.portal.kernel.exception.PortalException,
160                            com.liferay.portal.kernel.exception.SystemException {
161                    getService().deleteTemplates(groupId);
162            }
163    
164            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
165                    long groupId, java.lang.String structureId)
166                    throws com.liferay.portal.kernel.exception.PortalException,
167                            com.liferay.portal.kernel.exception.SystemException {
168                    return getService().getStructureTemplates(groupId, structureId);
169            }
170    
171            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
172                    long groupId, java.lang.String structureId,
173                    boolean includeGlobalTemplates)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return getService()
177                                       .getStructureTemplates(groupId, structureId,
178                            includeGlobalTemplates);
179            }
180    
181            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
182                    long groupId, java.lang.String structureId, int start, int end)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException {
185                    return getService()
186                                       .getStructureTemplates(groupId, structureId, start, end);
187            }
188    
189            public static int getStructureTemplatesCount(long groupId,
190                    java.lang.String structureId)
191                    throws com.liferay.portal.kernel.exception.PortalException,
192                            com.liferay.portal.kernel.exception.SystemException {
193                    return getService().getStructureTemplatesCount(groupId, structureId);
194            }
195    
196            public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
197                    long groupId, java.lang.String templateId)
198                    throws com.liferay.portal.kernel.exception.PortalException,
199                            com.liferay.portal.kernel.exception.SystemException {
200                    return getService().getTemplate(groupId, templateId);
201            }
202    
203            public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
204                    long groupId, java.lang.String templateId,
205                    boolean includeGlobalTemplates)
206                    throws com.liferay.portal.kernel.exception.PortalException,
207                            com.liferay.portal.kernel.exception.SystemException {
208                    return getService()
209                                       .getTemplate(groupId, templateId, includeGlobalTemplates);
210            }
211    
212            public static com.liferay.portlet.journal.model.JournalTemplate getTemplateBySmallImageId(
213                    long smallImageId)
214                    throws com.liferay.portal.kernel.exception.PortalException,
215                            com.liferay.portal.kernel.exception.SystemException {
216                    return getService().getTemplateBySmallImageId(smallImageId);
217            }
218    
219            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates()
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getService().getTemplates();
222            }
223    
224            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
225                    long groupId)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getService().getTemplates(groupId);
228            }
229    
230            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
231                    long groupId, int start, int end)
232                    throws com.liferay.portal.kernel.exception.SystemException {
233                    return getService().getTemplates(groupId, start, end);
234            }
235    
236            public static int getTemplatesCount(long groupId)
237                    throws com.liferay.portal.kernel.exception.SystemException {
238                    return getService().getTemplatesCount(groupId);
239            }
240    
241            public static boolean hasTemplate(long groupId, java.lang.String templateId)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return getService().hasTemplate(groupId, templateId);
244            }
245    
246            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
247                    long companyId, long[] groupIds, java.lang.String keywords,
248                    java.lang.String structureId, java.lang.String structureIdComparator,
249                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
250                    throws com.liferay.portal.kernel.exception.SystemException {
251                    return getService()
252                                       .search(companyId, groupIds, keywords, structureId,
253                            structureIdComparator, start, end, obc);
254            }
255    
256            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
257                    long companyId, long[] groupIds, java.lang.String templateId,
258                    java.lang.String structureId, java.lang.String structureIdComparator,
259                    java.lang.String name, java.lang.String description,
260                    boolean andOperator, int start, int end,
261                    com.liferay.portal.kernel.util.OrderByComparator obc)
262                    throws com.liferay.portal.kernel.exception.SystemException {
263                    return getService()
264                                       .search(companyId, groupIds, templateId, structureId,
265                            structureIdComparator, name, description, andOperator, start, end,
266                            obc);
267            }
268    
269            public static int searchCount(long companyId, long[] groupIds,
270                    java.lang.String keywords, java.lang.String structureId,
271                    java.lang.String structureIdComparator)
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    return getService()
274                                       .searchCount(companyId, groupIds, keywords, structureId,
275                            structureIdComparator);
276            }
277    
278            public static int searchCount(long companyId, long[] groupIds,
279                    java.lang.String templateId, java.lang.String structureId,
280                    java.lang.String structureIdComparator, java.lang.String name,
281                    java.lang.String description, boolean andOperator)
282                    throws com.liferay.portal.kernel.exception.SystemException {
283                    return getService()
284                                       .searchCount(companyId, groupIds, templateId, structureId,
285                            structureIdComparator, name, description, andOperator);
286            }
287    
288            public static com.liferay.portlet.journal.model.JournalTemplate updateJournalTemplate(
289                    com.liferay.portlet.journal.model.JournalTemplate template)
290                    throws com.liferay.portal.kernel.exception.PortalException,
291                            com.liferay.portal.kernel.exception.SystemException {
292                    return getService().updateJournalTemplate(template);
293            }
294    
295            public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
296                    long groupId, java.lang.String templateId,
297                    java.lang.String structureId,
298                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
299                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
300                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
301                    boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
302                    java.io.File smallImageFile,
303                    com.liferay.portal.service.ServiceContext serviceContext)
304                    throws com.liferay.portal.kernel.exception.PortalException,
305                            com.liferay.portal.kernel.exception.SystemException {
306                    return getService()
307                                       .updateTemplate(groupId, templateId, structureId, nameMap,
308                            descriptionMap, xsl, formatXsl, langType, cacheable, smallImage,
309                            smallImageURL, smallImageFile, serviceContext);
310            }
311    
312            public static JournalTemplateLocalService getService() {
313                    if (_service == null) {
314                            _service = (JournalTemplateLocalService)PortalBeanLocatorUtil.locate(JournalTemplateLocalService.class.getName());
315    
316                            ReferenceRegistry.registerReference(JournalTemplateLocalServiceUtil.class,
317                                    "_service");
318                    }
319    
320                    return _service;
321            }
322    
323            /**
324             * @deprecated As of 6.2.0
325             */
326            public void setService(JournalTemplateLocalService service) {
327            }
328    
329            private static JournalTemplateLocalService _service;
330    }