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