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 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.getName(),
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.getName(),
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.getName(),
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.getName(),
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.lang.String className,
271 long classPK, java.lang.String classUuid, long classTypeId,
272 long[] categoryIds, java.lang.String[] tagNames, boolean visible,
273 java.util.Date startDate, java.util.Date endDate,
274 java.util.Date publishDate, 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.getName(),
283 "updateEntry", _updateEntryParameterTypes6);
284
285 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
286 className, classPK, classUuid, classTypeId, categoryIds,
287 tagNames, visible, startDate, endDate, publishDate,
288 expirationDate, mimeType, title, description, summary, url,
289 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 private static Log _log = LogFactoryUtil.getLog(AssetEntryServiceHttp.class);
318 private static final Class<?>[] _getCompanyEntriesParameterTypes0 = new Class[] {
319 long.class, int.class, int.class
320 };
321 private static final Class<?>[] _getCompanyEntriesCountParameterTypes1 = new Class[] {
322 long.class
323 };
324 private static final Class<?>[] _getEntriesParameterTypes2 = new Class[] {
325 com.liferay.portlet.asset.service.persistence.AssetEntryQuery.class
326 };
327 private static final Class<?>[] _getEntriesCountParameterTypes3 = new Class[] {
328 com.liferay.portlet.asset.service.persistence.AssetEntryQuery.class
329 };
330 private static final Class<?>[] _getEntryParameterTypes4 = new Class[] {
331 long.class
332 };
333 private static final Class<?>[] _incrementViewCounterParameterTypes5 = new Class[] {
334 java.lang.String.class, long.class
335 };
336 private static final Class<?>[] _updateEntryParameterTypes6 = new Class[] {
337 long.class, java.lang.String.class, long.class,
338 java.lang.String.class, long.class, long[].class,
339 java.lang.String[].class, boolean.class, java.util.Date.class,
340 java.util.Date.class, java.util.Date.class, java.util.Date.class,
341 java.lang.String.class, java.lang.String.class,
342 java.lang.String.class, java.lang.String.class,
343 java.lang.String.class, java.lang.String.class, int.class, int.class,
344 java.lang.Integer.class, boolean.class
345 };
346 }