1
22
23 package com.liferay.portlet.bookmarks.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.kernel.util.BooleanWrapper;
28 import com.liferay.portal.kernel.util.LongWrapper;
29 import com.liferay.portal.kernel.util.MethodWrapper;
30 import com.liferay.portal.kernel.util.NullWrapper;
31 import com.liferay.portal.security.auth.HttpPrincipal;
32 import com.liferay.portal.service.http.TunnelUtil;
33
34 import com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil;
35
36
75 public class BookmarksEntryServiceHttp {
76 public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
77 HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
78 java.lang.String url, java.lang.String comments,
79 java.lang.String[] tagsEntries, boolean addCommunityPermissions,
80 boolean addGuestPermissions)
81 throws com.liferay.portal.PortalException,
82 com.liferay.portal.SystemException {
83 try {
84 Object paramObj0 = new LongWrapper(folderId);
85
86 Object paramObj1 = name;
87
88 if (name == null) {
89 paramObj1 = new NullWrapper("java.lang.String");
90 }
91
92 Object paramObj2 = url;
93
94 if (url == null) {
95 paramObj2 = new NullWrapper("java.lang.String");
96 }
97
98 Object paramObj3 = comments;
99
100 if (comments == null) {
101 paramObj3 = new NullWrapper("java.lang.String");
102 }
103
104 Object paramObj4 = tagsEntries;
105
106 if (tagsEntries == null) {
107 paramObj4 = new NullWrapper("[Ljava.lang.String;");
108 }
109
110 Object paramObj5 = new BooleanWrapper(addCommunityPermissions);
111
112 Object paramObj6 = new BooleanWrapper(addGuestPermissions);
113
114 MethodWrapper methodWrapper = new MethodWrapper(BookmarksEntryServiceUtil.class.getName(),
115 "addEntry",
116 new Object[] {
117 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
118 paramObj5, paramObj6
119 });
120
121 Object returnObj = null;
122
123 try {
124 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
125 }
126 catch (Exception e) {
127 if (e instanceof com.liferay.portal.PortalException) {
128 throw (com.liferay.portal.PortalException)e;
129 }
130
131 if (e instanceof com.liferay.portal.SystemException) {
132 throw (com.liferay.portal.SystemException)e;
133 }
134
135 throw new com.liferay.portal.SystemException(e);
136 }
137
138 return (com.liferay.portlet.bookmarks.model.BookmarksEntry)returnObj;
139 }
140 catch (com.liferay.portal.SystemException se) {
141 _log.error(se, se);
142
143 throw se;
144 }
145 }
146
147 public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
148 HttpPrincipal httpPrincipal, long folderId, java.lang.String name,
149 java.lang.String url, java.lang.String comments,
150 java.lang.String[] tagsEntries,
151 java.lang.String[] communityPermissions,
152 java.lang.String[] guestPermissions)
153 throws com.liferay.portal.PortalException,
154 com.liferay.portal.SystemException {
155 try {
156 Object paramObj0 = new LongWrapper(folderId);
157
158 Object paramObj1 = name;
159
160 if (name == null) {
161 paramObj1 = new NullWrapper("java.lang.String");
162 }
163
164 Object paramObj2 = url;
165
166 if (url == null) {
167 paramObj2 = new NullWrapper("java.lang.String");
168 }
169
170 Object paramObj3 = comments;
171
172 if (comments == null) {
173 paramObj3 = new NullWrapper("java.lang.String");
174 }
175
176 Object paramObj4 = tagsEntries;
177
178 if (tagsEntries == null) {
179 paramObj4 = new NullWrapper("[Ljava.lang.String;");
180 }
181
182 Object paramObj5 = communityPermissions;
183
184 if (communityPermissions == null) {
185 paramObj5 = new NullWrapper("[Ljava.lang.String;");
186 }
187
188 Object paramObj6 = guestPermissions;
189
190 if (guestPermissions == null) {
191 paramObj6 = new NullWrapper("[Ljava.lang.String;");
192 }
193
194 MethodWrapper methodWrapper = new MethodWrapper(BookmarksEntryServiceUtil.class.getName(),
195 "addEntry",
196 new Object[] {
197 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
198 paramObj5, paramObj6
199 });
200
201 Object returnObj = null;
202
203 try {
204 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
205 }
206 catch (Exception e) {
207 if (e instanceof com.liferay.portal.PortalException) {
208 throw (com.liferay.portal.PortalException)e;
209 }
210
211 if (e instanceof com.liferay.portal.SystemException) {
212 throw (com.liferay.portal.SystemException)e;
213 }
214
215 throw new com.liferay.portal.SystemException(e);
216 }
217
218 return (com.liferay.portlet.bookmarks.model.BookmarksEntry)returnObj;
219 }
220 catch (com.liferay.portal.SystemException se) {
221 _log.error(se, se);
222
223 throw se;
224 }
225 }
226
227 public static void deleteEntry(HttpPrincipal httpPrincipal, long entryId)
228 throws com.liferay.portal.PortalException,
229 com.liferay.portal.SystemException {
230 try {
231 Object paramObj0 = new LongWrapper(entryId);
232
233 MethodWrapper methodWrapper = new MethodWrapper(BookmarksEntryServiceUtil.class.getName(),
234 "deleteEntry", new Object[] { paramObj0 });
235
236 try {
237 TunnelUtil.invoke(httpPrincipal, methodWrapper);
238 }
239 catch (Exception e) {
240 if (e instanceof com.liferay.portal.PortalException) {
241 throw (com.liferay.portal.PortalException)e;
242 }
243
244 if (e instanceof com.liferay.portal.SystemException) {
245 throw (com.liferay.portal.SystemException)e;
246 }
247
248 throw new com.liferay.portal.SystemException(e);
249 }
250 }
251 catch (com.liferay.portal.SystemException se) {
252 _log.error(se, se);
253
254 throw se;
255 }
256 }
257
258 public static com.liferay.portlet.bookmarks.model.BookmarksEntry getEntry(
259 HttpPrincipal httpPrincipal, long entryId)
260 throws com.liferay.portal.PortalException,
261 com.liferay.portal.SystemException {
262 try {
263 Object paramObj0 = new LongWrapper(entryId);
264
265 MethodWrapper methodWrapper = new MethodWrapper(BookmarksEntryServiceUtil.class.getName(),
266 "getEntry", new Object[] { paramObj0 });
267
268 Object returnObj = null;
269
270 try {
271 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
272 }
273 catch (Exception e) {
274 if (e instanceof com.liferay.portal.PortalException) {
275 throw (com.liferay.portal.PortalException)e;
276 }
277
278 if (e instanceof com.liferay.portal.SystemException) {
279 throw (com.liferay.portal.SystemException)e;
280 }
281
282 throw new com.liferay.portal.SystemException(e);
283 }
284
285 return (com.liferay.portlet.bookmarks.model.BookmarksEntry)returnObj;
286 }
287 catch (com.liferay.portal.SystemException se) {
288 _log.error(se, se);
289
290 throw se;
291 }
292 }
293
294 public static com.liferay.portlet.bookmarks.model.BookmarksEntry openEntry(
295 HttpPrincipal httpPrincipal, long entryId)
296 throws com.liferay.portal.PortalException,
297 com.liferay.portal.SystemException {
298 try {
299 Object paramObj0 = new LongWrapper(entryId);
300
301 MethodWrapper methodWrapper = new MethodWrapper(BookmarksEntryServiceUtil.class.getName(),
302 "openEntry", new Object[] { paramObj0 });
303
304 Object returnObj = null;
305
306 try {
307 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
308 }
309 catch (Exception e) {
310 if (e instanceof com.liferay.portal.PortalException) {
311 throw (com.liferay.portal.PortalException)e;
312 }
313
314 if (e instanceof com.liferay.portal.SystemException) {
315 throw (com.liferay.portal.SystemException)e;
316 }
317
318 throw new com.liferay.portal.SystemException(e);
319 }
320
321 return (com.liferay.portlet.bookmarks.model.BookmarksEntry)returnObj;
322 }
323 catch (com.liferay.portal.SystemException se) {
324 _log.error(se, se);
325
326 throw se;
327 }
328 }
329
330 public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateEntry(
331 HttpPrincipal httpPrincipal, long entryId, long folderId,
332 java.lang.String name, java.lang.String url, java.lang.String comments,
333 java.lang.String[] tagsEntries)
334 throws com.liferay.portal.PortalException,
335 com.liferay.portal.SystemException {
336 try {
337 Object paramObj0 = new LongWrapper(entryId);
338
339 Object paramObj1 = new LongWrapper(folderId);
340
341 Object paramObj2 = name;
342
343 if (name == null) {
344 paramObj2 = new NullWrapper("java.lang.String");
345 }
346
347 Object paramObj3 = url;
348
349 if (url == null) {
350 paramObj3 = new NullWrapper("java.lang.String");
351 }
352
353 Object paramObj4 = comments;
354
355 if (comments == null) {
356 paramObj4 = new NullWrapper("java.lang.String");
357 }
358
359 Object paramObj5 = tagsEntries;
360
361 if (tagsEntries == null) {
362 paramObj5 = new NullWrapper("[Ljava.lang.String;");
363 }
364
365 MethodWrapper methodWrapper = new MethodWrapper(BookmarksEntryServiceUtil.class.getName(),
366 "updateEntry",
367 new Object[] {
368 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
369 paramObj5
370 });
371
372 Object returnObj = null;
373
374 try {
375 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
376 }
377 catch (Exception e) {
378 if (e instanceof com.liferay.portal.PortalException) {
379 throw (com.liferay.portal.PortalException)e;
380 }
381
382 if (e instanceof com.liferay.portal.SystemException) {
383 throw (com.liferay.portal.SystemException)e;
384 }
385
386 throw new com.liferay.portal.SystemException(e);
387 }
388
389 return (com.liferay.portlet.bookmarks.model.BookmarksEntry)returnObj;
390 }
391 catch (com.liferay.portal.SystemException se) {
392 _log.error(se, se);
393
394 throw se;
395 }
396 }
397
398 private static Log _log = LogFactoryUtil.getLog(BookmarksEntryServiceHttp.class);
399 }