1   /**
2    * Copyright (c) 2000-2008 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, java.lang.String templateId, boolean autoTemplateId,
100         long plid, java.lang.String structureId, java.lang.String name,
101         java.lang.String description, java.lang.String xsl, boolean formatXsl,
102         java.lang.String langType, boolean cacheable, boolean smallImage,
103         java.lang.String smallImageURL, java.io.File smallFile,
104         boolean addCommunityPermissions, boolean addGuestPermissions)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException;
107 
108     public com.liferay.portlet.journal.model.JournalTemplate addTemplate(
109         java.lang.String uuid, long userId, java.lang.String templateId,
110         boolean autoTemplateId, long plid, java.lang.String structureId,
111         java.lang.String name, java.lang.String description,
112         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
113         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
114         java.io.File smallFile, boolean addCommunityPermissions,
115         boolean addGuestPermissions)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException;
118 
119     public com.liferay.portlet.journal.model.JournalTemplate addTemplate(
120         long userId, java.lang.String templateId, boolean autoTemplateId,
121         long plid, java.lang.String structureId, java.lang.String name,
122         java.lang.String description, java.lang.String xsl, boolean formatXsl,
123         java.lang.String langType, boolean cacheable, boolean smallImage,
124         java.lang.String smallImageURL, java.io.File smallFile,
125         java.lang.String[] communityPermissions,
126         java.lang.String[] guestPermissions)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException;
129 
130     public com.liferay.portlet.journal.model.JournalTemplate addTemplate(
131         java.lang.String uuid, long userId, java.lang.String templateId,
132         boolean autoTemplateId, long plid, java.lang.String structureId,
133         java.lang.String name, java.lang.String description,
134         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
135         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
136         java.io.File smallFile, java.lang.Boolean addCommunityPermissions,
137         java.lang.Boolean addGuestPermissions,
138         java.lang.String[] communityPermissions,
139         java.lang.String[] guestPermissions)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException;
142 
143     public com.liferay.portlet.journal.model.JournalTemplate addTemplateToGroup(
144         java.lang.String uuid, long userId, java.lang.String templateId,
145         boolean autoTemplateId, long groupId, java.lang.String structureId,
146         java.lang.String name, java.lang.String description,
147         java.lang.String xsl, boolean formatXsl, java.lang.String langType,
148         boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
149         java.io.File smallFile, java.lang.Boolean addCommunityPermissions,
150         java.lang.Boolean addGuestPermissions,
151         java.lang.String[] communityPermissions,
152         java.lang.String[] guestPermissions)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException;
155 
156     public void addTemplateResources(long groupId, java.lang.String templateId,
157         boolean addCommunityPermissions, boolean addGuestPermissions)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException;
160 
161     public void addTemplateResources(
162         com.liferay.portlet.journal.model.JournalTemplate template,
163         boolean addCommunityPermissions, boolean addGuestPermissions)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException;
166 
167     public void addTemplateResources(long groupId, java.lang.String templateId,
168         java.lang.String[] communityPermissions,
169         java.lang.String[] guestPermissions)
170         throws com.liferay.portal.PortalException,
171             com.liferay.portal.SystemException;
172 
173     public void addTemplateResources(
174         com.liferay.portlet.journal.model.JournalTemplate template,
175         java.lang.String[] communityPermissions,
176         java.lang.String[] guestPermissions)
177         throws com.liferay.portal.PortalException,
178             com.liferay.portal.SystemException;
179 
180     public void checkNewLine(long groupId, java.lang.String templateId)
181         throws com.liferay.portal.PortalException,
182             com.liferay.portal.SystemException;
183 
184     public com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
185         long userId, long groupId, java.lang.String oldTemplateId,
186         java.lang.String newTemplateId, boolean autoTemplateId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException;
189 
190     public void deleteTemplate(long groupId, java.lang.String templateId)
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException;
193 
194     public void deleteTemplate(
195         com.liferay.portlet.journal.model.JournalTemplate template)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException;
198 
199     public void deleteTemplates(long groupId)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException;
202 
203     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
205         long groupId, java.lang.String structureId)
206         throws com.liferay.portal.SystemException;
207 
208     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
210         long groupId, java.lang.String structureId, int start, int end)
211         throws com.liferay.portal.SystemException;
212 
213     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214     public int getStructureTemplatesCount(long groupId,
215         java.lang.String structureId) throws com.liferay.portal.SystemException;
216 
217     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218     public com.liferay.portlet.journal.model.JournalTemplate getTemplate(
219         long id)
220         throws com.liferay.portal.PortalException,
221             com.liferay.portal.SystemException;
222 
223     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224     public com.liferay.portlet.journal.model.JournalTemplate getTemplate(
225         long groupId, java.lang.String templateId)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public com.liferay.portlet.journal.model.JournalTemplate getTemplateBySmallImageId(
231         long smallImageId)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException;
234 
235     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates()
237         throws com.liferay.portal.SystemException;
238 
239     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
241         long groupId) throws com.liferay.portal.SystemException;
242 
243     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getTemplates(
245         long groupId, int start, int end)
246         throws com.liferay.portal.SystemException;
247 
248     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249     public int getTemplatesCount(long groupId)
250         throws com.liferay.portal.SystemException;
251 
252     public boolean hasTemplate(long groupId, java.lang.String templateId)
253         throws com.liferay.portal.SystemException;
254 
255     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
257         long companyId, long groupId, java.lang.String keywords,
258         java.lang.String structureId, java.lang.String structureIdComparator,
259         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
260         throws com.liferay.portal.SystemException;
261 
262     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
264         long companyId, long groupId, java.lang.String templateId,
265         java.lang.String structureId, java.lang.String structureIdComparator,
266         java.lang.String name, java.lang.String description,
267         boolean andOperator, int start, int end,
268         com.liferay.portal.kernel.util.OrderByComparator obc)
269         throws com.liferay.portal.SystemException;
270 
271     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272     public int searchCount(long companyId, long groupId,
273         java.lang.String keywords, java.lang.String structureId,
274         java.lang.String structureIdComparator)
275         throws com.liferay.portal.SystemException;
276 
277     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278     public int searchCount(long companyId, long groupId,
279         java.lang.String templateId, java.lang.String structureId,
280         java.lang.String structureIdComparator, java.lang.String name,
281         java.lang.String description, boolean andOperator)
282         throws com.liferay.portal.SystemException;
283 
284     public com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
285         long groupId, java.lang.String templateId,
286         java.lang.String structureId, java.lang.String name,
287         java.lang.String description, java.lang.String xsl, boolean formatXsl,
288         java.lang.String langType, boolean cacheable, boolean smallImage,
289         java.lang.String smallImageURL, java.io.File smallFile)
290         throws com.liferay.portal.PortalException,
291             com.liferay.portal.SystemException;
292 }