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          javax.portlet.PortletPreferences prefs,
100         com.liferay.portal.theme.ThemeDisplay themeDisplay)
101         throws com.liferay.portal.PortalException,
102             com.liferay.portal.SystemException;
103 
104     public com.liferay.portlet.wiki.model.WikiPage addPage(
105         java.lang.String uuid, long userId, long nodeId,
106         java.lang.String title, double version, java.lang.String content,
107         java.lang.String summary, boolean minorEdit, java.lang.String format,
108         boolean head, java.lang.String parentTitle,
109         java.lang.String redirectTitle, java.lang.String[] tagsEntries,
110         javax.portlet.PortletPreferences prefs,
111         com.liferay.portal.theme.ThemeDisplay themeDisplay)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException;
114 
115     public void addPageAttachments(long nodeId, java.lang.String title,
116         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException;
119 
120     public void addPageResources(long nodeId, java.lang.String title,
121         boolean addCommunityPermissions, boolean addGuestPermissions)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException;
124 
125     public void addPageResources(com.liferay.portlet.wiki.model.WikiPage page,
126         boolean addCommunityPermissions, boolean addGuestPermissions)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException;
129 
130     public void addPageResources(long nodeId, java.lang.String title,
131         java.lang.String[] communityPermissions,
132         java.lang.String[] guestPermissions)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException;
135 
136     public void addPageResources(com.liferay.portlet.wiki.model.WikiPage page,
137         java.lang.String[] communityPermissions,
138         java.lang.String[] guestPermissions)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException;
141 
142     public void changeParent(long userId, long nodeId, java.lang.String title,
143         java.lang.String newParentTitle,
144         javax.portlet.PortletPreferences prefs,
145         com.liferay.portal.theme.ThemeDisplay themeDisplay)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException;
148 
149     public void deletePage(long nodeId, java.lang.String title)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException;
152 
153     public void deletePage(com.liferay.portlet.wiki.model.WikiPage page)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException;
156 
157     public void deletePageAttachment(long nodeId, java.lang.String title,
158         java.lang.String fileName)
159         throws com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException;
161 
162     public void deletePages(long nodeId)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException;
165 
166     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getChildren(
168         long nodeId, boolean head, java.lang.String parentTitle)
169         throws com.liferay.portal.SystemException;
170 
171     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getIncomingLinks(
173         long nodeId, java.lang.String title)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException;
176 
177     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNoAssetPages()
179         throws com.liferay.portal.SystemException;
180 
181     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOrphans(
183         long nodeId)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException;
186 
187     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOutgoingLinks(
189         long nodeId, java.lang.String title)
190         throws com.liferay.portal.PortalException,
191             com.liferay.portal.SystemException;
192 
193     public com.liferay.portlet.wiki.model.WikiPage getPage(long resourcePrimKey)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException;
196 
197     public com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
198         java.lang.String title)
199         throws com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException;
201 
202     public com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
203         java.lang.String title, double version)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException;
206 
207     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208     public com.liferay.portlet.wiki.model.WikiPageDisplay getPageDisplay(
209         long nodeId, java.lang.String title,
210         javax.portlet.PortletURL viewPageURL,
211         javax.portlet.PortletURL editPageURL,
212         java.lang.String attachmentURLPrefix)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException;
215 
216     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
218         long nodeId, int start, int end)
219         throws com.liferay.portal.SystemException;
220 
221     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
223         java.lang.String format) throws com.liferay.portal.SystemException;
224 
225     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
227         long nodeId, java.lang.String title, int start, int end)
228         throws com.liferay.portal.SystemException;
229 
230     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
232         long nodeId, java.lang.String title, int start, int end,
233         com.liferay.portal.kernel.util.OrderByComparator obc)
234         throws com.liferay.portal.SystemException;
235 
236     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
238         long nodeId, boolean head, int start, int end)
239         throws com.liferay.portal.SystemException;
240 
241     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
243         long nodeId, java.lang.String title, boolean head, int start, int end)
244         throws com.liferay.portal.SystemException;
245 
246     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
247     public int getPagesCount(long nodeId)
248         throws com.liferay.portal.SystemException;
249 
250     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251     public int getPagesCount(long nodeId, java.lang.String title)
252         throws com.liferay.portal.SystemException;
253 
254     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255     public int getPagesCount(long nodeId, boolean head)
256         throws com.liferay.portal.SystemException;
257 
258     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259     public int getPagesCount(long nodeId, java.lang.String title, boolean head)
260         throws com.liferay.portal.SystemException;
261 
262     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263     public int getPagesCount(java.lang.String format)
264         throws com.liferay.portal.SystemException;
265 
266     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267     public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getRecentChanges(
268         long nodeId, int start, int end)
269         throws com.liferay.portal.SystemException;
270 
271     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272     public int getRecentChangesCount(long nodeId)
273         throws com.liferay.portal.SystemException;
274 
275     public void movePage(long userId, long nodeId, java.lang.String title,
276         java.lang.String newTitle, javax.portlet.PortletPreferences prefs,
277         com.liferay.portal.theme.ThemeDisplay themeDisplay)
278         throws com.liferay.portal.PortalException,
279             com.liferay.portal.SystemException;
280 
281     public void movePage(long userId, long nodeId, java.lang.String title,
282         java.lang.String newTitle, boolean strict,
283         javax.portlet.PortletPreferences prefs,
284         com.liferay.portal.theme.ThemeDisplay themeDisplay)
285         throws com.liferay.portal.PortalException,
286             com.liferay.portal.SystemException;
287 
288     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289     public void reIndex(long resourcePrimKey)
290         throws com.liferay.portal.SystemException;
291 
292     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293     public void reIndex(com.liferay.portlet.wiki.model.WikiPage page)
294         throws com.liferay.portal.SystemException;
295 
296     public com.liferay.portlet.wiki.model.WikiPage revertPage(long userId,
297         long nodeId, java.lang.String title, double version,
298         javax.portlet.PortletPreferences prefs,
299         com.liferay.portal.theme.ThemeDisplay themeDisplay)
300         throws com.liferay.portal.PortalException,
301             com.liferay.portal.SystemException;
302 
303     public void subscribePage(long userId, long nodeId, java.lang.String title)
304         throws com.liferay.portal.PortalException,
305             com.liferay.portal.SystemException;
306 
307     public void unsubscribePage(long userId, long nodeId, java.lang.String title)
308         throws com.liferay.portal.PortalException,
309             com.liferay.portal.SystemException;
310 
311     public com.liferay.portlet.wiki.model.WikiPage updatePage(long userId,
312         long nodeId, java.lang.String title, double version,
313         java.lang.String content, java.lang.String summary, boolean minorEdit,
314         java.lang.String format, java.lang.String parentTitle,
315         java.lang.String redirectTitle, java.lang.String[] tagsEntries,
316         javax.portlet.PortletPreferences prefs,
317         com.liferay.portal.theme.ThemeDisplay themeDisplay)
318         throws com.liferay.portal.PortalException,
319             com.liferay.portal.SystemException;
320 
321     public void updateTagsAsset(long userId,
322         com.liferay.portlet.wiki.model.WikiPage page,
323         java.lang.String[] tagsEntries)
324         throws com.liferay.portal.PortalException,
325             com.liferay.portal.SystemException;
326 
327     public void validateTitle(java.lang.String title)
328         throws com.liferay.portal.PortalException;
329 }