001
014
015 package com.liferay.portlet.wiki.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class WikiPageServiceUtil {
035
040 public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
041 java.lang.String title, java.lang.String content,
042 java.lang.String summary, boolean minorEdit,
043 com.liferay.portal.service.ServiceContext serviceContext)
044 throws com.liferay.portal.kernel.exception.PortalException,
045 com.liferay.portal.kernel.exception.SystemException {
046 return getService()
047 .addPage(nodeId, title, content, summary, minorEdit,
048 serviceContext);
049 }
050
051 public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
052 java.lang.String title, java.lang.String content,
053 java.lang.String summary, boolean minorEdit, java.lang.String format,
054 java.lang.String parentTitle, java.lang.String redirectTitle,
055 com.liferay.portal.service.ServiceContext serviceContext)
056 throws com.liferay.portal.kernel.exception.PortalException,
057 com.liferay.portal.kernel.exception.SystemException {
058 return getService()
059 .addPage(nodeId, title, content, summary, minorEdit, format,
060 parentTitle, redirectTitle, serviceContext);
061 }
062
063 public static void addPageAttachments(long nodeId, java.lang.String title,
064 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files)
065 throws com.liferay.portal.kernel.exception.PortalException,
066 com.liferay.portal.kernel.exception.SystemException {
067 getService().addPageAttachments(nodeId, title, files);
068 }
069
070 public static void changeParent(long nodeId, java.lang.String title,
071 java.lang.String newParentTitle,
072 com.liferay.portal.service.ServiceContext serviceContext)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().changeParent(nodeId, title, newParentTitle, serviceContext);
076 }
077
078 public static void deletePage(long nodeId, java.lang.String title)
079 throws com.liferay.portal.kernel.exception.PortalException,
080 com.liferay.portal.kernel.exception.SystemException {
081 getService().deletePage(nodeId, title);
082 }
083
084 public static void deletePage(long nodeId, java.lang.String title,
085 double version)
086 throws com.liferay.portal.kernel.exception.PortalException,
087 com.liferay.portal.kernel.exception.SystemException {
088 getService().deletePage(nodeId, title, version);
089 }
090
091 public static void deletePageAttachment(long nodeId,
092 java.lang.String title, java.lang.String fileName)
093 throws com.liferay.portal.kernel.exception.PortalException,
094 com.liferay.portal.kernel.exception.SystemException {
095 getService().deletePageAttachment(nodeId, title, fileName);
096 }
097
098 public static com.liferay.portlet.wiki.model.WikiPage getDraftPage(
099 long nodeId, java.lang.String title)
100 throws com.liferay.portal.kernel.exception.PortalException,
101 com.liferay.portal.kernel.exception.SystemException {
102 return getService().getDraftPage(nodeId, title);
103 }
104
105 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
106 long nodeId, int max)
107 throws com.liferay.portal.kernel.exception.PortalException,
108 com.liferay.portal.kernel.exception.SystemException {
109 return getService().getNodePages(nodeId, max);
110 }
111
112 public static java.lang.String getNodePagesRSS(long nodeId, int max,
113 java.lang.String type, double version, java.lang.String displayStyle,
114 java.lang.String feedURL, java.lang.String entryURL)
115 throws com.liferay.portal.kernel.exception.PortalException,
116 com.liferay.portal.kernel.exception.SystemException {
117 return getService()
118 .getNodePagesRSS(nodeId, max, type, version, displayStyle,
119 feedURL, entryURL);
120 }
121
122 public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
123 java.lang.String title)
124 throws com.liferay.portal.kernel.exception.PortalException,
125 com.liferay.portal.kernel.exception.SystemException {
126 return getService().getPage(nodeId, title);
127 }
128
129 public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
130 java.lang.String title, java.lang.Boolean head)
131 throws com.liferay.portal.kernel.exception.PortalException,
132 com.liferay.portal.kernel.exception.SystemException {
133 return getService().getPage(nodeId, title, head);
134 }
135
136 public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
137 java.lang.String title, double version)
138 throws com.liferay.portal.kernel.exception.PortalException,
139 com.liferay.portal.kernel.exception.SystemException {
140 return getService().getPage(nodeId, title, version);
141 }
142
143 public static java.lang.String getPagesRSS(long companyId, long nodeId,
144 java.lang.String title, int max, java.lang.String type, double version,
145 java.lang.String displayStyle, java.lang.String feedURL,
146 java.lang.String entryURL, java.util.Locale locale)
147 throws com.liferay.portal.kernel.exception.PortalException,
148 com.liferay.portal.kernel.exception.SystemException {
149 return getService()
150 .getPagesRSS(companyId, nodeId, title, max, type, version,
151 displayStyle, feedURL, entryURL, locale);
152 }
153
154 public static void movePage(long nodeId, java.lang.String title,
155 java.lang.String newTitle,
156 com.liferay.portal.service.ServiceContext serviceContext)
157 throws com.liferay.portal.kernel.exception.PortalException,
158 com.liferay.portal.kernel.exception.SystemException {
159 getService().movePage(nodeId, title, newTitle, serviceContext);
160 }
161
162 public static com.liferay.portlet.wiki.model.WikiPage revertPage(
163 long nodeId, java.lang.String title, double version,
164 com.liferay.portal.service.ServiceContext serviceContext)
165 throws com.liferay.portal.kernel.exception.PortalException,
166 com.liferay.portal.kernel.exception.SystemException {
167 return getService().revertPage(nodeId, title, version, serviceContext);
168 }
169
170 public static void subscribePage(long nodeId, java.lang.String title)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 getService().subscribePage(nodeId, title);
174 }
175
176 public static void unsubscribePage(long nodeId, java.lang.String title)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException {
179 getService().unsubscribePage(nodeId, title);
180 }
181
182 public static com.liferay.portlet.wiki.model.WikiPage updatePage(
183 long nodeId, java.lang.String title, double version,
184 java.lang.String content, java.lang.String summary, boolean minorEdit,
185 java.lang.String format, java.lang.String parentTitle,
186 java.lang.String redirectTitle,
187 com.liferay.portal.service.ServiceContext serviceContext)
188 throws com.liferay.portal.kernel.exception.PortalException,
189 com.liferay.portal.kernel.exception.SystemException {
190 return getService()
191 .updatePage(nodeId, title, version, content, summary,
192 minorEdit, format, parentTitle, redirectTitle, serviceContext);
193 }
194
195 public static WikiPageService getService() {
196 if (_service == null) {
197 _service = (WikiPageService)PortalBeanLocatorUtil.locate(WikiPageService.class.getName());
198
199 ReferenceRegistry.registerReference(WikiPageServiceUtil.class,
200 "_service");
201 MethodCache.remove(WikiPageService.class);
202 }
203
204 return _service;
205 }
206
207 public void setService(WikiPageService service) {
208 MethodCache.remove(WikiPageService.class);
209
210 _service = service;
211
212 ReferenceRegistry.registerReference(WikiPageServiceUtil.class,
213 "_service");
214 MethodCache.remove(WikiPageService.class);
215 }
216
217 private static WikiPageService _service;
218 }