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