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