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