1
14
15 package com.liferay.portlet.tags.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.http.TunnelUtil;
23
24 import com.liferay.portlet.tags.service.TagsEntryServiceUtil;
25
26
63 public class TagsEntryServiceHttp {
64 public static com.liferay.portlet.tags.model.TagsEntry addEntry(
65 HttpPrincipal httpPrincipal, java.lang.String parentEntryName,
66 java.lang.String name, java.lang.String vocabularyName,
67 java.lang.String[] properties,
68 com.liferay.portal.service.ServiceContext serviceContext)
69 throws com.liferay.portal.PortalException,
70 com.liferay.portal.SystemException {
71 try {
72 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
73 "addEntry", _addEntryParameterTypes0);
74
75 MethodHandler methodHandler = new MethodHandler(methodKey,
76 parentEntryName, name, vocabularyName, properties,
77 serviceContext);
78
79 Object returnObj = null;
80
81 try {
82 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
83 }
84 catch (Exception e) {
85 if (e instanceof com.liferay.portal.PortalException) {
86 throw (com.liferay.portal.PortalException)e;
87 }
88
89 if (e instanceof com.liferay.portal.SystemException) {
90 throw (com.liferay.portal.SystemException)e;
91 }
92
93 throw new com.liferay.portal.SystemException(e);
94 }
95
96 return (com.liferay.portlet.tags.model.TagsEntry)returnObj;
97 }
98 catch (com.liferay.portal.SystemException se) {
99 _log.error(se, se);
100
101 throw se;
102 }
103 }
104
105 public static void deleteEntry(HttpPrincipal httpPrincipal, long entryId)
106 throws com.liferay.portal.PortalException,
107 com.liferay.portal.SystemException {
108 try {
109 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
110 "deleteEntry", _deleteEntryParameterTypes1);
111
112 MethodHandler methodHandler = new MethodHandler(methodKey, entryId);
113
114 try {
115 TunnelUtil.invoke(httpPrincipal, methodHandler);
116 }
117 catch (Exception e) {
118 if (e instanceof com.liferay.portal.PortalException) {
119 throw (com.liferay.portal.PortalException)e;
120 }
121
122 if (e instanceof com.liferay.portal.SystemException) {
123 throw (com.liferay.portal.SystemException)e;
124 }
125
126 throw new com.liferay.portal.SystemException(e);
127 }
128 }
129 catch (com.liferay.portal.SystemException se) {
130 _log.error(se, se);
131
132 throw se;
133 }
134 }
135
136 public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries(
137 HttpPrincipal httpPrincipal, long groupId, long classNameId,
138 java.lang.String name)
139 throws com.liferay.portal.PortalException,
140 com.liferay.portal.SystemException {
141 try {
142 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
143 "getEntries", _getEntriesParameterTypes2);
144
145 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
146 classNameId, name);
147
148 Object returnObj = null;
149
150 try {
151 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
152 }
153 catch (Exception e) {
154 if (e instanceof com.liferay.portal.PortalException) {
155 throw (com.liferay.portal.PortalException)e;
156 }
157
158 if (e instanceof com.liferay.portal.SystemException) {
159 throw (com.liferay.portal.SystemException)e;
160 }
161
162 throw new com.liferay.portal.SystemException(e);
163 }
164
165 return (java.util.List<com.liferay.portlet.tags.model.TagsEntry>)returnObj;
166 }
167 catch (com.liferay.portal.SystemException se) {
168 _log.error(se, se);
169
170 throw se;
171 }
172 }
173
174 public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries(
175 HttpPrincipal httpPrincipal, java.lang.String className, long classPK)
176 throws com.liferay.portal.PortalException,
177 com.liferay.portal.SystemException {
178 try {
179 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
180 "getEntries", _getEntriesParameterTypes3);
181
182 MethodHandler methodHandler = new MethodHandler(methodKey,
183 className, classPK);
184
185 Object returnObj = null;
186
187 try {
188 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
189 }
190 catch (Exception e) {
191 if (e instanceof com.liferay.portal.PortalException) {
192 throw (com.liferay.portal.PortalException)e;
193 }
194
195 if (e instanceof com.liferay.portal.SystemException) {
196 throw (com.liferay.portal.SystemException)e;
197 }
198
199 throw new com.liferay.portal.SystemException(e);
200 }
201
202 return (java.util.List<com.liferay.portlet.tags.model.TagsEntry>)returnObj;
203 }
204 catch (com.liferay.portal.SystemException se) {
205 _log.error(se, se);
206
207 throw se;
208 }
209 }
210
211 public static com.liferay.portlet.tags.model.TagsEntry getEntry(
212 HttpPrincipal httpPrincipal, long entryId)
213 throws com.liferay.portal.PortalException,
214 com.liferay.portal.SystemException {
215 try {
216 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
217 "getEntry", _getEntryParameterTypes4);
218
219 MethodHandler methodHandler = new MethodHandler(methodKey, entryId);
220
221 Object returnObj = null;
222
223 try {
224 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
225 }
226 catch (Exception e) {
227 if (e instanceof com.liferay.portal.PortalException) {
228 throw (com.liferay.portal.PortalException)e;
229 }
230
231 if (e instanceof com.liferay.portal.SystemException) {
232 throw (com.liferay.portal.SystemException)e;
233 }
234
235 throw new com.liferay.portal.SystemException(e);
236 }
237
238 return (com.liferay.portlet.tags.model.TagsEntry)returnObj;
239 }
240 catch (com.liferay.portal.SystemException se) {
241 _log.error(se, se);
242
243 throw se;
244 }
245 }
246
247 public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getGroupVocabularyEntries(
248 HttpPrincipal httpPrincipal, long groupId,
249 java.lang.String vocabularyName)
250 throws com.liferay.portal.PortalException,
251 com.liferay.portal.SystemException {
252 try {
253 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
254 "getGroupVocabularyEntries",
255 _getGroupVocabularyEntriesParameterTypes5);
256
257 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
258 vocabularyName);
259
260 Object returnObj = null;
261
262 try {
263 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
264 }
265 catch (Exception e) {
266 if (e instanceof com.liferay.portal.PortalException) {
267 throw (com.liferay.portal.PortalException)e;
268 }
269
270 if (e instanceof com.liferay.portal.SystemException) {
271 throw (com.liferay.portal.SystemException)e;
272 }
273
274 throw new com.liferay.portal.SystemException(e);
275 }
276
277 return (java.util.List<com.liferay.portlet.tags.model.TagsEntry>)returnObj;
278 }
279 catch (com.liferay.portal.SystemException se) {
280 _log.error(se, se);
281
282 throw se;
283 }
284 }
285
286 public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getGroupVocabularyEntries(
287 HttpPrincipal httpPrincipal, long groupId,
288 java.lang.String parentEntryName, java.lang.String vocabularyName)
289 throws com.liferay.portal.PortalException,
290 com.liferay.portal.SystemException {
291 try {
292 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
293 "getGroupVocabularyEntries",
294 _getGroupVocabularyEntriesParameterTypes6);
295
296 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
297 parentEntryName, vocabularyName);
298
299 Object returnObj = null;
300
301 try {
302 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
303 }
304 catch (Exception e) {
305 if (e instanceof com.liferay.portal.PortalException) {
306 throw (com.liferay.portal.PortalException)e;
307 }
308
309 if (e instanceof com.liferay.portal.SystemException) {
310 throw (com.liferay.portal.SystemException)e;
311 }
312
313 throw new com.liferay.portal.SystemException(e);
314 }
315
316 return (java.util.List<com.liferay.portlet.tags.model.TagsEntry>)returnObj;
317 }
318 catch (com.liferay.portal.SystemException se) {
319 _log.error(se, se);
320
321 throw se;
322 }
323 }
324
325 public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getGroupVocabularyRootEntries(
326 HttpPrincipal httpPrincipal, long groupId,
327 java.lang.String vocabularyName)
328 throws com.liferay.portal.PortalException,
329 com.liferay.portal.SystemException {
330 try {
331 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
332 "getGroupVocabularyRootEntries",
333 _getGroupVocabularyRootEntriesParameterTypes7);
334
335 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
336 vocabularyName);
337
338 Object returnObj = null;
339
340 try {
341 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
342 }
343 catch (Exception e) {
344 if (e instanceof com.liferay.portal.PortalException) {
345 throw (com.liferay.portal.PortalException)e;
346 }
347
348 if (e instanceof com.liferay.portal.SystemException) {
349 throw (com.liferay.portal.SystemException)e;
350 }
351
352 throw new com.liferay.portal.SystemException(e);
353 }
354
355 return (java.util.List<com.liferay.portlet.tags.model.TagsEntry>)returnObj;
356 }
357 catch (com.liferay.portal.SystemException se) {
358 _log.error(se, se);
359
360 throw se;
361 }
362 }
363
364 public static void mergeEntries(HttpPrincipal httpPrincipal,
365 long fromEntryId, long toEntryId)
366 throws com.liferay.portal.PortalException,
367 com.liferay.portal.SystemException {
368 try {
369 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
370 "mergeEntries", _mergeEntriesParameterTypes8);
371
372 MethodHandler methodHandler = new MethodHandler(methodKey,
373 fromEntryId, toEntryId);
374
375 try {
376 TunnelUtil.invoke(httpPrincipal, methodHandler);
377 }
378 catch (Exception e) {
379 if (e instanceof com.liferay.portal.PortalException) {
380 throw (com.liferay.portal.PortalException)e;
381 }
382
383 if (e instanceof com.liferay.portal.SystemException) {
384 throw (com.liferay.portal.SystemException)e;
385 }
386
387 throw new com.liferay.portal.SystemException(e);
388 }
389 }
390 catch (com.liferay.portal.SystemException se) {
391 _log.error(se, se);
392
393 throw se;
394 }
395 }
396
397 public static com.liferay.portal.kernel.json.JSONArray search(
398 HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
399 java.lang.String[] properties, int start, int end)
400 throws com.liferay.portal.SystemException {
401 try {
402 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
403 "search", _searchParameterTypes9);
404
405 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
406 name, properties, start, end);
407
408 Object returnObj = null;
409
410 try {
411 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
412 }
413 catch (Exception e) {
414 if (e instanceof com.liferay.portal.SystemException) {
415 throw (com.liferay.portal.SystemException)e;
416 }
417
418 throw new com.liferay.portal.SystemException(e);
419 }
420
421 return (com.liferay.portal.kernel.json.JSONArray)returnObj;
422 }
423 catch (com.liferay.portal.SystemException se) {
424 _log.error(se, se);
425
426 throw se;
427 }
428 }
429
430 public static com.liferay.portlet.tags.model.TagsEntry updateEntry(
431 HttpPrincipal httpPrincipal, long entryId,
432 java.lang.String parentEntryName, java.lang.String name,
433 java.lang.String vocabularyName, java.lang.String[] properties)
434 throws com.liferay.portal.PortalException,
435 com.liferay.portal.SystemException {
436 try {
437 MethodKey methodKey = new MethodKey(TagsEntryServiceUtil.class.getName(),
438 "updateEntry", _updateEntryParameterTypes10);
439
440 MethodHandler methodHandler = new MethodHandler(methodKey, entryId,
441 parentEntryName, name, vocabularyName, properties);
442
443 Object returnObj = null;
444
445 try {
446 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
447 }
448 catch (Exception e) {
449 if (e instanceof com.liferay.portal.PortalException) {
450 throw (com.liferay.portal.PortalException)e;
451 }
452
453 if (e instanceof com.liferay.portal.SystemException) {
454 throw (com.liferay.portal.SystemException)e;
455 }
456
457 throw new com.liferay.portal.SystemException(e);
458 }
459
460 return (com.liferay.portlet.tags.model.TagsEntry)returnObj;
461 }
462 catch (com.liferay.portal.SystemException se) {
463 _log.error(se, se);
464
465 throw se;
466 }
467 }
468
469 private static Log _log = LogFactoryUtil.getLog(TagsEntryServiceHttp.class);
470 private static final Class<?>[] _addEntryParameterTypes0 = new Class[] {
471 java.lang.String.class, java.lang.String.class,
472 java.lang.String.class, java.lang.String[].class,
473 com.liferay.portal.service.ServiceContext.class
474 };
475 private static final Class<?>[] _deleteEntryParameterTypes1 = new Class[] {
476 long.class
477 };
478 private static final Class<?>[] _getEntriesParameterTypes2 = new Class[] {
479 long.class, long.class, java.lang.String.class
480 };
481 private static final Class<?>[] _getEntriesParameterTypes3 = new Class[] {
482 java.lang.String.class, long.class
483 };
484 private static final Class<?>[] _getEntryParameterTypes4 = new Class[] {
485 long.class
486 };
487 private static final Class<?>[] _getGroupVocabularyEntriesParameterTypes5 = new Class[] {
488 long.class, java.lang.String.class
489 };
490 private static final Class<?>[] _getGroupVocabularyEntriesParameterTypes6 = new Class[] {
491 long.class, java.lang.String.class, java.lang.String.class
492 };
493 private static final Class<?>[] _getGroupVocabularyRootEntriesParameterTypes7 =
494 new Class[] { long.class, java.lang.String.class };
495 private static final Class<?>[] _mergeEntriesParameterTypes8 = new Class[] {
496 long.class, long.class
497 };
498 private static final Class<?>[] _searchParameterTypes9 = new Class[] {
499 long.class, java.lang.String.class, java.lang.String[].class,
500 int.class, int.class
501 };
502 private static final Class<?>[] _updateEntryParameterTypes10 = new Class[] {
503 long.class, java.lang.String.class, java.lang.String.class,
504 java.lang.String.class, java.lang.String[].class
505 };
506 }