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, long groupId, java.lang.String templateId,
111         boolean autoTemplateId, java.lang.String structureId,
112         java.lang.String name, java.lang.String description,
113         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
114         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
115         java.io.File smallFile,
116         com.liferay.portal.service.ServiceContext serviceContext)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException {
119         return getService()
120                    .addTemplate(userId, groupId, templateId, autoTemplateId,
121             structureId, name, description, xsl, formatXsl, langType,
122             cacheable, smallImage, smallImageURL, smallFile, serviceContext);
123     }
124 
125     public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
126         java.lang.String uuid, long userId, long groupId,
127         java.lang.String templateId, boolean autoTemplateId,
128         java.lang.String structureId, java.lang.String name,
129         java.lang.String description, java.lang.String xsl, boolean formatXsl,
130         java.lang.String langType, boolean cacheable, boolean smallImage,
131         java.lang.String smallImageURL, java.io.File smallFile,
132         com.liferay.portal.service.ServiceContext serviceContext)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         return getService()
136                    .addTemplate(uuid, userId, groupId, templateId,
137             autoTemplateId, structureId, name, description, xsl, formatXsl,
138             langType, cacheable, smallImage, smallImageURL, smallFile,
139             serviceContext);
140     }
141 
142     public static void addTemplateResources(long groupId,
143         java.lang.String templateId, boolean addCommunityPermissions,
144         boolean addGuestPermissions)
145         throws com.liferay.portal.PortalException,
146             com.liferay.portal.SystemException {
147         getService()
148             .addTemplateResources(groupId, templateId, addCommunityPermissions,
149             addGuestPermissions);
150     }
151 
152     public static void addTemplateResources(
153         com.liferay.portlet.journal.model.JournalTemplate template,
154         boolean addCommunityPermissions, boolean addGuestPermissions)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         getService()
158             .addTemplateResources(template, addCommunityPermissions,
159             addGuestPermissions);
160     }
161 
162     public static void addTemplateResources(long groupId,
163         java.lang.String templateId, java.lang.String[] communityPermissions,
164         java.lang.String[] guestPermissions)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         getService()
168             .addTemplateResources(groupId, templateId, communityPermissions,
169             guestPermissions);
170     }
171 
172     public static void addTemplateResources(
173         com.liferay.portlet.journal.model.JournalTemplate template,
174         java.lang.String[] communityPermissions,
175         java.lang.String[] guestPermissions)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException {
178         getService()
179             .addTemplateResources(template, communityPermissions,
180             guestPermissions);
181     }
182 
183     public static void checkNewLine(long groupId, java.lang.String templateId)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         getService().checkNewLine(groupId, templateId);
187     }
188 
189     public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
190         long userId, long groupId, java.lang.String oldTemplateId,
191         java.lang.String newTemplateId, boolean autoTemplateId)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException {
194         return getService()
195                    .copyTemplate(userId, groupId, oldTemplateId, newTemplateId,
196             autoTemplateId);
197     }
198 
199     public static void deleteTemplate(long groupId, java.lang.String templateId)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         getService().deleteTemplate(groupId, templateId);
203     }
204 
205     public static void deleteTemplate(
206         com.liferay.portlet.journal.model.JournalTemplate template)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException {
209         getService().deleteTemplate(template);
210     }
211 
212     public static void deleteTemplates(long groupId)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException {
215         getService().deleteTemplates(groupId);
216     }
217 
218     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
219         long groupId, java.lang.String structureId)
220         throws com.liferay.portal.SystemException {
221         return getService().getStructureTemplates(groupId, structureId);
222     }
223 
224     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
225         long groupId, java.lang.String structureId, int start, int end)
226         throws com.liferay.portal.SystemException {
227         return getService()
228                    .getStructureTemplates(groupId, structureId, start, end);
229     }
230 
231     public static int getStructureTemplatesCount(long groupId,
232         java.lang.String structureId) throws com.liferay.portal.SystemException {
233         return getService().getStructureTemplatesCount(groupId, structureId);
234     }
235 
236     public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
237         long id)
238         throws com.liferay.portal.PortalException,
239             com.liferay.portal.SystemException {
240         return getService().getTemplate(id);
241     }
242 
243     public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
244         long groupId, java.lang.String templateId)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException {
247         return getService().getTemplate(groupId, templateId);
248     }
249 
250     public static com.liferay.portlet.journal.model.JournalTemplate getTemplateBySmallImageId(
251         long smallImageId)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException {
254         return getService().getTemplateBySmallImageId(smallImageId);
255     }
256 
257     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates()
258         throws com.liferay.portal.SystemException {
259         return getService().getTemplates();
260     }
261 
262     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
263         long groupId) throws com.liferay.portal.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.SystemException {
270         return getService().getTemplates(groupId, start, end);
271     }
272 
273     public static int getTemplatesCount(long groupId)
274         throws com.liferay.portal.SystemException {
275         return getService().getTemplatesCount(groupId);
276     }
277 
278     public static boolean hasTemplate(long groupId, java.lang.String templateId)
279         throws com.liferay.portal.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.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.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.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.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.PortalException,
333             com.liferay.portal.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             throw new RuntimeException("JournalTemplateLocalService is not set");
343         }
344 
345         return _service;
346     }
347 
348     public void setService(JournalTemplateLocalService service) {
349         _service = service;
350     }
351 
352     private static JournalTemplateLocalService _service;
353 }