1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.journal.service;
24  
25  /**
26   * <a href="JournalTemplateLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.journal.service.JournalTemplateLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.journal.service.JournalTemplateLocalServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.journal.service.JournalTemplateLocalService
48   * @see com.liferay.portlet.journal.service.JournalTemplateLocalServiceFactory
49   *
50   */
51  public class JournalTemplateLocalServiceUtil {
52      public static com.liferay.portlet.journal.model.JournalTemplate addJournalTemplate(
53          com.liferay.portlet.journal.model.JournalTemplate model)
54          throws com.liferay.portal.SystemException {
55          JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
56  
57          return journalTemplateLocalService.addJournalTemplate(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
64  
65          return journalTemplateLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
72  
73          return journalTemplateLocalService.dynamicQuery(queryInitializer,
74              begin, end);
75      }
76  
77      public static com.liferay.portlet.journal.model.JournalTemplate updateJournalTemplate(
78          com.liferay.portlet.journal.model.JournalTemplate model)
79          throws com.liferay.portal.SystemException {
80          JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
81  
82          return journalTemplateLocalService.updateJournalTemplate(model);
83      }
84  
85      public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
86          long userId, java.lang.String templateId, boolean autoTemplateId,
87          long plid, java.lang.String structureId, java.lang.String name,
88          java.lang.String description, java.lang.String xsl, boolean formatXsl,
89          java.lang.String langType, boolean smallImage,
90          java.lang.String smallImageURL, java.io.File smallFile,
91          boolean addCommunityPermissions, boolean addGuestPermissions)
92          throws com.liferay.portal.PortalException, 
93              com.liferay.portal.SystemException {
94          JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
95  
96          return journalTemplateLocalService.addTemplate(userId, templateId,
97              autoTemplateId, plid, structureId, name, description, xsl,
98              formatXsl, langType, smallImage, smallImageURL, smallFile,
99              addCommunityPermissions, addGuestPermissions);
100     }
101 
102     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
103         long userId, java.lang.String templateId, boolean autoTemplateId,
104         long plid, java.lang.String structureId, java.lang.String name,
105         java.lang.String description, java.lang.String xsl, boolean formatXsl,
106         java.lang.String langType, boolean smallImage,
107         java.lang.String smallImageURL, java.io.File smallFile,
108         java.lang.String[] communityPermissions,
109         java.lang.String[] guestPermissions)
110         throws com.liferay.portal.PortalException, 
111             com.liferay.portal.SystemException {
112         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
113 
114         return journalTemplateLocalService.addTemplate(userId, templateId,
115             autoTemplateId, plid, structureId, name, description, xsl,
116             formatXsl, langType, smallImage, smallImageURL, smallFile,
117             communityPermissions, guestPermissions);
118     }
119 
120     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
121         long userId, java.lang.String templateId, boolean autoTemplateId,
122         long plid, java.lang.String structureId, java.lang.String name,
123         java.lang.String description, java.lang.String xsl, boolean formatXsl,
124         java.lang.String langType, boolean smallImage,
125         java.lang.String smallImageURL, java.io.File smallFile,
126         java.lang.Boolean addCommunityPermissions,
127         java.lang.Boolean addGuestPermissions,
128         java.lang.String[] communityPermissions,
129         java.lang.String[] guestPermissions)
130         throws com.liferay.portal.PortalException, 
131             com.liferay.portal.SystemException {
132         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
133 
134         return journalTemplateLocalService.addTemplate(userId, templateId,
135             autoTemplateId, plid, structureId, name, description, xsl,
136             formatXsl, langType, smallImage, smallImageURL, smallFile,
137             addCommunityPermissions, addGuestPermissions, communityPermissions,
138             guestPermissions);
139     }
140 
141     public static com.liferay.portlet.journal.model.JournalTemplate addTemplateToGroup(
142         long userId, java.lang.String templateId, boolean autoTemplateId,
143         long groupId, java.lang.String structureId, java.lang.String name,
144         java.lang.String description, java.lang.String xsl, boolean formatXsl,
145         java.lang.String langType, boolean smallImage,
146         java.lang.String smallImageURL, java.io.File smallFile,
147         java.lang.Boolean addCommunityPermissions,
148         java.lang.Boolean addGuestPermissions,
149         java.lang.String[] communityPermissions,
150         java.lang.String[] guestPermissions)
151         throws com.liferay.portal.PortalException, 
152             com.liferay.portal.SystemException {
153         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
154 
155         return journalTemplateLocalService.addTemplateToGroup(userId,
156             templateId, autoTemplateId, groupId, structureId, name,
157             description, xsl, formatXsl, langType, smallImage, smallImageURL,
158             smallFile, addCommunityPermissions, addGuestPermissions,
159             communityPermissions, guestPermissions);
160     }
161 
162     public static void addTemplateResources(long groupId,
163         java.lang.String templateId, boolean addCommunityPermissions,
164         boolean addGuestPermissions)
165         throws com.liferay.portal.PortalException, 
166             com.liferay.portal.SystemException {
167         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
168         journalTemplateLocalService.addTemplateResources(groupId, templateId,
169             addCommunityPermissions, addGuestPermissions);
170     }
171 
172     public static void addTemplateResources(
173         com.liferay.portlet.journal.model.JournalTemplate template,
174         boolean addCommunityPermissions, boolean addGuestPermissions)
175         throws com.liferay.portal.PortalException, 
176             com.liferay.portal.SystemException {
177         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
178         journalTemplateLocalService.addTemplateResources(template,
179             addCommunityPermissions, addGuestPermissions);
180     }
181 
182     public static void addTemplateResources(long groupId,
183         java.lang.String templateId, java.lang.String[] communityPermissions,
184         java.lang.String[] guestPermissions)
185         throws com.liferay.portal.PortalException, 
186             com.liferay.portal.SystemException {
187         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
188         journalTemplateLocalService.addTemplateResources(groupId, templateId,
189             communityPermissions, guestPermissions);
190     }
191 
192     public static void addTemplateResources(
193         com.liferay.portlet.journal.model.JournalTemplate template,
194         java.lang.String[] communityPermissions,
195         java.lang.String[] guestPermissions)
196         throws com.liferay.portal.PortalException, 
197             com.liferay.portal.SystemException {
198         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
199         journalTemplateLocalService.addTemplateResources(template,
200             communityPermissions, guestPermissions);
201     }
202 
203     public static void checkNewLine(long groupId, java.lang.String templateId)
204         throws com.liferay.portal.PortalException, 
205             com.liferay.portal.SystemException {
206         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
207         journalTemplateLocalService.checkNewLine(groupId, templateId);
208     }
209 
210     public static void deleteTemplate(long groupId, java.lang.String templateId)
211         throws com.liferay.portal.PortalException, 
212             com.liferay.portal.SystemException {
213         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
214         journalTemplateLocalService.deleteTemplate(groupId, templateId);
215     }
216 
217     public static void deleteTemplate(
218         com.liferay.portlet.journal.model.JournalTemplate template)
219         throws com.liferay.portal.PortalException, 
220             com.liferay.portal.SystemException {
221         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
222         journalTemplateLocalService.deleteTemplate(template);
223     }
224 
225     public static java.util.List getStructureTemplates(long groupId,
226         java.lang.String structureId) throws com.liferay.portal.SystemException {
227         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
228 
229         return journalTemplateLocalService.getStructureTemplates(groupId,
230             structureId);
231     }
232 
233     public static java.util.List getStructureTemplates(long groupId,
234         java.lang.String structureId, int begin, int end)
235         throws com.liferay.portal.SystemException {
236         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
237 
238         return journalTemplateLocalService.getStructureTemplates(groupId,
239             structureId, begin, end);
240     }
241 
242     public static int getStructureTemplatesCount(long groupId,
243         java.lang.String structureId) throws com.liferay.portal.SystemException {
244         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
245 
246         return journalTemplateLocalService.getStructureTemplatesCount(groupId,
247             structureId);
248     }
249 
250     public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
251         long id)
252         throws com.liferay.portal.PortalException, 
253             com.liferay.portal.SystemException {
254         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
255 
256         return journalTemplateLocalService.getTemplate(id);
257     }
258 
259     public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
260         long groupId, java.lang.String templateId)
261         throws com.liferay.portal.PortalException, 
262             com.liferay.portal.SystemException {
263         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
264 
265         return journalTemplateLocalService.getTemplate(groupId, templateId);
266     }
267 
268     public static java.util.List getTemplates()
269         throws com.liferay.portal.SystemException {
270         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
271 
272         return journalTemplateLocalService.getTemplates();
273     }
274 
275     public static java.util.List getTemplates(long groupId)
276         throws com.liferay.portal.SystemException {
277         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
278 
279         return journalTemplateLocalService.getTemplates(groupId);
280     }
281 
282     public static java.util.List getTemplates(long groupId, int begin, int end)
283         throws com.liferay.portal.SystemException {
284         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
285 
286         return journalTemplateLocalService.getTemplates(groupId, begin, end);
287     }
288 
289     public static int getTemplatesCount(long groupId)
290         throws com.liferay.portal.SystemException {
291         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
292 
293         return journalTemplateLocalService.getTemplatesCount(groupId);
294     }
295 
296     public static boolean hasTemplate(long groupId, java.lang.String templateId)
297         throws com.liferay.portal.SystemException {
298         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
299 
300         return journalTemplateLocalService.hasTemplate(groupId, templateId);
301     }
302 
303     public static java.util.List search(long companyId, long groupId,
304         java.lang.String keywords, java.lang.String structureId,
305         java.lang.String structureIdComparator, int begin, int end,
306         com.liferay.portal.kernel.util.OrderByComparator obc)
307         throws com.liferay.portal.SystemException {
308         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
309 
310         return journalTemplateLocalService.search(companyId, groupId, keywords,
311             structureId, structureIdComparator, begin, end, obc);
312     }
313 
314     public static java.util.List search(long companyId, long groupId,
315         java.lang.String templateId, java.lang.String structureId,
316         java.lang.String structureIdComparator, java.lang.String name,
317         java.lang.String description, boolean andOperator, int begin, int end,
318         com.liferay.portal.kernel.util.OrderByComparator obc)
319         throws com.liferay.portal.SystemException {
320         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
321 
322         return journalTemplateLocalService.search(companyId, groupId,
323             templateId, structureId, structureIdComparator, name, description,
324             andOperator, begin, end, obc);
325     }
326 
327     public static int searchCount(long companyId, long groupId,
328         java.lang.String keywords, java.lang.String structureId,
329         java.lang.String structureIdComparator)
330         throws com.liferay.portal.SystemException {
331         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
332 
333         return journalTemplateLocalService.searchCount(companyId, groupId,
334             keywords, structureId, structureIdComparator);
335     }
336 
337     public static int searchCount(long companyId, long groupId,
338         java.lang.String templateId, java.lang.String structureId,
339         java.lang.String structureIdComparator, java.lang.String name,
340         java.lang.String description, boolean andOperator)
341         throws com.liferay.portal.SystemException {
342         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
343 
344         return journalTemplateLocalService.searchCount(companyId, groupId,
345             templateId, structureId, structureIdComparator, name, description,
346             andOperator);
347     }
348 
349     public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
350         long groupId, java.lang.String templateId,
351         java.lang.String structureId, java.lang.String name,
352         java.lang.String description, java.lang.String xsl, boolean formatXsl,
353         java.lang.String langType, boolean smallImage,
354         java.lang.String smallImageURL, java.io.File smallFile)
355         throws com.liferay.portal.PortalException, 
356             com.liferay.portal.SystemException {
357         JournalTemplateLocalService journalTemplateLocalService = JournalTemplateLocalServiceFactory.getService();
358 
359         return journalTemplateLocalService.updateTemplate(groupId, templateId,
360             structureId, name, description, xsl, formatXsl, langType,
361             smallImage, smallImageURL, smallFile);
362     }
363 }