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