001
014
015 package com.liferay.portlet.asset.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.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.http.TunnelUtil;
023
024 import com.liferay.portlet.asset.service.AssetVocabularyServiceUtil;
025
026
056 public class AssetVocabularyServiceHttp {
057 public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
058 HttpPrincipal httpPrincipal,
059 java.util.Map<java.util.Locale, java.lang.String> titleMap,
060 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
061 java.lang.String settings,
062 com.liferay.portal.service.ServiceContext serviceContext)
063 throws com.liferay.portal.kernel.exception.PortalException,
064 com.liferay.portal.kernel.exception.SystemException {
065 try {
066 MethodKey methodKey = new MethodKey(AssetVocabularyServiceUtil.class.getName(),
067 "addVocabulary", _addVocabularyParameterTypes0);
068
069 MethodHandler methodHandler = new MethodHandler(methodKey,
070 titleMap, descriptionMap, settings, serviceContext);
071
072 Object returnObj = null;
073
074 try {
075 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
076 }
077 catch (Exception e) {
078 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
079 throw (com.liferay.portal.kernel.exception.PortalException)e;
080 }
081
082 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
083 throw (com.liferay.portal.kernel.exception.SystemException)e;
084 }
085
086 throw new com.liferay.portal.kernel.exception.SystemException(e);
087 }
088
089 return (com.liferay.portlet.asset.model.AssetVocabulary)returnObj;
090 }
091 catch (com.liferay.portal.kernel.exception.SystemException se) {
092 _log.error(se, se);
093
094 throw se;
095 }
096 }
097
098 public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
099 HttpPrincipal httpPrincipal, java.lang.String title,
100 java.util.Map<java.util.Locale, java.lang.String> titleMap,
101 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
102 java.lang.String settings,
103 com.liferay.portal.service.ServiceContext serviceContext)
104 throws com.liferay.portal.kernel.exception.PortalException,
105 com.liferay.portal.kernel.exception.SystemException {
106 try {
107 MethodKey methodKey = new MethodKey(AssetVocabularyServiceUtil.class.getName(),
108 "addVocabulary", _addVocabularyParameterTypes1);
109
110 MethodHandler methodHandler = new MethodHandler(methodKey, title,
111 titleMap, descriptionMap, settings, serviceContext);
112
113 Object returnObj = null;
114
115 try {
116 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
117 }
118 catch (Exception e) {
119 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
120 throw (com.liferay.portal.kernel.exception.PortalException)e;
121 }
122
123 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
124 throw (com.liferay.portal.kernel.exception.SystemException)e;
125 }
126
127 throw new com.liferay.portal.kernel.exception.SystemException(e);
128 }
129
130 return (com.liferay.portlet.asset.model.AssetVocabulary)returnObj;
131 }
132 catch (com.liferay.portal.kernel.exception.SystemException se) {
133 _log.error(se, se);
134
135 throw se;
136 }
137 }
138
139 public static void deleteVocabulary(HttpPrincipal httpPrincipal,
140 long vocabularyId)
141 throws com.liferay.portal.kernel.exception.PortalException,
142 com.liferay.portal.kernel.exception.SystemException {
143 try {
144 MethodKey methodKey = new MethodKey(AssetVocabularyServiceUtil.class.getName(),
145 "deleteVocabulary", _deleteVocabularyParameterTypes2);
146
147 MethodHandler methodHandler = new MethodHandler(methodKey,
148 vocabularyId);
149
150 try {
151 TunnelUtil.invoke(httpPrincipal, methodHandler);
152 }
153 catch (Exception e) {
154 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
155 throw (com.liferay.portal.kernel.exception.PortalException)e;
156 }
157
158 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
159 throw (com.liferay.portal.kernel.exception.SystemException)e;
160 }
161
162 throw new com.liferay.portal.kernel.exception.SystemException(e);
163 }
164 }
165 catch (com.liferay.portal.kernel.exception.SystemException se) {
166 _log.error(se, se);
167
168 throw se;
169 }
170 }
171
172 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
173 HttpPrincipal httpPrincipal, long companyId)
174 throws com.liferay.portal.kernel.exception.PortalException,
175 com.liferay.portal.kernel.exception.SystemException {
176 try {
177 MethodKey methodKey = new MethodKey(AssetVocabularyServiceUtil.class.getName(),
178 "getCompanyVocabularies",
179 _getCompanyVocabulariesParameterTypes3);
180
181 MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
182
183 Object returnObj = null;
184
185 try {
186 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
187 }
188 catch (Exception e) {
189 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
190 throw (com.liferay.portal.kernel.exception.PortalException)e;
191 }
192
193 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
194 throw (com.liferay.portal.kernel.exception.SystemException)e;
195 }
196
197 throw new com.liferay.portal.kernel.exception.SystemException(e);
198 }
199
200 return (java.util.List<com.liferay.portlet.asset.model.AssetVocabulary>)returnObj;
201 }
202 catch (com.liferay.portal.kernel.exception.SystemException se) {
203 _log.error(se, se);
204
205 throw se;
206 }
207 }
208
209 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
210 HttpPrincipal httpPrincipal, long[] groupIds)
211 throws com.liferay.portal.kernel.exception.PortalException,
212 com.liferay.portal.kernel.exception.SystemException {
213 try {
214 MethodKey methodKey = new MethodKey(AssetVocabularyServiceUtil.class.getName(),
215 "getGroupsVocabularies",
216 _getGroupsVocabulariesParameterTypes4);
217
218 MethodHandler methodHandler = new MethodHandler(methodKey, groupIds);
219
220 Object returnObj = null;
221
222 try {
223 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
224 }
225 catch (Exception e) {
226 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
227 throw (com.liferay.portal.kernel.exception.PortalException)e;
228 }
229
230 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
231 throw (com.liferay.portal.kernel.exception.SystemException)e;
232 }
233
234 throw new com.liferay.portal.kernel.exception.SystemException(e);
235 }
236
237 return (java.util.List<com.liferay.portlet.asset.model.AssetVocabulary>)returnObj;
238 }
239 catch (com.liferay.portal.kernel.exception.SystemException se) {
240 _log.error(se, se);
241
242 throw se;
243 }
244 }
245
246 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
247 HttpPrincipal httpPrincipal, long groupId)
248 throws com.liferay.portal.kernel.exception.PortalException,
249 com.liferay.portal.kernel.exception.SystemException {
250 try {
251 MethodKey methodKey = new MethodKey(AssetVocabularyServiceUtil.class.getName(),
252 "getGroupVocabularies", _getGroupVocabulariesParameterTypes5);
253
254 MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
255
256 Object returnObj = null;
257
258 try {
259 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
260 }
261 catch (Exception e) {
262 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
263 throw (com.liferay.portal.kernel.exception.PortalException)e;
264 }
265
266 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
267 throw (com.liferay.portal.kernel.exception.SystemException)e;
268 }
269
270 throw new com.liferay.portal.kernel.exception.SystemException(e);
271 }
272
273 return (java.util.List<com.liferay.portlet.asset.model.AssetVocabulary>)returnObj;
274 }
275 catch (com.liferay.portal.kernel.exception.SystemException se) {
276 _log.error(se, se);
277
278 throw se;
279 }
280 }
281
282 public static com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
283 HttpPrincipal httpPrincipal, long vocabularyId)
284 throws com.liferay.portal.kernel.exception.PortalException,
285 com.liferay.portal.kernel.exception.SystemException {
286 try {
287 MethodKey methodKey = new MethodKey(AssetVocabularyServiceUtil.class.getName(),
288 "getVocabulary", _getVocabularyParameterTypes6);
289
290 MethodHandler methodHandler = new MethodHandler(methodKey,
291 vocabularyId);
292
293 Object returnObj = null;
294
295 try {
296 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
297 }
298 catch (Exception e) {
299 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
300 throw (com.liferay.portal.kernel.exception.PortalException)e;
301 }
302
303 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
304 throw (com.liferay.portal.kernel.exception.SystemException)e;
305 }
306
307 throw new com.liferay.portal.kernel.exception.SystemException(e);
308 }
309
310 return (com.liferay.portlet.asset.model.AssetVocabulary)returnObj;
311 }
312 catch (com.liferay.portal.kernel.exception.SystemException se) {
313 _log.error(se, se);
314
315 throw se;
316 }
317 }
318
319 public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
320 HttpPrincipal httpPrincipal, long vocabularyId,
321 java.util.Map<java.util.Locale, java.lang.String> titleMap,
322 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
323 java.lang.String settings,
324 com.liferay.portal.service.ServiceContext serviceContext)
325 throws com.liferay.portal.kernel.exception.PortalException,
326 com.liferay.portal.kernel.exception.SystemException {
327 try {
328 MethodKey methodKey = new MethodKey(AssetVocabularyServiceUtil.class.getName(),
329 "updateVocabulary", _updateVocabularyParameterTypes7);
330
331 MethodHandler methodHandler = new MethodHandler(methodKey,
332 vocabularyId, titleMap, descriptionMap, settings,
333 serviceContext);
334
335 Object returnObj = null;
336
337 try {
338 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
339 }
340 catch (Exception e) {
341 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
342 throw (com.liferay.portal.kernel.exception.PortalException)e;
343 }
344
345 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
346 throw (com.liferay.portal.kernel.exception.SystemException)e;
347 }
348
349 throw new com.liferay.portal.kernel.exception.SystemException(e);
350 }
351
352 return (com.liferay.portlet.asset.model.AssetVocabulary)returnObj;
353 }
354 catch (com.liferay.portal.kernel.exception.SystemException se) {
355 _log.error(se, se);
356
357 throw se;
358 }
359 }
360
361 public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
362 HttpPrincipal httpPrincipal, long vocabularyId, java.lang.String title,
363 java.util.Map<java.util.Locale, java.lang.String> titleMap,
364 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
365 java.lang.String settings,
366 com.liferay.portal.service.ServiceContext serviceContext)
367 throws com.liferay.portal.kernel.exception.PortalException,
368 com.liferay.portal.kernel.exception.SystemException {
369 try {
370 MethodKey methodKey = new MethodKey(AssetVocabularyServiceUtil.class.getName(),
371 "updateVocabulary", _updateVocabularyParameterTypes8);
372
373 MethodHandler methodHandler = new MethodHandler(methodKey,
374 vocabularyId, title, titleMap, descriptionMap, settings,
375 serviceContext);
376
377 Object returnObj = null;
378
379 try {
380 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
381 }
382 catch (Exception e) {
383 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
384 throw (com.liferay.portal.kernel.exception.PortalException)e;
385 }
386
387 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
388 throw (com.liferay.portal.kernel.exception.SystemException)e;
389 }
390
391 throw new com.liferay.portal.kernel.exception.SystemException(e);
392 }
393
394 return (com.liferay.portlet.asset.model.AssetVocabulary)returnObj;
395 }
396 catch (com.liferay.portal.kernel.exception.SystemException se) {
397 _log.error(se, se);
398
399 throw se;
400 }
401 }
402
403 private static Log _log = LogFactoryUtil.getLog(AssetVocabularyServiceHttp.class);
404 private static final Class<?>[] _addVocabularyParameterTypes0 = new Class[] {
405 java.util.Map.class, java.util.Map.class, java.lang.String.class,
406 com.liferay.portal.service.ServiceContext.class
407 };
408 private static final Class<?>[] _addVocabularyParameterTypes1 = new Class[] {
409 java.lang.String.class, java.util.Map.class, java.util.Map.class,
410 java.lang.String.class,
411 com.liferay.portal.service.ServiceContext.class
412 };
413 private static final Class<?>[] _deleteVocabularyParameterTypes2 = new Class[] {
414 long.class
415 };
416 private static final Class<?>[] _getCompanyVocabulariesParameterTypes3 = new Class[] {
417 long.class
418 };
419 private static final Class<?>[] _getGroupsVocabulariesParameterTypes4 = new Class[] {
420 long[].class
421 };
422 private static final Class<?>[] _getGroupVocabulariesParameterTypes5 = new Class[] {
423 long.class
424 };
425 private static final Class<?>[] _getVocabularyParameterTypes6 = new Class[] {
426 long.class
427 };
428 private static final Class<?>[] _updateVocabularyParameterTypes7 = new Class[] {
429 long.class, java.util.Map.class, java.util.Map.class,
430 java.lang.String.class,
431 com.liferay.portal.service.ServiceContext.class
432 };
433 private static final Class<?>[] _updateVocabularyParameterTypes8 = new Class[] {
434 long.class, java.lang.String.class, java.util.Map.class,
435 java.util.Map.class, java.lang.String.class,
436 com.liferay.portal.service.ServiceContext.class
437 };
438 }