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