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