001
014
015 package com.liferay.portlet.bookmarks.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.ListUtil;
020
021 import com.liferay.portlet.bookmarks.service.BookmarksFolderServiceUtil;
022
023 import java.rmi.RemoteException;
024
025
067 public class BookmarksFolderServiceSoap {
068 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap addFolder(
069 long parentFolderId, java.lang.String name,
070 java.lang.String description,
071 com.liferay.portal.service.ServiceContext serviceContext)
072 throws RemoteException {
073 try {
074 com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.addFolder(parentFolderId,
075 name, description, serviceContext);
076
077 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
078 }
079 catch (Exception e) {
080 _log.error(e, e);
081
082 throw new RemoteException(e.getMessage());
083 }
084 }
085
086 public static void deleteFolder(long folderId) throws RemoteException {
087 try {
088 BookmarksFolderServiceUtil.deleteFolder(folderId);
089 }
090 catch (Exception e) {
091 _log.error(e, e);
092
093 throw new RemoteException(e.getMessage());
094 }
095 }
096
097 public static void deleteFolder(long folderId, boolean includeTrashedEntries)
098 throws RemoteException {
099 try {
100 BookmarksFolderServiceUtil.deleteFolder(folderId,
101 includeTrashedEntries);
102 }
103 catch (Exception e) {
104 _log.error(e, e);
105
106 throw new RemoteException(e.getMessage());
107 }
108 }
109
110 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap getFolder(
111 long folderId) throws RemoteException {
112 try {
113 com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.getFolder(folderId);
114
115 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
116 }
117 catch (Exception e) {
118 _log.error(e, e);
119
120 throw new RemoteException(e.getMessage());
121 }
122 }
123
124 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
125 long groupId) throws RemoteException {
126 try {
127 java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
128 BookmarksFolderServiceUtil.getFolders(groupId);
129
130 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModels(returnValue);
131 }
132 catch (Exception e) {
133 _log.error(e, e);
134
135 throw new RemoteException(e.getMessage());
136 }
137 }
138
139 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
140 long groupId, long parentFolderId) throws RemoteException {
141 try {
142 java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
143 BookmarksFolderServiceUtil.getFolders(groupId, parentFolderId);
144
145 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModels(returnValue);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
155 long groupId, long parentFolderId, int start, int end)
156 throws RemoteException {
157 try {
158 java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
159 BookmarksFolderServiceUtil.getFolders(groupId, parentFolderId,
160 start, end);
161
162 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModels(returnValue);
163 }
164 catch (Exception e) {
165 _log.error(e, e);
166
167 throw new RemoteException(e.getMessage());
168 }
169 }
170
171 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
172 long groupId, long parentFolderId, int status, int start, int end)
173 throws RemoteException {
174 try {
175 java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
176 BookmarksFolderServiceUtil.getFolders(groupId, parentFolderId,
177 status, start, end);
178
179 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModels(returnValue);
180 }
181 catch (Exception e) {
182 _log.error(e, e);
183
184 throw new RemoteException(e.getMessage());
185 }
186 }
187
188 public static int getFoldersAndEntriesCount(long groupId, long folderId)
189 throws RemoteException {
190 try {
191 int returnValue = BookmarksFolderServiceUtil.getFoldersAndEntriesCount(groupId,
192 folderId);
193
194 return returnValue;
195 }
196 catch (Exception e) {
197 _log.error(e, e);
198
199 throw new RemoteException(e.getMessage());
200 }
201 }
202
203 public static int getFoldersAndEntriesCount(long groupId, long folderId,
204 int status) throws RemoteException {
205 try {
206 int returnValue = BookmarksFolderServiceUtil.getFoldersAndEntriesCount(groupId,
207 folderId, status);
208
209 return returnValue;
210 }
211 catch (Exception e) {
212 _log.error(e, e);
213
214 throw new RemoteException(e.getMessage());
215 }
216 }
217
218 public static int getFoldersCount(long groupId, long parentFolderId)
219 throws RemoteException {
220 try {
221 int returnValue = BookmarksFolderServiceUtil.getFoldersCount(groupId,
222 parentFolderId);
223
224 return returnValue;
225 }
226 catch (Exception e) {
227 _log.error(e, e);
228
229 throw new RemoteException(e.getMessage());
230 }
231 }
232
233 public static int getFoldersCount(long groupId, long parentFolderId,
234 int status) throws RemoteException {
235 try {
236 int returnValue = BookmarksFolderServiceUtil.getFoldersCount(groupId,
237 parentFolderId, status);
238
239 return returnValue;
240 }
241 catch (Exception e) {
242 _log.error(e, e);
243
244 throw new RemoteException(e.getMessage());
245 }
246 }
247
248 public static void getSubfolderIds(Long[] folderIds, long groupId,
249 long folderId) throws RemoteException {
250 try {
251 BookmarksFolderServiceUtil.getSubfolderIds(ListUtil.toList(
252 folderIds), groupId, folderId);
253 }
254 catch (Exception e) {
255 _log.error(e, e);
256
257 throw new RemoteException(e.getMessage());
258 }
259 }
260
261 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap moveFolder(
262 long folderId, long parentFolderId) throws RemoteException {
263 try {
264 com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.moveFolder(folderId,
265 parentFolderId);
266
267 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
268 }
269 catch (Exception e) {
270 _log.error(e, e);
271
272 throw new RemoteException(e.getMessage());
273 }
274 }
275
276 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap moveFolderFromTrash(
277 long folderId, long parentFolderId) throws RemoteException {
278 try {
279 com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.moveFolderFromTrash(folderId,
280 parentFolderId);
281
282 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
283 }
284 catch (Exception e) {
285 _log.error(e, e);
286
287 throw new RemoteException(e.getMessage());
288 }
289 }
290
291 public static void moveFolderToTrash(long folderId)
292 throws RemoteException {
293 try {
294 BookmarksFolderServiceUtil.moveFolderToTrash(folderId);
295 }
296 catch (Exception e) {
297 _log.error(e, e);
298
299 throw new RemoteException(e.getMessage());
300 }
301 }
302
303 public static void restoreFolderFromTrash(long folderId)
304 throws RemoteException {
305 try {
306 BookmarksFolderServiceUtil.restoreFolderFromTrash(folderId);
307 }
308 catch (Exception e) {
309 _log.error(e, e);
310
311 throw new RemoteException(e.getMessage());
312 }
313 }
314
315 public static void subscribeFolder(long groupId, long folderId)
316 throws RemoteException {
317 try {
318 BookmarksFolderServiceUtil.subscribeFolder(groupId, folderId);
319 }
320 catch (Exception e) {
321 _log.error(e, e);
322
323 throw new RemoteException(e.getMessage());
324 }
325 }
326
327 public static void unsubscribeFolder(long groupId, long folderId)
328 throws RemoteException {
329 try {
330 BookmarksFolderServiceUtil.unsubscribeFolder(groupId, folderId);
331 }
332 catch (Exception e) {
333 _log.error(e, e);
334
335 throw new RemoteException(e.getMessage());
336 }
337 }
338
339 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap updateFolder(
340 long folderId, long parentFolderId, java.lang.String name,
341 java.lang.String description, boolean mergeWithParentFolder,
342 com.liferay.portal.service.ServiceContext serviceContext)
343 throws RemoteException {
344 try {
345 com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.updateFolder(folderId,
346 parentFolderId, name, description, mergeWithParentFolder,
347 serviceContext);
348
349 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
350 }
351 catch (Exception e) {
352 _log.error(e, e);
353
354 throw new RemoteException(e.getMessage());
355 }
356 }
357
358 private static Log _log = LogFactoryUtil.getLog(BookmarksFolderServiceSoap.class);
359 }