1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.journal.service;
21  
22  
23  /**
24   * <a href="JournalTemplateLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.journal.service.JournalTemplateLocalService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.journal.service.JournalTemplateLocalService
42   *
43   */
44  public class JournalTemplateLocalServiceUtil {
45      public static com.liferay.portlet.journal.model.JournalTemplate addJournalTemplate(
46          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
47          throws com.liferay.portal.SystemException {
48          return getService().addJournalTemplate(journalTemplate);
49      }
50  
51      public static com.liferay.portlet.journal.model.JournalTemplate createJournalTemplate(
52          long id) {
53          return getService().createJournalTemplate(id);
54      }
55  
56      public static void deleteJournalTemplate(long id)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteJournalTemplate(id);
60      }
61  
62      public static void deleteJournalTemplate(
63          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
64          throws com.liferay.portal.SystemException {
65          getService().deleteJournalTemplate(journalTemplate);
66      }
67  
68      public static java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException {
71          return getService().dynamicQuery(dynamicQuery);
72      }
73  
74      public static java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      public static com.liferay.portlet.journal.model.JournalTemplate getJournalTemplate(
81          long id)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getJournalTemplate(id);
85      }
86  
87      public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getJournalTemplates(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getJournalTemplates(start, end);
90      }
91  
92      public static int getJournalTemplatesCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getJournalTemplatesCount();
95      }
96  
97      public static com.liferay.portlet.journal.model.JournalTemplate updateJournalTemplate(
98          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
99          throws com.liferay.portal.SystemException {
100         return getService().updateJournalTemplate(journalTemplate);
101     }
102 
103     public static com.liferay.portlet.journal.model.JournalTemplate updateJournalTemplate(
104         com.liferay.portlet.journal.model.JournalTemplate journalTemplate,
105         boolean merge) throws com.liferay.portal.SystemException {
106         return getService().updateJournalTemplate(journalTemplate, merge);
107     }
108 
109     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
110         long userId, java.lang.String templateId, boolean autoTemplateId,
111         long plid, java.lang.String structureId, java.lang.String name,
112         java.lang.String description, java.lang.String xsl, boolean formatXsl,
113         java.lang.String langType, boolean cacheable, boolean smallImage,
114         java.lang.String smallImageURL, java.io.File smallFile,
115         boolean addCommunityPermissions, boolean addGuestPermissions)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException {
118         return getService()
119                    .addTemplate(userId, templateId, autoTemplateId, plid,
120             structureId, name, description, xsl, formatXsl, langType,
121             cacheable, smallImage, smallImageURL, smallFile,
122             addCommunityPermissions, addGuestPermissions);
123     }
124 
125     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
126         java.lang.String uuid, long userId, java.lang.String templateId,
127         boolean autoTemplateId, long plid, java.lang.String structureId,
128         java.lang.String name, java.lang.String description,
129         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
130         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
131         java.io.File smallFile, boolean addCommunityPermissions,
132         boolean addGuestPermissions)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         return getService()
136                    .addTemplate(uuid, userId, templateId, autoTemplateId, plid,
137             structureId, name, description, xsl, formatXsl, langType,
138             cacheable, smallImage, smallImageURL, smallFile,
139             addCommunityPermissions, addGuestPermissions);
140     }
141 
142     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
143         long userId, java.lang.String templateId, boolean autoTemplateId,
144         long plid, java.lang.String structureId, java.lang.String name,
145         java.lang.String description, java.lang.String xsl, boolean formatXsl,
146         java.lang.String langType, boolean cacheable, boolean smallImage,
147         java.lang.String smallImageURL, java.io.File smallFile,
148         java.lang.String[] communityPermissions,
149         java.lang.String[] guestPermissions)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException {
152         return getService()
153                    .addTemplate(userId, templateId, autoTemplateId, plid,
154             structureId, name, description, xsl, formatXsl, langType,
155             cacheable, smallImage, smallImageURL, smallFile,
156             communityPermissions, guestPermissions);
157     }
158 
159     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
160         java.lang.String uuid, long userId, java.lang.String templateId,
161         boolean autoTemplateId, long plid, java.lang.String structureId,
162         java.lang.String name, java.lang.String description,
163         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
164         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
165         java.io.File smallFile, java.lang.Boolean addCommunityPermissions,
166         java.lang.Boolean addGuestPermissions,
167         java.lang.String[] communityPermissions,
168         java.lang.String[] guestPermissions)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException {
171         return getService()
172                    .addTemplate(uuid, userId, templateId, autoTemplateId, plid,
173             structureId, name, description, xsl, formatXsl, langType,
174             cacheable, smallImage, smallImageURL, smallFile,
175             addCommunityPermissions, addGuestPermissions, communityPermissions,
176             guestPermissions);
177     }
178 
179     public static com.liferay.portlet.journal.model.JournalTemplate addTemplateToGroup(
180         java.lang.String uuid, long userId, java.lang.String templateId,
181         boolean autoTemplateId, long groupId, java.lang.String structureId,
182         java.lang.String name, java.lang.String description,
183         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
184         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
185         java.io.File smallFile, java.lang.Boolean addCommunityPermissions,
186         java.lang.Boolean addGuestPermissions,
187         java.lang.String[] communityPermissions,
188         java.lang.String[] guestPermissions)
189         throws com.liferay.portal.PortalException,
190             com.liferay.portal.SystemException {
191         return getService()
192                    .addTemplateToGroup(uuid, userId, templateId,
193             autoTemplateId, groupId, structureId, name, description, xsl,
194             formatXsl, langType, cacheable, smallImage, smallImageURL,
195             smallFile, addCommunityPermissions, addGuestPermissions,
196             communityPermissions, guestPermissions);
197     }
198 
199     public static void addTemplateResources(long groupId,
200         java.lang.String templateId, boolean addCommunityPermissions,
201         boolean addGuestPermissions)
202         throws com.liferay.portal.PortalException,
203             com.liferay.portal.SystemException {
204         getService()
205             .addTemplateResources(groupId, templateId, addCommunityPermissions,
206             addGuestPermissions);
207     }
208 
209     public static void addTemplateResources(
210         com.liferay.portlet.journal.model.JournalTemplate template,
211         boolean addCommunityPermissions, boolean addGuestPermissions)
212         throws com.liferay.portal.PortalException,
213             com.liferay.portal.SystemException {
214         getService()
215             .addTemplateResources(template, addCommunityPermissions,
216             addGuestPermissions);
217     }
218 
219     public static void addTemplateResources(long groupId,
220         java.lang.String templateId, java.lang.String[] communityPermissions,
221         java.lang.String[] guestPermissions)
222         throws com.liferay.portal.PortalException,
223             com.liferay.portal.SystemException {
224         getService()
225             .addTemplateResources(groupId, templateId, communityPermissions,
226             guestPermissions);
227     }
228 
229     public static void addTemplateResources(
230         com.liferay.portlet.journal.model.JournalTemplate template,
231         java.lang.String[] communityPermissions,
232         java.lang.String[] guestPermissions)
233         throws com.liferay.portal.PortalException,
234             com.liferay.portal.SystemException {
235         getService()
236             .addTemplateResources(template, communityPermissions,
237             guestPermissions);
238     }
239 
240     public static void checkNewLine(long groupId, java.lang.String templateId)
241         throws com.liferay.portal.PortalException,
242             com.liferay.portal.SystemException {
243         getService().checkNewLine(groupId, templateId);
244     }
245 
246     public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
247         long userId, long groupId, java.lang.String oldTemplateId,
248         java.lang.String newTemplateId, boolean autoTemplateId)
249         throws com.liferay.portal.PortalException,
250             com.liferay.portal.SystemException {
251         return getService()
252                    .copyTemplate(userId, groupId, oldTemplateId, newTemplateId,
253             autoTemplateId);
254     }
255 
256     public static void deleteTemplate(long groupId, java.lang.String templateId)
257         throws com.liferay.portal.PortalException,
258             com.liferay.portal.SystemException {
259         getService().deleteTemplate(groupId, templateId);
260     }
261 
262     public static void deleteTemplate(
263         com.liferay.portlet.journal.model.JournalTemplate template)
264         throws com.liferay.portal.PortalException,
265             com.liferay.portal.SystemException {
266         getService().deleteTemplate(template);
267     }
268 
269     public static void deleteTemplates(long groupId)
270         throws com.liferay.portal.PortalException,
271             com.liferay.portal.SystemException {
272         getService().deleteTemplates(groupId);
273     }
274 
275     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
276         long groupId, java.lang.String structureId)
277         throws com.liferay.portal.SystemException {
278         return getService().getStructureTemplates(groupId, structureId);
279     }
280 
281     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
282         long groupId, java.lang.String structureId, int start, int end)
283         throws com.liferay.portal.SystemException {
284         return getService()
285                    .getStructureTemplates(groupId, structureId, start, end);
286     }
287 
288     public static int getStructureTemplatesCount(long groupId,
289         java.lang.String structureId) throws com.liferay.portal.SystemException {
290         return getService().getStructureTemplatesCount(groupId, structureId);
291     }
292 
293     public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
294         long id)
295         throws com.liferay.portal.PortalException,
296             com.liferay.portal.SystemException {
297         return getService().getTemplate(id);
298     }
299 
300     public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
301         long groupId, java.lang.String templateId)
302         throws com.liferay.portal.PortalException,
303             com.liferay.portal.SystemException {
304         return getService().getTemplate(groupId, templateId);
305     }
306 
307     public static com.liferay.portlet.journal.model.JournalTemplate getTemplateBySmallImageId(
308         long smallImageId)
309         throws com.liferay.portal.PortalException,
310             com.liferay.portal.SystemException {
311         return getService().getTemplateBySmallImageId(smallImageId);
312     }
313 
314     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates()
315         throws com.liferay.portal.SystemException {
316         return getService().getTemplates();
317     }
318 
319     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
320         long groupId) throws com.liferay.portal.SystemException {
321         return getService().getTemplates(groupId);
322     }
323 
324     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
325         long groupId, int start, int end)
326         throws com.liferay.portal.SystemException {
327         return getService().getTemplates(groupId, start, end);
328     }
329 
330     public static int getTemplatesCount(long groupId)
331         throws com.liferay.portal.SystemException {
332         return getService().getTemplatesCount(groupId);
333     }
334 
335     public static boolean hasTemplate(long groupId, java.lang.String templateId)
336         throws com.liferay.portal.SystemException {
337         return getService().hasTemplate(groupId, templateId);
338     }
339 
340     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
341         long companyId, long groupId, java.lang.String keywords,
342         java.lang.String structureId, java.lang.String structureIdComparator,
343         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
344         throws com.liferay.portal.SystemException {
345         return getService()
346                    .search(companyId, groupId, keywords, structureId,
347             structureIdComparator, start, end, obc);
348     }
349 
350     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
351         long companyId, long groupId, java.lang.String templateId,
352         java.lang.String structureId, java.lang.String structureIdComparator,
353         java.lang.String name, java.lang.String description,
354         boolean andOperator, int start, int end,
355         com.liferay.portal.kernel.util.OrderByComparator obc)
356         throws com.liferay.portal.SystemException {
357         return getService()
358                    .search(companyId, groupId, templateId, structureId,
359             structureIdComparator, name, description, andOperator, start, end,
360             obc);
361     }
362 
363     public static int searchCount(long companyId, long groupId,
364         java.lang.String keywords, java.lang.String structureId,
365         java.lang.String structureIdComparator)
366         throws com.liferay.portal.SystemException {
367         return getService()
368                    .searchCount(companyId, groupId, keywords, structureId,
369             structureIdComparator);
370     }
371 
372     public static int searchCount(long companyId, long groupId,
373         java.lang.String templateId, java.lang.String structureId,
374         java.lang.String structureIdComparator, java.lang.String name,
375         java.lang.String description, boolean andOperator)
376         throws com.liferay.portal.SystemException {
377         return getService()
378                    .searchCount(companyId, groupId, templateId, structureId,
379             structureIdComparator, name, description, andOperator);
380     }
381 
382     public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
383         long groupId, java.lang.String templateId,
384         java.lang.String structureId, java.lang.String name,
385         java.lang.String description, java.lang.String xsl, boolean formatXsl,
386         java.lang.String langType, boolean cacheable, boolean smallImage,
387         java.lang.String smallImageURL, java.io.File smallFile)
388         throws com.liferay.portal.PortalException,
389             com.liferay.portal.SystemException {
390         return getService()
391                    .updateTemplate(groupId, templateId, structureId, name,
392             description, xsl, formatXsl, langType, cacheable, smallImage,
393             smallImageURL, smallFile);
394     }
395 
396     public static JournalTemplateLocalService getService() {
397         if (_service == null) {
398             throw new RuntimeException("JournalTemplateLocalService is not set");
399         }
400 
401         return _service;
402     }
403 
404     public void setService(JournalTemplateLocalService service) {
405         _service = service;
406     }
407 
408     private static JournalTemplateLocalService _service;
409 }