1
22
23 package com.liferay.portlet.wiki.service.http;
24
25 import com.liferay.portal.kernel.json.JSONArray;
26 import com.liferay.portal.kernel.json.JSONObject;
27
28 import com.liferay.portlet.wiki.service.WikiPageServiceUtil;
29
30
76 public class WikiPageServiceJSON {
77 public static void addPageAttachments(long nodeId, java.lang.String title,
78 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files)
79 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
80 com.liferay.portal.SystemException {
81 WikiPageServiceUtil.addPageAttachments(nodeId, title, files);
82 }
83
84 public static void deletePage(long nodeId, java.lang.String title)
85 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
86 com.liferay.portal.SystemException {
87 WikiPageServiceUtil.deletePage(nodeId, title);
88 }
89
90 public static void deletePageAttachment(long nodeId,
91 java.lang.String title, java.lang.String fileName)
92 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
93 com.liferay.portal.SystemException {
94 WikiPageServiceUtil.deletePageAttachment(nodeId, title, fileName);
95 }
96
97 public static JSONArray getNodePages(long nodeId, int max)
98 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
99 com.liferay.portal.SystemException {
100 java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getNodePages(nodeId,
101 max);
102
103 return WikiPageJSONSerializer.toJSONArray(returnValue);
104 }
105
106 public static java.lang.String getNodePagesRSS(long nodeId, int max,
107 java.lang.String type, double version, java.lang.String displayStyle,
108 java.lang.String feedURL, java.lang.String entryURL)
109 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
110 com.liferay.portal.SystemException {
111 java.lang.String returnValue = WikiPageServiceUtil.getNodePagesRSS(nodeId,
112 max, type, version, displayStyle, feedURL, entryURL);
113
114 return returnValue;
115 }
116
117 public static JSONObject getPage(long nodeId, java.lang.String title)
118 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
119 com.liferay.portal.SystemException {
120 com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
121 title);
122
123 return WikiPageJSONSerializer.toJSONObject(returnValue);
124 }
125
126 public static JSONObject getPage(long nodeId, java.lang.String title,
127 double version)
128 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
129 com.liferay.portal.SystemException {
130 com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
131 title, version);
132
133 return WikiPageJSONSerializer.toJSONObject(returnValue);
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, String locale)
140 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
141 com.liferay.portal.SystemException {
142 java.lang.String returnValue = WikiPageServiceUtil.getPagesRSS(companyId,
143 nodeId, title, max, type, version, displayStyle, feedURL,
144 entryURL, new java.util.Locale(locale));
145
146 return returnValue;
147 }
148
149 public static void subscribePage(long nodeId, java.lang.String title)
150 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
151 com.liferay.portal.SystemException {
152 WikiPageServiceUtil.subscribePage(nodeId, title);
153 }
154
155 public static void unsubscribePage(long nodeId, java.lang.String title)
156 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
157 com.liferay.portal.SystemException {
158 WikiPageServiceUtil.unsubscribePage(nodeId, title);
159 }
160 }