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.wiki.service;
21  
22  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Isolation;
25  import com.liferay.portal.kernel.annotation.Propagation;
26  import com.liferay.portal.kernel.annotation.Transactional;
27  
28  /**
29   * <a href="WikiPageLocalService.java.html"><b><i>View Source</i></b></a>
30   *
31   * <p>
32   * ServiceBuilder generated this class. Modifications in this class will be
33   * overwritten the next time is generated.
34   * </p>
35   *
36   * <p>
37   * This interface defines the service. The default implementation is
38   * <code>com.liferay.portlet.wiki.service.impl.WikiPageLocalServiceImpl</code>.
39   * Modify methods in that class and rerun ServiceBuilder to populate this class
40   * and all other generated classes.
41   * </p>
42   *
43   * <p>
44   * 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.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.wiki.service.WikiPageLocalServiceUtil
50   *
51   */
52  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
53      PortalException.class, SystemException.class})
54  public interface WikiPageLocalService {
55      public com.liferay.portlet.wiki.model.WikiPage addWikiPage(
56          com.liferay.portlet.wiki.model.WikiPage wikiPage)
57          throws com.liferay.portal.SystemException;
58  
59      public com.liferay.portlet.wiki.model.WikiPage createWikiPage(long pageId);
60  
61      public void deleteWikiPage(long pageId)
62          throws com.liferay.portal.SystemException,
63              com.liferay.portal.PortalException;
64  
65      public void deleteWikiPage(com.liferay.portlet.wiki.model.WikiPage wikiPage)
66          throws com.liferay.portal.SystemException;
67  
68      public java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException;
71  
72      public java.util.List<Object> dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
74          int end) throws com.liferay.portal.SystemException;
75  
76      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
77      public com.liferay.portlet.wiki.model.WikiPage getWikiPage(long pageId)
78          throws com.liferay.portal.SystemException,
79              com.liferay.portal.PortalException;
80  
81      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
82      public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getWikiPages(
83          int start, int end) throws com.liferay.portal.SystemException;
84  
85      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
86      public int getWikiPagesCount() throws com.liferay.portal.SystemException;
87  
88      public com.liferay.portlet.wiki.model.WikiPage updateWikiPage(
89          com.liferay.portlet.wiki.model.WikiPage wikiPage)
90          throws com.liferay.portal.SystemException;
91  
92      public com.liferay.portlet.wiki.model.WikiPage updateWikiPage(
93          com.liferay.portlet.wiki.model.WikiPage wikiPage, boolean merge)
94          throws com.liferay.portal.SystemException;
95  
96      public com.liferay.portlet.wiki.model.WikiPage addPage(long userId,
97          long nodeId, java.lang.String title, java.lang.String content,
98          java.lang.String summary, boolean minorEdit,
99          com.liferay.portal.service.ServiceContext serviceContext)
100         throws com.liferay.portal.PortalException,
101             com.liferay.portal.SystemException;
102 
103     public com.liferay.portlet.wiki.model.WikiPage addPage(
104         java.lang.String uuid, long userId, long nodeId,
105         java.lang.String title, double version, java.lang.String content,
106         java.lang.String summary, boolean minorEdit, java.lang.String format,
107         boolean head, java.lang.String parentTitle,
108         java.lang.String redirectTitle,
109         com.liferay.portal.service.ServiceContext serviceContext)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException;
112 
113     public void addPageAttachments(long nodeId, java.lang.String title,
114         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException;
117 
118     public void addPageResources(long nodeId, java.lang.String title,
119         boolean addCommunityPermissions, boolean addGuestPermissions)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException;
122 
123     public void addPageResources(com.liferay.portlet.wiki.model.WikiPage page,
124         boolean addCommunityPermissions, boolean addGuestPermissions)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException;
127 
128     public void addPageResources(long nodeId, java.lang.String title,
129         java.lang.String[] communityPermissions,
130         java.lang.String[] guestPermissions)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException;
133 
134     public void addPageResources(com.liferay.portlet.wiki.model.WikiPage page,
135         java.lang.String[] communityPermissions,
136         java.lang.String[] guestPermissions)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException;
139 
140     public void changeParent(long userId, long nodeId, java.lang.String title,
141         java.lang.String newParentTitle,
142         com.liferay.portal.service.ServiceContext serviceContext)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException;
145 
146     public void deletePage(long nodeId, java.lang.String title)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException;
149 
150     public void deletePage(com.liferay.portlet.wiki.model.WikiPage page)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException;
153 
154     public void deletePageAttachment(long nodeId, java.lang.String title,
155         java.lang.String fileName)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException;
158 
159     public void deletePages(long nodeId)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException;
162 
163     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getChildren(
165         long nodeId, boolean head, java.lang.String parentTitle)
166         throws com.liferay.portal.SystemException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getIncomingLinks(
170         long nodeId, java.lang.String title)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException;
173 
174     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNoAssetPages()
176         throws com.liferay.portal.SystemException;
177 
178     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOrphans(
180         long nodeId)
181         throws com.liferay.portal.PortalException,
182             com.liferay.portal.SystemException;
183 
184     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOutgoingLinks(
186         long nodeId, java.lang.String title)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException;
189 
190     public com.liferay.portlet.wiki.model.WikiPage getPage(long resourcePrimKey)
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException;
193 
194     public com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
195         java.lang.String title)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException;
198 
199     public com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
200         java.lang.String title, double version)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException;
203 
204     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205     public com.liferay.portlet.wiki.model.WikiPageDisplay getPageDisplay(
206         long nodeId, java.lang.String title,
207         javax.portlet.PortletURL viewPageURL,
208         javax.portlet.PortletURL editPageURL,
209         java.lang.String attachmentURLPrefix)
210         throws com.liferay.portal.PortalException,
211             com.liferay.portal.SystemException;
212 
213     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
215         long nodeId, int start, int end)
216         throws com.liferay.portal.SystemException;
217 
218     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
220         java.lang.String format) throws com.liferay.portal.SystemException;
221 
222     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
224         long nodeId, java.lang.String title, int start, int end)
225         throws com.liferay.portal.SystemException;
226 
227     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
229         long nodeId, java.lang.String title, int start, int end,
230         com.liferay.portal.kernel.util.OrderByComparator obc)
231         throws com.liferay.portal.SystemException;
232 
233     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
235         long nodeId, boolean head, int start, int end)
236         throws com.liferay.portal.SystemException;
237 
238     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
240         long nodeId, java.lang.String title, boolean head, int start, int end)
241         throws com.liferay.portal.SystemException;
242 
243     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244     public int getPagesCount(long nodeId)
245         throws com.liferay.portal.SystemException;
246 
247     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248     public int getPagesCount(long nodeId, java.lang.String title)
249         throws com.liferay.portal.SystemException;
250 
251     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252     public int getPagesCount(long nodeId, boolean head)
253         throws com.liferay.portal.SystemException;
254 
255     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256     public int getPagesCount(long nodeId, java.lang.String title, boolean head)
257         throws com.liferay.portal.SystemException;
258 
259     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
260     public int getPagesCount(java.lang.String format)
261         throws com.liferay.portal.SystemException;
262 
263     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getRecentChanges(
265         long nodeId, int start, int end)
266         throws com.liferay.portal.SystemException;
267 
268     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269     public int getRecentChangesCount(long nodeId)
270         throws com.liferay.portal.SystemException;
271 
272     public void movePage(long userId, long nodeId, java.lang.String title,
273         java.lang.String newTitle,
274         com.liferay.portal.service.ServiceContext serviceContext)
275         throws com.liferay.portal.PortalException,
276             com.liferay.portal.SystemException;
277 
278     public void movePage(long userId, long nodeId, java.lang.String title,
279         java.lang.String newTitle, boolean strict,
280         com.liferay.portal.service.ServiceContext serviceContext)
281         throws com.liferay.portal.PortalException,
282             com.liferay.portal.SystemException;
283 
284     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285     public void reIndex(long resourcePrimKey)
286         throws com.liferay.portal.SystemException;
287 
288     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289     public void reIndex(com.liferay.portlet.wiki.model.WikiPage page)
290         throws com.liferay.portal.SystemException;
291 
292     public com.liferay.portlet.wiki.model.WikiPage revertPage(long userId,
293         long nodeId, java.lang.String title, double version,
294         com.liferay.portal.service.ServiceContext serviceContext)
295         throws com.liferay.portal.PortalException,
296             com.liferay.portal.SystemException;
297 
298     public void subscribePage(long userId, long nodeId, java.lang.String title)
299         throws com.liferay.portal.PortalException,
300             com.liferay.portal.SystemException;
301 
302     public void unsubscribePage(long userId, long nodeId, java.lang.String title)
303         throws com.liferay.portal.PortalException,
304             com.liferay.portal.SystemException;
305 
306     public com.liferay.portlet.wiki.model.WikiPage updatePage(long userId,
307         long nodeId, java.lang.String title, double version,
308         java.lang.String content, java.lang.String summary, boolean minorEdit,
309         java.lang.String format, java.lang.String parentTitle,
310         java.lang.String redirectTitle,
311         com.liferay.portal.service.ServiceContext serviceContext)
312         throws com.liferay.portal.PortalException,
313             com.liferay.portal.SystemException;
314 
315     public void updateTagsAsset(long userId,
316         com.liferay.portlet.wiki.model.WikiPage page,
317         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
318         throws com.liferay.portal.PortalException,
319             com.liferay.portal.SystemException;
320 
321     public void validateTitle(java.lang.String title)
322         throws com.liferay.portal.PortalException;
323 }