1
14
15 package com.liferay.portlet.wiki.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class WikiPageLocalServiceUtil {
42 public static com.liferay.portlet.wiki.model.WikiPage addWikiPage(
43 com.liferay.portlet.wiki.model.WikiPage wikiPage)
44 throws com.liferay.portal.SystemException {
45 return getService().addWikiPage(wikiPage);
46 }
47
48 public static com.liferay.portlet.wiki.model.WikiPage createWikiPage(
49 long pageId) {
50 return getService().createWikiPage(pageId);
51 }
52
53 public static void deleteWikiPage(long pageId)
54 throws com.liferay.portal.PortalException,
55 com.liferay.portal.SystemException {
56 getService().deleteWikiPage(pageId);
57 }
58
59 public static void deleteWikiPage(
60 com.liferay.portlet.wiki.model.WikiPage wikiPage)
61 throws com.liferay.portal.SystemException {
62 getService().deleteWikiPage(wikiPage);
63 }
64
65 @SuppressWarnings("rawtypes")
66 public static java.util.List dynamicQuery(
67 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68 throws com.liferay.portal.SystemException {
69 return getService().dynamicQuery(dynamicQuery);
70 }
71
72 @SuppressWarnings("rawtypes")
73 public static java.util.List dynamicQuery(
74 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75 int end) throws com.liferay.portal.SystemException {
76 return getService().dynamicQuery(dynamicQuery, start, end);
77 }
78
79 @SuppressWarnings("rawtypes")
80 public static java.util.List dynamicQuery(
81 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82 int end,
83 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84 throws com.liferay.portal.SystemException {
85 return getService()
86 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87 }
88
89 public static int dynamicQueryCount(
90 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91 throws com.liferay.portal.SystemException {
92 return getService().dynamicQueryCount(dynamicQuery);
93 }
94
95 public static com.liferay.portlet.wiki.model.WikiPage getWikiPage(
96 long pageId)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 return getService().getWikiPage(pageId);
100 }
101
102 public static com.liferay.portlet.wiki.model.WikiPage getWikiPageByUuidAndGroupId(
103 java.lang.String uuid, long groupId)
104 throws com.liferay.portal.PortalException,
105 com.liferay.portal.SystemException {
106 return getService().getWikiPageByUuidAndGroupId(uuid, groupId);
107 }
108
109 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getWikiPages(
110 int start, int end) throws com.liferay.portal.SystemException {
111 return getService().getWikiPages(start, end);
112 }
113
114 public static int getWikiPagesCount()
115 throws com.liferay.portal.SystemException {
116 return getService().getWikiPagesCount();
117 }
118
119 public static com.liferay.portlet.wiki.model.WikiPage updateWikiPage(
120 com.liferay.portlet.wiki.model.WikiPage wikiPage)
121 throws com.liferay.portal.SystemException {
122 return getService().updateWikiPage(wikiPage);
123 }
124
125 public static com.liferay.portlet.wiki.model.WikiPage updateWikiPage(
126 com.liferay.portlet.wiki.model.WikiPage wikiPage, boolean merge)
127 throws com.liferay.portal.SystemException {
128 return getService().updateWikiPage(wikiPage, merge);
129 }
130
131 public static com.liferay.portlet.wiki.model.WikiPage addPage(long userId,
132 long nodeId, java.lang.String title, java.lang.String content,
133 java.lang.String summary, boolean minorEdit,
134 com.liferay.portal.service.ServiceContext serviceContext)
135 throws com.liferay.portal.PortalException,
136 com.liferay.portal.SystemException {
137 return getService()
138 .addPage(userId, nodeId, title, content, summary, minorEdit,
139 serviceContext);
140 }
141
142 public static com.liferay.portlet.wiki.model.WikiPage addPage(
143 java.lang.String uuid, long userId, long nodeId,
144 java.lang.String title, double version, java.lang.String content,
145 java.lang.String summary, boolean minorEdit, java.lang.String format,
146 boolean head, java.lang.String parentTitle,
147 java.lang.String redirectTitle,
148 com.liferay.portal.service.ServiceContext serviceContext)
149 throws com.liferay.portal.PortalException,
150 com.liferay.portal.SystemException {
151 return getService()
152 .addPage(uuid, userId, nodeId, title, version, content,
153 summary, minorEdit, format, head, parentTitle, redirectTitle,
154 serviceContext);
155 }
156
157 public static void addPageAttachments(long nodeId, java.lang.String title,
158 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files)
159 throws com.liferay.portal.PortalException,
160 com.liferay.portal.SystemException {
161 getService().addPageAttachments(nodeId, title, files);
162 }
163
164 public static void addPageResources(long nodeId, java.lang.String title,
165 boolean addCommunityPermissions, boolean addGuestPermissions)
166 throws com.liferay.portal.PortalException,
167 com.liferay.portal.SystemException {
168 getService()
169 .addPageResources(nodeId, title, addCommunityPermissions,
170 addGuestPermissions);
171 }
172
173 public static void addPageResources(
174 com.liferay.portlet.wiki.model.WikiPage page,
175 boolean addCommunityPermissions, boolean addGuestPermissions)
176 throws com.liferay.portal.PortalException,
177 com.liferay.portal.SystemException {
178 getService()
179 .addPageResources(page, addCommunityPermissions, addGuestPermissions);
180 }
181
182 public static void addPageResources(long nodeId, java.lang.String title,
183 java.lang.String[] communityPermissions,
184 java.lang.String[] guestPermissions)
185 throws com.liferay.portal.PortalException,
186 com.liferay.portal.SystemException {
187 getService()
188 .addPageResources(nodeId, title, communityPermissions,
189 guestPermissions);
190 }
191
192 public static void addPageResources(
193 com.liferay.portlet.wiki.model.WikiPage page,
194 java.lang.String[] communityPermissions,
195 java.lang.String[] guestPermissions)
196 throws com.liferay.portal.PortalException,
197 com.liferay.portal.SystemException {
198 getService()
199 .addPageResources(page, communityPermissions, guestPermissions);
200 }
201
202 public static void changeParent(long userId, long nodeId,
203 java.lang.String title, java.lang.String newParentTitle,
204 com.liferay.portal.service.ServiceContext serviceContext)
205 throws com.liferay.portal.PortalException,
206 com.liferay.portal.SystemException {
207 getService()
208 .changeParent(userId, nodeId, title, newParentTitle, serviceContext);
209 }
210
211 public static void deletePage(long nodeId, java.lang.String title)
212 throws com.liferay.portal.PortalException,
213 com.liferay.portal.SystemException {
214 getService().deletePage(nodeId, title);
215 }
216
217 public static void deletePage(com.liferay.portlet.wiki.model.WikiPage page)
218 throws com.liferay.portal.PortalException,
219 com.liferay.portal.SystemException {
220 getService().deletePage(page);
221 }
222
223 public static void deletePageAttachment(long nodeId,
224 java.lang.String title, java.lang.String fileName)
225 throws com.liferay.portal.PortalException,
226 com.liferay.portal.SystemException {
227 getService().deletePageAttachment(nodeId, title, fileName);
228 }
229
230 public static void deletePages(long nodeId)
231 throws com.liferay.portal.PortalException,
232 com.liferay.portal.SystemException {
233 getService().deletePages(nodeId);
234 }
235
236 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getChildren(
237 long nodeId, boolean head, java.lang.String parentTitle)
238 throws com.liferay.portal.SystemException {
239 return getService().getChildren(nodeId, head, parentTitle);
240 }
241
242 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getIncomingLinks(
243 long nodeId, java.lang.String title)
244 throws com.liferay.portal.PortalException,
245 com.liferay.portal.SystemException {
246 return getService().getIncomingLinks(nodeId, title);
247 }
248
249 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNoAssetPages()
250 throws com.liferay.portal.SystemException {
251 return getService().getNoAssetPages();
252 }
253
254 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOrphans(
255 long nodeId)
256 throws com.liferay.portal.PortalException,
257 com.liferay.portal.SystemException {
258 return getService().getOrphans(nodeId);
259 }
260
261 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOutgoingLinks(
262 long nodeId, java.lang.String title)
263 throws com.liferay.portal.PortalException,
264 com.liferay.portal.SystemException {
265 return getService().getOutgoingLinks(nodeId, title);
266 }
267
268 public static com.liferay.portlet.wiki.model.WikiPage getPage(
269 long resourcePrimKey)
270 throws com.liferay.portal.PortalException,
271 com.liferay.portal.SystemException {
272 return getService().getPage(resourcePrimKey);
273 }
274
275 public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
276 java.lang.String title)
277 throws com.liferay.portal.PortalException,
278 com.liferay.portal.SystemException {
279 return getService().getPage(nodeId, title);
280 }
281
282 public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
283 java.lang.String title, double version)
284 throws com.liferay.portal.PortalException,
285 com.liferay.portal.SystemException {
286 return getService().getPage(nodeId, title, version);
287 }
288
289 public static com.liferay.portlet.wiki.model.WikiPageDisplay getPageDisplay(
290 long nodeId, java.lang.String title,
291 javax.portlet.PortletURL viewPageURL,
292 javax.portlet.PortletURL editPageURL,
293 java.lang.String attachmentURLPrefix)
294 throws com.liferay.portal.PortalException,
295 com.liferay.portal.SystemException {
296 return getService()
297 .getPageDisplay(nodeId, title, viewPageURL, editPageURL,
298 attachmentURLPrefix);
299 }
300
301 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
302 long nodeId, int start, int end)
303 throws com.liferay.portal.SystemException {
304 return getService().getPages(nodeId, start, end);
305 }
306
307 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
308 java.lang.String format) throws com.liferay.portal.SystemException {
309 return getService().getPages(format);
310 }
311
312 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
313 long nodeId, java.lang.String title, int start, int end)
314 throws com.liferay.portal.SystemException {
315 return getService().getPages(nodeId, title, start, end);
316 }
317
318 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
319 long nodeId, java.lang.String title, int start, int end,
320 com.liferay.portal.kernel.util.OrderByComparator obc)
321 throws com.liferay.portal.SystemException {
322 return getService().getPages(nodeId, title, start, end, obc);
323 }
324
325 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
326 long nodeId, boolean head, int start, int end)
327 throws com.liferay.portal.SystemException {
328 return getService().getPages(nodeId, head, start, end);
329 }
330
331 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
332 long nodeId, java.lang.String title, boolean head, int start, int end)
333 throws com.liferay.portal.SystemException {
334 return getService().getPages(nodeId, title, head, start, end);
335 }
336
337 public static int getPagesCount(long nodeId)
338 throws com.liferay.portal.SystemException {
339 return getService().getPagesCount(nodeId);
340 }
341
342 public static int getPagesCount(long nodeId, java.lang.String title)
343 throws com.liferay.portal.SystemException {
344 return getService().getPagesCount(nodeId, title);
345 }
346
347 public static int getPagesCount(long nodeId, boolean head)
348 throws com.liferay.portal.SystemException {
349 return getService().getPagesCount(nodeId, head);
350 }
351
352 public static int getPagesCount(long nodeId, java.lang.String title,
353 boolean head) throws com.liferay.portal.SystemException {
354 return getService().getPagesCount(nodeId, title, head);
355 }
356
357 public static int getPagesCount(java.lang.String format)
358 throws com.liferay.portal.SystemException {
359 return getService().getPagesCount(format);
360 }
361
362 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getRecentChanges(
363 long nodeId, int start, int end)
364 throws com.liferay.portal.SystemException {
365 return getService().getRecentChanges(nodeId, start, end);
366 }
367
368 public static int getRecentChangesCount(long nodeId)
369 throws com.liferay.portal.SystemException {
370 return getService().getRecentChangesCount(nodeId);
371 }
372
373 public static void movePage(long userId, long nodeId,
374 java.lang.String title, java.lang.String newTitle,
375 com.liferay.portal.service.ServiceContext serviceContext)
376 throws com.liferay.portal.PortalException,
377 com.liferay.portal.SystemException {
378 getService().movePage(userId, nodeId, title, newTitle, serviceContext);
379 }
380
381 public static void movePage(long userId, long nodeId,
382 java.lang.String title, java.lang.String newTitle, boolean strict,
383 com.liferay.portal.service.ServiceContext serviceContext)
384 throws com.liferay.portal.PortalException,
385 com.liferay.portal.SystemException {
386 getService()
387 .movePage(userId, nodeId, title, newTitle, strict, serviceContext);
388 }
389
390 public static void reIndex(long resourcePrimKey)
391 throws com.liferay.portal.SystemException {
392 getService().reIndex(resourcePrimKey);
393 }
394
395 public static void reIndex(com.liferay.portlet.wiki.model.WikiPage page)
396 throws com.liferay.portal.SystemException {
397 getService().reIndex(page);
398 }
399
400 public static com.liferay.portlet.wiki.model.WikiPage revertPage(
401 long userId, long nodeId, java.lang.String title, double version,
402 com.liferay.portal.service.ServiceContext serviceContext)
403 throws com.liferay.portal.PortalException,
404 com.liferay.portal.SystemException {
405 return getService()
406 .revertPage(userId, nodeId, title, version, serviceContext);
407 }
408
409 public static void subscribePage(long userId, long nodeId,
410 java.lang.String title)
411 throws com.liferay.portal.PortalException,
412 com.liferay.portal.SystemException {
413 getService().subscribePage(userId, nodeId, title);
414 }
415
416 public static void unsubscribePage(long userId, long nodeId,
417 java.lang.String title)
418 throws com.liferay.portal.PortalException,
419 com.liferay.portal.SystemException {
420 getService().unsubscribePage(userId, nodeId, title);
421 }
422
423 public static com.liferay.portlet.wiki.model.WikiPage updatePage(
424 long userId, long nodeId, java.lang.String title, double version,
425 java.lang.String content, java.lang.String summary, boolean minorEdit,
426 java.lang.String format, java.lang.String parentTitle,
427 java.lang.String redirectTitle,
428 com.liferay.portal.service.ServiceContext serviceContext)
429 throws com.liferay.portal.PortalException,
430 com.liferay.portal.SystemException {
431 return getService()
432 .updatePage(userId, nodeId, title, version, content,
433 summary, minorEdit, format, parentTitle, redirectTitle,
434 serviceContext);
435 }
436
437 public static void updateTagsAsset(long userId,
438 com.liferay.portlet.wiki.model.WikiPage page,
439 java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
440 throws com.liferay.portal.PortalException,
441 com.liferay.portal.SystemException {
442 getService().updateTagsAsset(userId, page, tagsCategories, tagsEntries);
443 }
444
445 public static void validateTitle(java.lang.String title)
446 throws com.liferay.portal.PortalException {
447 getService().validateTitle(title);
448 }
449
450 public static WikiPageLocalService getService() {
451 if (_service == null) {
452 _service = (WikiPageLocalService)PortalBeanLocatorUtil.locate(WikiPageLocalService.class.getName());
453
454 ReferenceRegistry.registerReference(WikiPageLocalServiceUtil.class,
455 "_service");
456 MethodCache.remove(WikiPageLocalService.class);
457 }
458
459 return _service;
460 }
461
462 public void setService(WikiPageLocalService service) {
463 MethodCache.remove(WikiPageLocalService.class);
464
465 _service = service;
466
467 ReferenceRegistry.registerReference(WikiPageLocalServiceUtil.class,
468 "_service");
469 MethodCache.remove(WikiPageLocalService.class);
470 }
471
472 private static WikiPageLocalService _service;
473 }