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