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.AssetEntryServiceUtil;
025
026
056 public class AssetEntryServiceHttp {
057 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getCompanyEntries(
058 HttpPrincipal httpPrincipal, long companyId, int start, int end)
059 throws com.liferay.portal.kernel.exception.SystemException {
060 try {
061 MethodKey methodKey = new MethodKey(AssetEntryServiceUtil.class,
062 "getCompanyEntries", _getCompanyEntriesParameterTypes0);
063
064 MethodHandler methodHandler = new MethodHandler(methodKey,
065 companyId, start, end);
066
067 Object returnObj = null;
068
069 try {
070 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
071 }
072 catch (Exception e) {
073 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
074 throw (com.liferay.portal.kernel.exception.SystemException)e;
075 }
076
077 throw new com.liferay.portal.kernel.exception.SystemException(e);
078 }
079
080 return (java.util.List<com.liferay.portlet.asset.model.AssetEntry>)returnObj;
081 }
082 catch (com.liferay.portal.kernel.exception.SystemException se) {
083 _log.error(se, se);
084
085 throw se;
086 }
087 }
088
089 public static int getCompanyEntriesCount(HttpPrincipal httpPrincipal,
090 long companyId)
091 throws com.liferay.portal.kernel.exception.SystemException {
092 try {
093 MethodKey methodKey = new MethodKey(AssetEntryServiceUtil.class,
094 "getCompanyEntriesCount",
095 _getCompanyEntriesCountParameterTypes1);
096
097 MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
098
099 Object returnObj = null;
100
101 try {
102 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
103 }
104 catch (Exception e) {
105 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
106 throw (com.liferay.portal.kernel.exception.SystemException)e;
107 }
108
109 throw new com.liferay.portal.kernel.exception.SystemException(e);
110 }
111
112 return ((Integer)returnObj).intValue();
113 }
114 catch (com.liferay.portal.kernel.exception.SystemException se) {
115 _log.error(se, se);
116
117 throw se;
118 }
119 }
120
121 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getEntries(
122 HttpPrincipal httpPrincipal,
123 com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
124 throws com.liferay.portal.kernel.exception.PortalException,
125 com.liferay.portal.kernel.exception.SystemException {
126 try {
127 MethodKey methodKey = new MethodKey(AssetEntryServiceUtil.class,
128 "getEntries", _getEntriesParameterTypes2);
129
130 MethodHandler methodHandler = new MethodHandler(methodKey,
131 entryQuery);
132
133 Object returnObj = null;
134
135 try {
136 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
137 }
138 catch (Exception e) {
139 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
140 throw (com.liferay.portal.kernel.exception.PortalException)e;
141 }
142
143 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
144 throw (com.liferay.portal.kernel.exception.SystemException)e;
145 }
146
147 throw new com.liferay.portal.kernel.exception.SystemException(e);
148 }
149
150 return (java.util.List<com.liferay.portlet.asset.model.AssetEntry>)returnObj;
151 }
152 catch (com.liferay.portal.kernel.exception.SystemException se) {
153 _log.error(se, se);
154
155 throw se;
156 }
157 }
158
159 public static int getEntriesCount(HttpPrincipal httpPrincipal,
160 com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
161 throws com.liferay.portal.kernel.exception.PortalException,
162 com.liferay.portal.kernel.exception.SystemException {
163 try {
164 MethodKey methodKey = new MethodKey(AssetEntryServiceUtil.class,
165 "getEntriesCount", _getEntriesCountParameterTypes3);
166
167 MethodHandler methodHandler = new MethodHandler(methodKey,
168 entryQuery);
169
170 Object returnObj = null;
171
172 try {
173 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
174 }
175 catch (Exception e) {
176 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
177 throw (com.liferay.portal.kernel.exception.PortalException)e;
178 }
179
180 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
181 throw (com.liferay.portal.kernel.exception.SystemException)e;
182 }
183
184 throw new com.liferay.portal.kernel.exception.SystemException(e);
185 }
186
187 return ((Integer)returnObj).intValue();
188 }
189 catch (com.liferay.portal.kernel.exception.SystemException se) {
190 _log.error(se, se);
191
192 throw se;
193 }
194 }
195
196 public static com.liferay.portlet.asset.model.AssetEntry getEntry(
197 HttpPrincipal httpPrincipal, long entryId)
198 throws com.liferay.portal.kernel.exception.PortalException,
199 com.liferay.portal.kernel.exception.SystemException {
200 try {
201 MethodKey methodKey = new MethodKey(AssetEntryServiceUtil.class,
202 "getEntry", _getEntryParameterTypes4);
203
204 MethodHandler methodHandler = new MethodHandler(methodKey, entryId);
205
206 Object returnObj = null;
207
208 try {
209 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
210 }
211 catch (Exception e) {
212 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
213 throw (com.liferay.portal.kernel.exception.PortalException)e;
214 }
215
216 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
217 throw (com.liferay.portal.kernel.exception.SystemException)e;
218 }
219
220 throw new com.liferay.portal.kernel.exception.SystemException(e);
221 }
222
223 return (com.liferay.portlet.asset.model.AssetEntry)returnObj;
224 }
225 catch (com.liferay.portal.kernel.exception.SystemException se) {
226 _log.error(se, se);
227
228 throw se;
229 }
230 }
231
232 public static com.liferay.portlet.asset.model.AssetEntry incrementViewCounter(
233 HttpPrincipal httpPrincipal, java.lang.String className, long classPK)
234 throws com.liferay.portal.kernel.exception.PortalException,
235 com.liferay.portal.kernel.exception.SystemException {
236 try {
237 MethodKey methodKey = new MethodKey(AssetEntryServiceUtil.class,
238 "incrementViewCounter", _incrementViewCounterParameterTypes5);
239
240 MethodHandler methodHandler = new MethodHandler(methodKey,
241 className, classPK);
242
243 Object returnObj = null;
244
245 try {
246 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
247 }
248 catch (Exception e) {
249 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
250 throw (com.liferay.portal.kernel.exception.PortalException)e;
251 }
252
253 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
254 throw (com.liferay.portal.kernel.exception.SystemException)e;
255 }
256
257 throw new com.liferay.portal.kernel.exception.SystemException(e);
258 }
259
260 return (com.liferay.portlet.asset.model.AssetEntry)returnObj;
261 }
262 catch (com.liferay.portal.kernel.exception.SystemException se) {
263 _log.error(se, se);
264
265 throw se;
266 }
267 }
268
269 public static com.liferay.portlet.asset.model.AssetEntry updateEntry(
270 HttpPrincipal httpPrincipal, long groupId, java.util.Date createDate,
271 java.util.Date modifiedDate, java.lang.String className, long classPK,
272 java.lang.String classUuid, long classTypeId, long[] categoryIds,
273 java.lang.String[] tagNames, boolean visible, java.util.Date startDate,
274 java.util.Date endDate, java.util.Date expirationDate,
275 java.lang.String mimeType, java.lang.String title,
276 java.lang.String description, java.lang.String summary,
277 java.lang.String url, java.lang.String layoutUuid, int height,
278 int width, java.lang.Integer priority, boolean sync)
279 throws com.liferay.portal.kernel.exception.PortalException,
280 com.liferay.portal.kernel.exception.SystemException {
281 try {
282 MethodKey methodKey = new MethodKey(AssetEntryServiceUtil.class,
283 "updateEntry", _updateEntryParameterTypes6);
284
285 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
286 createDate, modifiedDate, className, classPK, classUuid,
287 classTypeId, categoryIds, tagNames, visible, startDate,
288 endDate, expirationDate, mimeType, title, description,
289 summary, url, layoutUuid, height, width, priority, sync);
290
291 Object returnObj = null;
292
293 try {
294 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
295 }
296 catch (Exception e) {
297 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
298 throw (com.liferay.portal.kernel.exception.PortalException)e;
299 }
300
301 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
302 throw (com.liferay.portal.kernel.exception.SystemException)e;
303 }
304
305 throw new com.liferay.portal.kernel.exception.SystemException(e);
306 }
307
308 return (com.liferay.portlet.asset.model.AssetEntry)returnObj;
309 }
310 catch (com.liferay.portal.kernel.exception.SystemException se) {
311 _log.error(se, se);
312
313 throw se;
314 }
315 }
316
317 public static com.liferay.portlet.asset.model.AssetEntry updateEntry(
318 HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
319 long classPK, java.lang.String classUuid, long classTypeId,
320 long[] categoryIds, java.lang.String[] tagNames, boolean visible,
321 java.util.Date startDate, java.util.Date endDate,
322 java.util.Date publishDate, java.util.Date expirationDate,
323 java.lang.String mimeType, java.lang.String title,
324 java.lang.String description, java.lang.String summary,
325 java.lang.String url, java.lang.String layoutUuid, int height,
326 int width, java.lang.Integer priority, boolean sync)
327 throws com.liferay.portal.kernel.exception.PortalException,
328 com.liferay.portal.kernel.exception.SystemException {
329 try {
330 MethodKey methodKey = new MethodKey(AssetEntryServiceUtil.class,
331 "updateEntry", _updateEntryParameterTypes7);
332
333 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
334 className, classPK, classUuid, classTypeId, categoryIds,
335 tagNames, visible, startDate, endDate, publishDate,
336 expirationDate, mimeType, title, description, summary, url,
337 layoutUuid, height, width, priority, sync);
338
339 Object returnObj = null;
340
341 try {
342 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
343 }
344 catch (Exception e) {
345 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
346 throw (com.liferay.portal.kernel.exception.PortalException)e;
347 }
348
349 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
350 throw (com.liferay.portal.kernel.exception.SystemException)e;
351 }
352
353 throw new com.liferay.portal.kernel.exception.SystemException(e);
354 }
355
356 return (com.liferay.portlet.asset.model.AssetEntry)returnObj;
357 }
358 catch (com.liferay.portal.kernel.exception.SystemException se) {
359 _log.error(se, se);
360
361 throw se;
362 }
363 }
364
365 public static com.liferay.portlet.asset.model.AssetEntry updateEntry(
366 HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
367 long classPK, java.lang.String classUuid, long classTypeId,
368 long[] categoryIds, java.lang.String[] tagNames, boolean visible,
369 java.util.Date startDate, java.util.Date endDate,
370 java.util.Date expirationDate, java.lang.String mimeType,
371 java.lang.String title, java.lang.String description,
372 java.lang.String summary, java.lang.String url,
373 java.lang.String layoutUuid, int height, int width,
374 java.lang.Integer priority, boolean sync)
375 throws com.liferay.portal.kernel.exception.PortalException,
376 com.liferay.portal.kernel.exception.SystemException {
377 try {
378 MethodKey methodKey = new MethodKey(AssetEntryServiceUtil.class,
379 "updateEntry", _updateEntryParameterTypes8);
380
381 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
382 className, classPK, classUuid, classTypeId, categoryIds,
383 tagNames, visible, startDate, endDate, expirationDate,
384 mimeType, title, description, summary, url, layoutUuid,
385 height, width, priority, sync);
386
387 Object returnObj = null;
388
389 try {
390 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
391 }
392 catch (Exception e) {
393 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
394 throw (com.liferay.portal.kernel.exception.PortalException)e;
395 }
396
397 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
398 throw (com.liferay.portal.kernel.exception.SystemException)e;
399 }
400
401 throw new com.liferay.portal.kernel.exception.SystemException(e);
402 }
403
404 return (com.liferay.portlet.asset.model.AssetEntry)returnObj;
405 }
406 catch (com.liferay.portal.kernel.exception.SystemException se) {
407 _log.error(se, se);
408
409 throw se;
410 }
411 }
412
413 private static Log _log = LogFactoryUtil.getLog(AssetEntryServiceHttp.class);
414 private static final Class<?>[] _getCompanyEntriesParameterTypes0 = new Class[] {
415 long.class, int.class, int.class
416 };
417 private static final Class<?>[] _getCompanyEntriesCountParameterTypes1 = new Class[] {
418 long.class
419 };
420 private static final Class<?>[] _getEntriesParameterTypes2 = new Class[] {
421 com.liferay.portlet.asset.service.persistence.AssetEntryQuery.class
422 };
423 private static final Class<?>[] _getEntriesCountParameterTypes3 = new Class[] {
424 com.liferay.portlet.asset.service.persistence.AssetEntryQuery.class
425 };
426 private static final Class<?>[] _getEntryParameterTypes4 = new Class[] {
427 long.class
428 };
429 private static final Class<?>[] _incrementViewCounterParameterTypes5 = new Class[] {
430 java.lang.String.class, long.class
431 };
432 private static final Class<?>[] _updateEntryParameterTypes6 = new Class[] {
433 long.class, java.util.Date.class, java.util.Date.class,
434 java.lang.String.class, long.class, java.lang.String.class,
435 long.class, long[].class, java.lang.String[].class, boolean.class,
436 java.util.Date.class, java.util.Date.class, java.util.Date.class,
437 java.lang.String.class, java.lang.String.class,
438 java.lang.String.class, java.lang.String.class,
439 java.lang.String.class, java.lang.String.class, int.class, int.class,
440 java.lang.Integer.class, boolean.class
441 };
442 private static final Class<?>[] _updateEntryParameterTypes7 = new Class[] {
443 long.class, java.lang.String.class, long.class,
444 java.lang.String.class, long.class, long[].class,
445 java.lang.String[].class, boolean.class, java.util.Date.class,
446 java.util.Date.class, java.util.Date.class, java.util.Date.class,
447 java.lang.String.class, java.lang.String.class,
448 java.lang.String.class, java.lang.String.class,
449 java.lang.String.class, java.lang.String.class, int.class, int.class,
450 java.lang.Integer.class, boolean.class
451 };
452 private static final Class<?>[] _updateEntryParameterTypes8 = new Class[] {
453 long.class, java.lang.String.class, long.class,
454 java.lang.String.class, long.class, long[].class,
455 java.lang.String[].class, boolean.class, java.util.Date.class,
456 java.util.Date.class, java.util.Date.class, java.lang.String.class,
457 java.lang.String.class, java.lang.String.class,
458 java.lang.String.class, java.lang.String.class,
459 java.lang.String.class, int.class, int.class,
460 java.lang.Integer.class, boolean.class
461 };
462 }