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 WikiPageServiceUtil {
42 public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
43 java.lang.String title, java.lang.String content,
44 java.lang.String summary, boolean minorEdit,
45 com.liferay.portal.service.ServiceContext serviceContext)
46 throws com.liferay.portal.PortalException,
47 com.liferay.portal.SystemException {
48 return getService()
49 .addPage(nodeId, title, content, summary, minorEdit,
50 serviceContext);
51 }
52
53 public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
54 java.lang.String title, java.lang.String content,
55 java.lang.String summary, boolean minorEdit, java.lang.String format,
56 java.lang.String parentTitle, java.lang.String redirectTitle,
57 com.liferay.portal.service.ServiceContext serviceContext)
58 throws com.liferay.portal.PortalException,
59 com.liferay.portal.SystemException {
60 return getService()
61 .addPage(nodeId, title, content, summary, minorEdit, format,
62 parentTitle, redirectTitle, serviceContext);
63 }
64
65 public static void addPageAttachments(long nodeId, java.lang.String title,
66 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files)
67 throws com.liferay.portal.PortalException,
68 com.liferay.portal.SystemException {
69 getService().addPageAttachments(nodeId, title, files);
70 }
71
72 public static void changeParent(long nodeId, java.lang.String title,
73 java.lang.String newParentTitle,
74 com.liferay.portal.service.ServiceContext serviceContext)
75 throws com.liferay.portal.PortalException,
76 com.liferay.portal.SystemException {
77 getService().changeParent(nodeId, title, newParentTitle, serviceContext);
78 }
79
80 public static void deletePage(long nodeId, java.lang.String title)
81 throws com.liferay.portal.PortalException,
82 com.liferay.portal.SystemException {
83 getService().deletePage(nodeId, title);
84 }
85
86 public static void deletePageAttachment(long nodeId,
87 java.lang.String title, java.lang.String fileName)
88 throws com.liferay.portal.PortalException,
89 com.liferay.portal.SystemException {
90 getService().deletePageAttachment(nodeId, title, fileName);
91 }
92
93 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
94 long nodeId, int max)
95 throws com.liferay.portal.PortalException,
96 com.liferay.portal.SystemException {
97 return getService().getNodePages(nodeId, max);
98 }
99
100 public static java.lang.String getNodePagesRSS(long nodeId, int max,
101 java.lang.String type, double version, java.lang.String displayStyle,
102 java.lang.String feedURL, java.lang.String entryURL)
103 throws com.liferay.portal.PortalException,
104 com.liferay.portal.SystemException {
105 return getService()
106 .getNodePagesRSS(nodeId, max, type, version, displayStyle,
107 feedURL, entryURL);
108 }
109
110 public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
111 java.lang.String title)
112 throws com.liferay.portal.PortalException,
113 com.liferay.portal.SystemException {
114 return getService().getPage(nodeId, title);
115 }
116
117 public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
118 java.lang.String title, double version)
119 throws com.liferay.portal.PortalException,
120 com.liferay.portal.SystemException {
121 return getService().getPage(nodeId, title, version);
122 }
123
124 public static java.lang.String getPagesRSS(long companyId, long nodeId,
125 java.lang.String title, int max, java.lang.String type, double version,
126 java.lang.String displayStyle, java.lang.String feedURL,
127 java.lang.String entryURL, java.util.Locale locale)
128 throws com.liferay.portal.PortalException,
129 com.liferay.portal.SystemException {
130 return getService()
131 .getPagesRSS(companyId, nodeId, title, max, type, version,
132 displayStyle, feedURL, entryURL, locale);
133 }
134
135 public static void movePage(long nodeId, java.lang.String title,
136 java.lang.String newTitle,
137 com.liferay.portal.service.ServiceContext serviceContext)
138 throws com.liferay.portal.PortalException,
139 com.liferay.portal.SystemException {
140 getService().movePage(nodeId, title, newTitle, serviceContext);
141 }
142
143 public static com.liferay.portlet.wiki.model.WikiPage revertPage(
144 long nodeId, java.lang.String title, double version,
145 com.liferay.portal.service.ServiceContext serviceContext)
146 throws com.liferay.portal.PortalException,
147 com.liferay.portal.SystemException {
148 return getService().revertPage(nodeId, title, version, serviceContext);
149 }
150
151 public static void subscribePage(long nodeId, java.lang.String title)
152 throws com.liferay.portal.PortalException,
153 com.liferay.portal.SystemException {
154 getService().subscribePage(nodeId, title);
155 }
156
157 public static void unsubscribePage(long nodeId, java.lang.String title)
158 throws com.liferay.portal.PortalException,
159 com.liferay.portal.SystemException {
160 getService().unsubscribePage(nodeId, title);
161 }
162
163 public static com.liferay.portlet.wiki.model.WikiPage updatePage(
164 long nodeId, java.lang.String title, double version,
165 java.lang.String content, java.lang.String summary, boolean minorEdit,
166 java.lang.String format, java.lang.String parentTitle,
167 java.lang.String redirectTitle,
168 com.liferay.portal.service.ServiceContext serviceContext)
169 throws com.liferay.portal.PortalException,
170 com.liferay.portal.SystemException {
171 return getService()
172 .updatePage(nodeId, title, version, content, summary,
173 minorEdit, format, parentTitle, redirectTitle, serviceContext);
174 }
175
176 public static WikiPageService getService() {
177 if (_service == null) {
178 _service = (WikiPageService)PortalBeanLocatorUtil.locate(WikiPageService.class.getName());
179
180 ReferenceRegistry.registerReference(WikiPageServiceUtil.class,
181 "_service");
182 MethodCache.remove(WikiPageService.class);
183 }
184
185 return _service;
186 }
187
188 public void setService(WikiPageService service) {
189 MethodCache.remove(WikiPageService.class);
190
191 _service = service;
192
193 ReferenceRegistry.registerReference(WikiPageServiceUtil.class,
194 "_service");
195 MethodCache.remove(WikiPageService.class);
196 }
197
198 private static WikiPageService _service;
199 }