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