001    /**
002     * Copyright (c) 2000-2010 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    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link JournalTemplateLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       JournalTemplateLocalService
030     * @generated
031     */
032    public class JournalTemplateLocalServiceUtil {
033            public static com.liferay.portlet.journal.model.JournalTemplate addJournalTemplate(
034                    com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addJournalTemplate(journalTemplate);
037            }
038    
039            public static com.liferay.portlet.journal.model.JournalTemplate createJournalTemplate(
040                    long id) {
041                    return getService().createJournalTemplate(id);
042            }
043    
044            public static void deleteJournalTemplate(long id)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteJournalTemplate(id);
048            }
049    
050            public static void deleteJournalTemplate(
051                    com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteJournalTemplate(journalTemplate);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.journal.model.JournalTemplate getJournalTemplate(
087                    long id)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getJournalTemplate(id);
091            }
092    
093            public static com.liferay.portlet.journal.model.JournalTemplate getJournalTemplateByUuidAndGroupId(
094                    java.lang.String uuid, long groupId)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getJournalTemplateByUuidAndGroupId(uuid, groupId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getJournalTemplates(
101                    int start, int end)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getJournalTemplates(start, end);
104            }
105    
106            public static int getJournalTemplatesCount()
107                    throws com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getJournalTemplatesCount();
109            }
110    
111            public static com.liferay.portlet.journal.model.JournalTemplate updateJournalTemplate(
112                    com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updateJournalTemplate(journalTemplate);
115            }
116    
117            public static com.liferay.portlet.journal.model.JournalTemplate updateJournalTemplate(
118                    com.liferay.portlet.journal.model.JournalTemplate journalTemplate,
119                    boolean merge)
120                    throws com.liferay.portal.kernel.exception.SystemException {
121                    return getService().updateJournalTemplate(journalTemplate, merge);
122            }
123    
124            public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
125                    long userId, long groupId, java.lang.String templateId,
126                    boolean autoTemplateId, java.lang.String structureId,
127                    java.lang.String name, java.lang.String description,
128                    java.lang.String xsl, boolean formatXsl, java.lang.String langType,
129                    boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
130                    java.io.File smallFile,
131                    com.liferay.portal.service.ServiceContext serviceContext)
132                    throws com.liferay.portal.kernel.exception.PortalException,
133                            com.liferay.portal.kernel.exception.SystemException {
134                    return getService()
135                                       .addTemplate(userId, groupId, templateId, autoTemplateId,
136                            structureId, name, description, xsl, formatXsl, langType,
137                            cacheable, smallImage, smallImageURL, smallFile, serviceContext);
138            }
139    
140            public static void addTemplateResources(long groupId,
141                    java.lang.String templateId, boolean addCommunityPermissions,
142                    boolean addGuestPermissions)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException {
145                    getService()
146                            .addTemplateResources(groupId, templateId, addCommunityPermissions,
147                            addGuestPermissions);
148            }
149    
150            public static void addTemplateResources(
151                    com.liferay.portlet.journal.model.JournalTemplate template,
152                    boolean addCommunityPermissions, boolean addGuestPermissions)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    getService()
156                            .addTemplateResources(template, addCommunityPermissions,
157                            addGuestPermissions);
158            }
159    
160            public static void addTemplateResources(long groupId,
161                    java.lang.String templateId, java.lang.String[] communityPermissions,
162                    java.lang.String[] guestPermissions)
163                    throws com.liferay.portal.kernel.exception.PortalException,
164                            com.liferay.portal.kernel.exception.SystemException {
165                    getService()
166                            .addTemplateResources(groupId, templateId, communityPermissions,
167                            guestPermissions);
168            }
169    
170            public static void addTemplateResources(
171                    com.liferay.portlet.journal.model.JournalTemplate template,
172                    java.lang.String[] communityPermissions,
173                    java.lang.String[] guestPermissions)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    getService()
177                            .addTemplateResources(template, communityPermissions,
178                            guestPermissions);
179            }
180    
181            public static void checkNewLine(long groupId, java.lang.String templateId)
182                    throws com.liferay.portal.kernel.exception.PortalException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    getService().checkNewLine(groupId, templateId);
185            }
186    
187            public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
188                    long userId, long groupId, java.lang.String oldTemplateId,
189                    java.lang.String newTemplateId, boolean autoTemplateId)
190                    throws com.liferay.portal.kernel.exception.PortalException,
191                            com.liferay.portal.kernel.exception.SystemException {
192                    return getService()
193                                       .copyTemplate(userId, groupId, oldTemplateId, newTemplateId,
194                            autoTemplateId);
195            }
196    
197            public static void deleteTemplate(long groupId, java.lang.String templateId)
198                    throws com.liferay.portal.kernel.exception.PortalException,
199                            com.liferay.portal.kernel.exception.SystemException {
200                    getService().deleteTemplate(groupId, templateId);
201            }
202    
203            public static void deleteTemplate(
204                    com.liferay.portlet.journal.model.JournalTemplate template)
205                    throws com.liferay.portal.kernel.exception.PortalException,
206                            com.liferay.portal.kernel.exception.SystemException {
207                    getService().deleteTemplate(template);
208            }
209    
210            public static void deleteTemplates(long groupId)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException {
213                    getService().deleteTemplates(groupId);
214            }
215    
216            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
217                    long groupId, java.lang.String structureId)
218                    throws com.liferay.portal.kernel.exception.SystemException {
219                    return getService().getStructureTemplates(groupId, structureId);
220            }
221    
222            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
223                    long groupId, java.lang.String structureId, int start, int end)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getService()
226                                       .getStructureTemplates(groupId, structureId, start, end);
227            }
228    
229            public static int getStructureTemplatesCount(long groupId,
230                    java.lang.String structureId)
231                    throws com.liferay.portal.kernel.exception.SystemException {
232                    return getService().getStructureTemplatesCount(groupId, structureId);
233            }
234    
235            public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
236                    long id)
237                    throws com.liferay.portal.kernel.exception.PortalException,
238                            com.liferay.portal.kernel.exception.SystemException {
239                    return getService().getTemplate(id);
240            }
241    
242            public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
243                    long groupId, java.lang.String templateId)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    return getService().getTemplate(groupId, templateId);
247            }
248    
249            public static com.liferay.portlet.journal.model.JournalTemplate getTemplateBySmallImageId(
250                    long smallImageId)
251                    throws com.liferay.portal.kernel.exception.PortalException,
252                            com.liferay.portal.kernel.exception.SystemException {
253                    return getService().getTemplateBySmallImageId(smallImageId);
254            }
255    
256            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates()
257                    throws com.liferay.portal.kernel.exception.SystemException {
258                    return getService().getTemplates();
259            }
260    
261            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
262                    long groupId)
263                    throws com.liferay.portal.kernel.exception.SystemException {
264                    return getService().getTemplates(groupId);
265            }
266    
267            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
268                    long groupId, int start, int end)
269                    throws com.liferay.portal.kernel.exception.SystemException {
270                    return getService().getTemplates(groupId, start, end);
271            }
272    
273            public static int getTemplatesCount(long groupId)
274                    throws com.liferay.portal.kernel.exception.SystemException {
275                    return getService().getTemplatesCount(groupId);
276            }
277    
278            public static boolean hasTemplate(long groupId, java.lang.String templateId)
279                    throws com.liferay.portal.kernel.exception.SystemException {
280                    return getService().hasTemplate(groupId, templateId);
281            }
282    
283            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
284                    long companyId, long groupId, java.lang.String keywords,
285                    java.lang.String structureId, java.lang.String structureIdComparator,
286                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
287                    throws com.liferay.portal.kernel.exception.SystemException {
288                    return getService()
289                                       .search(companyId, groupId, keywords, structureId,
290                            structureIdComparator, start, end, obc);
291            }
292    
293            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
294                    long companyId, long groupId, java.lang.String templateId,
295                    java.lang.String structureId, java.lang.String structureIdComparator,
296                    java.lang.String name, java.lang.String description,
297                    boolean andOperator, int start, int end,
298                    com.liferay.portal.kernel.util.OrderByComparator obc)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    return getService()
301                                       .search(companyId, groupId, templateId, structureId,
302                            structureIdComparator, name, description, andOperator, start, end,
303                            obc);
304            }
305    
306            public static int searchCount(long companyId, long groupId,
307                    java.lang.String keywords, java.lang.String structureId,
308                    java.lang.String structureIdComparator)
309                    throws com.liferay.portal.kernel.exception.SystemException {
310                    return getService()
311                                       .searchCount(companyId, groupId, keywords, structureId,
312                            structureIdComparator);
313            }
314    
315            public static int searchCount(long companyId, long groupId,
316                    java.lang.String templateId, java.lang.String structureId,
317                    java.lang.String structureIdComparator, java.lang.String name,
318                    java.lang.String description, boolean andOperator)
319                    throws com.liferay.portal.kernel.exception.SystemException {
320                    return getService()
321                                       .searchCount(companyId, groupId, templateId, structureId,
322                            structureIdComparator, name, description, andOperator);
323            }
324    
325            public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
326                    long groupId, java.lang.String templateId,
327                    java.lang.String structureId, java.lang.String name,
328                    java.lang.String description, java.lang.String xsl, boolean formatXsl,
329                    java.lang.String langType, boolean cacheable, boolean smallImage,
330                    java.lang.String smallImageURL, java.io.File smallFile,
331                    com.liferay.portal.service.ServiceContext serviceContext)
332                    throws com.liferay.portal.kernel.exception.PortalException,
333                            com.liferay.portal.kernel.exception.SystemException {
334                    return getService()
335                                       .updateTemplate(groupId, templateId, structureId, name,
336                            description, xsl, formatXsl, langType, cacheable, smallImage,
337                            smallImageURL, smallFile, serviceContext);
338            }
339    
340            public static JournalTemplateLocalService getService() {
341                    if (_service == null) {
342                            _service = (JournalTemplateLocalService)PortalBeanLocatorUtil.locate(JournalTemplateLocalService.class.getName());
343                    }
344    
345                    return _service;
346            }
347    
348            public void setService(JournalTemplateLocalService service) {
349                    _service = service;
350            }
351    
352            private static JournalTemplateLocalService _service;
353    }