1   /**
2    * Copyright (c) 2000-2009 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  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="JournalTemplateLocalService.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This interface defines the service. The default implementation is
40   * <code>com.liferay.portlet.journal.service.impl.JournalTemplateLocalServiceImpl</code>.
41   * Modify methods in that class and rerun ServiceBuilder to populate this class
42   * and all other generated classes.
43   * </p>
44   *
45   * <p>
46   * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
47   * </p>
48   *
49   * @author Brian Wing Shun Chan
50   *
51   * @see com.liferay.portlet.journal.service.JournalTemplateLocalServiceUtil
52   *
53   */
54  @Transactional(rollbackFor =  {
55      PortalException.class, SystemException.class})
56  public interface JournalTemplateLocalService {
57      public com.liferay.portlet.journal.model.JournalTemplate addJournalTemplate(
58          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
59          throws com.liferay.portal.SystemException;
60  
61      public com.liferay.portlet.journal.model.JournalTemplate createJournalTemplate(
62          long id);
63  
64      public void deleteJournalTemplate(long id)
65          throws com.liferay.portal.SystemException,
66              com.liferay.portal.PortalException;
67  
68      public void deleteJournalTemplate(
69          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
70          throws com.liferay.portal.SystemException;
71  
72      public java.util.List<Object> dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
74          throws com.liferay.portal.SystemException;
75  
76      public 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  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public com.liferay.portlet.journal.model.JournalTemplate getJournalTemplate(
82          long id)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portal.PortalException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getJournalTemplates(
88          int start, int end) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public int getJournalTemplatesCount()
92          throws com.liferay.portal.SystemException;
93  
94      public com.liferay.portlet.journal.model.JournalTemplate updateJournalTemplate(
95          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
96          throws com.liferay.portal.SystemException;
97  
98      public com.liferay.portlet.journal.model.JournalTemplate addTemplate(
99          long userId, long groupId, java.lang.String templateId,
100         boolean autoTemplateId, java.lang.String structureId,
101         java.lang.String name, java.lang.String description,
102         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
103         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
104         java.io.File smallFile, boolean addCommunityPermissions,
105         boolean addGuestPermissions)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException;
108 
109     public com.liferay.portlet.journal.model.JournalTemplate addTemplate(
110         java.lang.String uuid, long userId, long groupId,
111         java.lang.String templateId, boolean autoTemplateId,
112         java.lang.String structureId, java.lang.String name,
113         java.lang.String description, java.lang.String xsl, boolean formatXsl,
114         java.lang.String langType, boolean cacheable, boolean smallImage,
115         java.lang.String smallImageURL, java.io.File smallFile,
116         boolean addCommunityPermissions, boolean addGuestPermissions)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException;
119 
120     public com.liferay.portlet.journal.model.JournalTemplate addTemplate(
121         long userId, long groupId, java.lang.String templateId,
122         boolean autoTemplateId, java.lang.String structureId,
123         java.lang.String name, java.lang.String description,
124         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
125         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
126         java.io.File smallFile, java.lang.String[] communityPermissions,
127         java.lang.String[] guestPermissions)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException;
130 
131     public com.liferay.portlet.journal.model.JournalTemplate addTemplate(
132         java.lang.String uuid, long userId, long groupId,
133         java.lang.String templateId, boolean autoTemplateId,
134         java.lang.String structureId, java.lang.String name,
135         java.lang.String description, java.lang.String xsl, boolean formatXsl,
136         java.lang.String langType, boolean cacheable, boolean smallImage,
137         java.lang.String smallImageURL, java.io.File smallFile,
138         java.lang.Boolean addCommunityPermissions,
139         java.lang.Boolean addGuestPermissions,
140         java.lang.String[] communityPermissions,
141         java.lang.String[] guestPermissions)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException;
144 
145     public void addTemplateResources(long groupId, java.lang.String templateId,
146         boolean addCommunityPermissions, boolean addGuestPermissions)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException;
149 
150     public void addTemplateResources(
151         com.liferay.portlet.journal.model.JournalTemplate template,
152         boolean addCommunityPermissions, boolean addGuestPermissions)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException;
155 
156     public void addTemplateResources(long groupId, java.lang.String templateId,
157         java.lang.String[] communityPermissions,
158         java.lang.String[] guestPermissions)
159         throws com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException;
161 
162     public void addTemplateResources(
163         com.liferay.portlet.journal.model.JournalTemplate template,
164         java.lang.String[] communityPermissions,
165         java.lang.String[] guestPermissions)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException;
168 
169     public void checkNewLine(long groupId, java.lang.String templateId)
170         throws com.liferay.portal.PortalException,
171             com.liferay.portal.SystemException;
172 
173     public com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
174         long userId, long groupId, java.lang.String oldTemplateId,
175         java.lang.String newTemplateId, boolean autoTemplateId)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException;
178 
179     public void deleteTemplate(long groupId, java.lang.String templateId)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException;
182 
183     public void deleteTemplate(
184         com.liferay.portlet.journal.model.JournalTemplate template)
185         throws com.liferay.portal.PortalException,
186             com.liferay.portal.SystemException;
187 
188     public void deleteTemplates(long groupId)
189         throws com.liferay.portal.PortalException,
190             com.liferay.portal.SystemException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
194         long groupId, java.lang.String structureId)
195         throws com.liferay.portal.SystemException;
196 
197     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
199         long groupId, java.lang.String structureId, int start, int end)
200         throws com.liferay.portal.SystemException;
201 
202     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203     public int getStructureTemplatesCount(long groupId,
204         java.lang.String structureId) throws com.liferay.portal.SystemException;
205 
206     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207     public com.liferay.portlet.journal.model.JournalTemplate getTemplate(
208         long id)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public com.liferay.portlet.journal.model.JournalTemplate getTemplate(
214         long groupId, java.lang.String templateId)
215         throws com.liferay.portal.PortalException,
216             com.liferay.portal.SystemException;
217 
218     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219     public com.liferay.portlet.journal.model.JournalTemplate getTemplateBySmallImageId(
220         long smallImageId)
221         throws com.liferay.portal.PortalException,
222             com.liferay.portal.SystemException;
223 
224     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates()
226         throws com.liferay.portal.SystemException;
227 
228     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
230         long groupId) throws com.liferay.portal.SystemException;
231 
232     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
234         long groupId, int start, int end)
235         throws com.liferay.portal.SystemException;
236 
237     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238     public int getTemplatesCount(long groupId)
239         throws com.liferay.portal.SystemException;
240 
241     public boolean hasTemplate(long groupId, java.lang.String templateId)
242         throws com.liferay.portal.SystemException;
243 
244     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
246         long companyId, long groupId, java.lang.String keywords,
247         java.lang.String structureId, java.lang.String structureIdComparator,
248         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
249         throws com.liferay.portal.SystemException;
250 
251     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
253         long companyId, long groupId, java.lang.String templateId,
254         java.lang.String structureId, java.lang.String structureIdComparator,
255         java.lang.String name, java.lang.String description,
256         boolean andOperator, int start, int end,
257         com.liferay.portal.kernel.util.OrderByComparator obc)
258         throws com.liferay.portal.SystemException;
259 
260     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261     public int searchCount(long companyId, long groupId,
262         java.lang.String keywords, java.lang.String structureId,
263         java.lang.String structureIdComparator)
264         throws com.liferay.portal.SystemException;
265 
266     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267     public int searchCount(long companyId, long groupId,
268         java.lang.String templateId, java.lang.String structureId,
269         java.lang.String structureIdComparator, java.lang.String name,
270         java.lang.String description, boolean andOperator)
271         throws com.liferay.portal.SystemException;
272 
273     public com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
274         long groupId, java.lang.String templateId,
275         java.lang.String structureId, java.lang.String name,
276         java.lang.String description, java.lang.String xsl, boolean formatXsl,
277         java.lang.String langType, boolean cacheable, boolean smallImage,
278         java.lang.String smallImageURL, java.io.File smallFile)
279         throws com.liferay.portal.PortalException,
280             com.liferay.portal.SystemException;
281 }