001    /**
002     * Copyright (c) 2000-2012 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.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,
043                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
044                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
045                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
046                    boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
047                    java.io.File smallFile,
048                    com.liferay.portal.service.ServiceContext serviceContext)
049                    throws com.liferay.portal.kernel.exception.PortalException,
050                            com.liferay.portal.kernel.exception.SystemException {
051                    return getService()
052                                       .addTemplate(groupId, templateId, autoTemplateId,
053                            structureId, nameMap, descriptionMap, xsl, formatXsl, langType,
054                            cacheable, smallImage, smallImageURL, smallFile, serviceContext);
055            }
056    
057            public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
058                    long groupId, java.lang.String templateId, boolean autoTemplateId,
059                    java.lang.String structureId,
060                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
061                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
062                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
063                    boolean cacheable,
064                    com.liferay.portal.service.ServiceContext serviceContext)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    return getService()
068                                       .addTemplate(groupId, templateId, autoTemplateId,
069                            structureId, nameMap, descriptionMap, xsl, formatXsl, langType,
070                            cacheable, serviceContext);
071            }
072    
073            public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
074                    long groupId, java.lang.String oldTemplateId,
075                    java.lang.String newTemplateId, boolean autoTemplateId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    return getService()
079                                       .copyTemplate(groupId, oldTemplateId, newTemplateId,
080                            autoTemplateId);
081            }
082    
083            public static void deleteTemplate(long groupId, java.lang.String templateId)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException {
086                    getService().deleteTemplate(groupId, templateId);
087            }
088    
089            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
090                    long groupId, java.lang.String structureId)
091                    throws com.liferay.portal.kernel.exception.SystemException {
092                    return getService().getStructureTemplates(groupId, structureId);
093            }
094    
095            public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
096                    long groupId, java.lang.String templateId)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    return getService().getTemplate(groupId, templateId);
100            }
101    
102            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
103                    long companyId, long[] groupIds, java.lang.String keywords,
104                    java.lang.String structureId, java.lang.String structureIdComparator,
105                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService()
108                                       .search(companyId, groupIds, keywords, structureId,
109                            structureIdComparator, start, end, obc);
110            }
111    
112            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
113                    long companyId, long[] groupIds, java.lang.String templateId,
114                    java.lang.String structureId, java.lang.String structureIdComparator,
115                    java.lang.String name, java.lang.String description,
116                    boolean andOperator, int start, int end,
117                    com.liferay.portal.kernel.util.OrderByComparator obc)
118                    throws com.liferay.portal.kernel.exception.SystemException {
119                    return getService()
120                                       .search(companyId, groupIds, templateId, structureId,
121                            structureIdComparator, name, description, andOperator, start, end,
122                            obc);
123            }
124    
125            public static int searchCount(long companyId, long[] groupIds,
126                    java.lang.String keywords, java.lang.String structureId,
127                    java.lang.String structureIdComparator)
128                    throws com.liferay.portal.kernel.exception.SystemException {
129                    return getService()
130                                       .searchCount(companyId, groupIds, keywords, structureId,
131                            structureIdComparator);
132            }
133    
134            public static int searchCount(long companyId, long[] groupIds,
135                    java.lang.String templateId, java.lang.String structureId,
136                    java.lang.String structureIdComparator, java.lang.String name,
137                    java.lang.String description, boolean andOperator)
138                    throws com.liferay.portal.kernel.exception.SystemException {
139                    return getService()
140                                       .searchCount(companyId, groupIds, templateId, structureId,
141                            structureIdComparator, name, description, andOperator);
142            }
143    
144            public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
145                    long groupId, java.lang.String templateId,
146                    java.lang.String structureId,
147                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
148                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
149                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
150                    boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
151                    java.io.File smallFile,
152                    com.liferay.portal.service.ServiceContext serviceContext)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return getService()
156                                       .updateTemplate(groupId, templateId, structureId, nameMap,
157                            descriptionMap, xsl, formatXsl, langType, cacheable, smallImage,
158                            smallImageURL, smallFile, serviceContext);
159            }
160    
161            public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
162                    long groupId, java.lang.String templateId,
163                    java.lang.String structureId,
164                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
165                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
166                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
167                    boolean cacheable,
168                    com.liferay.portal.service.ServiceContext serviceContext)
169                    throws com.liferay.portal.kernel.exception.PortalException,
170                            com.liferay.portal.kernel.exception.SystemException {
171                    return getService()
172                                       .updateTemplate(groupId, templateId, structureId, nameMap,
173                            descriptionMap, xsl, formatXsl, langType, cacheable, serviceContext);
174            }
175    
176            public static JournalTemplateService getService() {
177                    if (_service == null) {
178                            _service = (JournalTemplateService)PortalBeanLocatorUtil.locate(JournalTemplateService.class.getName());
179    
180                            ReferenceRegistry.registerReference(JournalTemplateServiceUtil.class,
181                                    "_service");
182                            MethodCache.remove(JournalTemplateService.class);
183                    }
184    
185                    return _service;
186            }
187    
188            public void setService(JournalTemplateService service) {
189                    MethodCache.remove(JournalTemplateService.class);
190    
191                    _service = service;
192    
193                    ReferenceRegistry.registerReference(JournalTemplateServiceUtil.class,
194                            "_service");
195                    MethodCache.remove(JournalTemplateService.class);
196            }
197    
198            private static JournalTemplateService _service;
199    }