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