001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
034 public class BackgroundTaskLocalServiceUtil {
035
040
041
048 public static com.liferay.portal.model.BackgroundTask addBackgroundTask(
049 com.liferay.portal.model.BackgroundTask backgroundTask)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addBackgroundTask(backgroundTask);
052 }
053
054
060 public static com.liferay.portal.model.BackgroundTask createBackgroundTask(
061 long backgroundTaskId) {
062 return getService().createBackgroundTask(backgroundTaskId);
063 }
064
065
073 public static com.liferay.portal.model.BackgroundTask deleteBackgroundTask(
074 long backgroundTaskId)
075 throws com.liferay.portal.kernel.exception.PortalException,
076 com.liferay.portal.kernel.exception.SystemException {
077 return getService().deleteBackgroundTask(backgroundTaskId);
078 }
079
080
088 public static com.liferay.portal.model.BackgroundTask deleteBackgroundTask(
089 com.liferay.portal.model.BackgroundTask backgroundTask)
090 throws com.liferay.portal.kernel.exception.PortalException,
091 com.liferay.portal.kernel.exception.SystemException {
092 return getService().deleteBackgroundTask(backgroundTask);
093 }
094
095 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
096 return getService().dynamicQuery();
097 }
098
099
106 @SuppressWarnings("rawtypes")
107 public static java.util.List dynamicQuery(
108 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
109 throws com.liferay.portal.kernel.exception.SystemException {
110 return getService().dynamicQuery(dynamicQuery);
111 }
112
113
126 @SuppressWarnings("rawtypes")
127 public static java.util.List dynamicQuery(
128 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
129 int end) throws com.liferay.portal.kernel.exception.SystemException {
130 return getService().dynamicQuery(dynamicQuery, start, end);
131 }
132
133
147 @SuppressWarnings("rawtypes")
148 public static java.util.List dynamicQuery(
149 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
150 int end,
151 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152 throws com.liferay.portal.kernel.exception.SystemException {
153 return getService()
154 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
155 }
156
157
164 public static long dynamicQueryCount(
165 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
166 throws com.liferay.portal.kernel.exception.SystemException {
167 return getService().dynamicQueryCount(dynamicQuery);
168 }
169
170
178 public static long dynamicQueryCount(
179 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
180 com.liferay.portal.kernel.dao.orm.Projection projection)
181 throws com.liferay.portal.kernel.exception.SystemException {
182 return getService().dynamicQueryCount(dynamicQuery, projection);
183 }
184
185 public static com.liferay.portal.model.BackgroundTask fetchBackgroundTask(
186 long backgroundTaskId)
187 throws com.liferay.portal.kernel.exception.SystemException {
188 return getService().fetchBackgroundTask(backgroundTaskId);
189 }
190
191
199 public static com.liferay.portal.model.BackgroundTask getBackgroundTask(
200 long backgroundTaskId)
201 throws com.liferay.portal.kernel.exception.PortalException,
202 com.liferay.portal.kernel.exception.SystemException {
203 return getService().getBackgroundTask(backgroundTaskId);
204 }
205
206 public static com.liferay.portal.model.PersistedModel getPersistedModel(
207 java.io.Serializable primaryKeyObj)
208 throws com.liferay.portal.kernel.exception.PortalException,
209 com.liferay.portal.kernel.exception.SystemException {
210 return getService().getPersistedModel(primaryKeyObj);
211 }
212
213
225 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
226 int start, int end)
227 throws com.liferay.portal.kernel.exception.SystemException {
228 return getService().getBackgroundTasks(start, end);
229 }
230
231
237 public static int getBackgroundTasksCount()
238 throws com.liferay.portal.kernel.exception.SystemException {
239 return getService().getBackgroundTasksCount();
240 }
241
242
249 public static com.liferay.portal.model.BackgroundTask updateBackgroundTask(
250 com.liferay.portal.model.BackgroundTask backgroundTask)
251 throws com.liferay.portal.kernel.exception.SystemException {
252 return getService().updateBackgroundTask(backgroundTask);
253 }
254
255
260 public static java.lang.String getBeanIdentifier() {
261 return getService().getBeanIdentifier();
262 }
263
264
269 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
270 getService().setBeanIdentifier(beanIdentifier);
271 }
272
273 public static com.liferay.portal.model.BackgroundTask addBackgroundTask(
274 long userId, long groupId, java.lang.String name,
275 java.lang.String[] servletContextNames,
276 java.lang.Class<?> taskExecutorClass,
277 java.util.Map<java.lang.String, java.io.Serializable> taskContextMap,
278 com.liferay.portal.service.ServiceContext serviceContext)
279 throws com.liferay.portal.kernel.exception.PortalException,
280 com.liferay.portal.kernel.exception.SystemException {
281 return getService()
282 .addBackgroundTask(userId, groupId, name,
283 servletContextNames, taskExecutorClass, taskContextMap,
284 serviceContext);
285 }
286
287 public static void addBackgroundTaskAttachment(long userId,
288 long backgroundTaskId, java.lang.String fileName, java.io.File file)
289 throws com.liferay.portal.kernel.exception.PortalException,
290 com.liferay.portal.kernel.exception.SystemException {
291 getService()
292 .addBackgroundTaskAttachment(userId, backgroundTaskId, fileName,
293 file);
294 }
295
296 public static void addBackgroundTaskAttachment(long userId,
297 long backgroundTaskId, java.lang.String fileName,
298 java.io.InputStream inputStream)
299 throws com.liferay.portal.kernel.exception.PortalException,
300 com.liferay.portal.kernel.exception.SystemException {
301 getService()
302 .addBackgroundTaskAttachment(userId, backgroundTaskId, fileName,
303 inputStream);
304 }
305
306 public static com.liferay.portal.model.BackgroundTask amendBackgroundTask(
307 long backgroundTaskId,
308 java.util.Map<java.lang.String, java.io.Serializable> taskContextMap,
309 int status, com.liferay.portal.service.ServiceContext serviceContext)
310 throws com.liferay.portal.kernel.exception.SystemException {
311 return getService()
312 .amendBackgroundTask(backgroundTaskId, taskContextMap,
313 status, serviceContext);
314 }
315
316 public static com.liferay.portal.model.BackgroundTask amendBackgroundTask(
317 long backgroundTaskId,
318 java.util.Map<java.lang.String, java.io.Serializable> taskContextMap,
319 int status, java.lang.String statusMessage,
320 com.liferay.portal.service.ServiceContext serviceContext)
321 throws com.liferay.portal.kernel.exception.SystemException {
322 return getService()
323 .amendBackgroundTask(backgroundTaskId, taskContextMap,
324 status, statusMessage, serviceContext);
325 }
326
327 public static void cleanUpBackgroundTask(
328 com.liferay.portal.model.BackgroundTask backgroundTask, int status) {
329 getService().cleanUpBackgroundTask(backgroundTask, status);
330 }
331
332 public static void cleanUpBackgroundTasks()
333 throws com.liferay.portal.kernel.exception.SystemException {
334 getService().cleanUpBackgroundTasks();
335 }
336
337 public static void deleteCompanyBackgroundTasks(long companyId)
338 throws com.liferay.portal.kernel.exception.PortalException,
339 com.liferay.portal.kernel.exception.SystemException {
340 getService().deleteCompanyBackgroundTasks(companyId);
341 }
342
343 public static void deleteGroupBackgroundTasks(long groupId)
344 throws com.liferay.portal.kernel.exception.PortalException,
345 com.liferay.portal.kernel.exception.SystemException {
346 getService().deleteGroupBackgroundTasks(groupId);
347 }
348
349 public static com.liferay.portal.model.BackgroundTask fetchFirstBackgroundTask(
350 java.lang.String taskExecutorClassName, int status)
351 throws com.liferay.portal.kernel.exception.SystemException {
352 return getService()
353 .fetchFirstBackgroundTask(taskExecutorClassName, status);
354 }
355
356 public static com.liferay.portal.model.BackgroundTask fetchFirstBackgroundTask(
357 java.lang.String taskExecutorClassName, int status,
358 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
359 throws com.liferay.portal.kernel.exception.SystemException {
360 return getService()
361 .fetchFirstBackgroundTask(taskExecutorClassName, status,
362 orderByComparator);
363 }
364
365 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
366 long groupId, int status)
367 throws com.liferay.portal.kernel.exception.SystemException {
368 return getService().getBackgroundTasks(groupId, status);
369 }
370
371 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
372 long groupId, java.lang.String taskExecutorClassName)
373 throws com.liferay.portal.kernel.exception.SystemException {
374 return getService().getBackgroundTasks(groupId, taskExecutorClassName);
375 }
376
377 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
378 long groupId, java.lang.String taskExecutorClassName, int status)
379 throws com.liferay.portal.kernel.exception.SystemException {
380 return getService()
381 .getBackgroundTasks(groupId, taskExecutorClassName, status);
382 }
383
384 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
385 long groupId, java.lang.String taskExecutorClassName, int start,
386 int end,
387 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
388 throws com.liferay.portal.kernel.exception.SystemException {
389 return getService()
390 .getBackgroundTasks(groupId, taskExecutorClassName, start,
391 end, orderByComparator);
392 }
393
394 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
395 long groupId, java.lang.String name,
396 java.lang.String taskExecutorClassName, int start, int end,
397 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
398 throws com.liferay.portal.kernel.exception.SystemException {
399 return getService()
400 .getBackgroundTasks(groupId, name, taskExecutorClassName,
401 start, end, orderByComparator);
402 }
403
404 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
405 long groupId, java.lang.String[] taskExecutorClassNames)
406 throws com.liferay.portal.kernel.exception.SystemException {
407 return getService().getBackgroundTasks(groupId, taskExecutorClassNames);
408 }
409
410 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
411 long groupId, java.lang.String[] taskExecutorClassNames, int status)
412 throws com.liferay.portal.kernel.exception.SystemException {
413 return getService()
414 .getBackgroundTasks(groupId, taskExecutorClassNames, status);
415 }
416
417 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
418 long groupId, java.lang.String[] taskExecutorClassNames, int start,
419 int end,
420 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
421 throws com.liferay.portal.kernel.exception.SystemException {
422 return getService()
423 .getBackgroundTasks(groupId, taskExecutorClassNames, start,
424 end, orderByComparator);
425 }
426
427 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
428 java.lang.String taskExecutorClassName, int status)
429 throws com.liferay.portal.kernel.exception.SystemException {
430 return getService().getBackgroundTasks(taskExecutorClassName, status);
431 }
432
433 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
434 java.lang.String taskExecutorClassName, int status, int start, int end,
435 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
436 throws com.liferay.portal.kernel.exception.SystemException {
437 return getService()
438 .getBackgroundTasks(taskExecutorClassName, status, start,
439 end, orderByComparator);
440 }
441
442 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
443 java.lang.String[] taskExecutorClassNames, int status)
444 throws com.liferay.portal.kernel.exception.SystemException {
445 return getService().getBackgroundTasks(taskExecutorClassNames, status);
446 }
447
448 public static java.util.List<com.liferay.portal.model.BackgroundTask> getBackgroundTasks(
449 java.lang.String[] taskExecutorClassNames, int status, int start,
450 int end,
451 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
452 throws com.liferay.portal.kernel.exception.SystemException {
453 return getService()
454 .getBackgroundTasks(taskExecutorClassNames, status, start,
455 end, orderByComparator);
456 }
457
458 public static int getBackgroundTasksCount(long groupId,
459 java.lang.String taskExecutorClassName)
460 throws com.liferay.portal.kernel.exception.SystemException {
461 return getService()
462 .getBackgroundTasksCount(groupId, taskExecutorClassName);
463 }
464
465 public static int getBackgroundTasksCount(long groupId,
466 java.lang.String taskExecutorClassName, boolean completed)
467 throws com.liferay.portal.kernel.exception.SystemException {
468 return getService()
469 .getBackgroundTasksCount(groupId, taskExecutorClassName,
470 completed);
471 }
472
473 public static int getBackgroundTasksCount(long groupId,
474 java.lang.String name, java.lang.String taskExecutorClassName)
475 throws com.liferay.portal.kernel.exception.SystemException {
476 return getService()
477 .getBackgroundTasksCount(groupId, name, taskExecutorClassName);
478 }
479
480 public static int getBackgroundTasksCount(long groupId,
481 java.lang.String name, java.lang.String taskExecutorClassName,
482 boolean completed)
483 throws com.liferay.portal.kernel.exception.SystemException {
484 return getService()
485 .getBackgroundTasksCount(groupId, name,
486 taskExecutorClassName, completed);
487 }
488
489 public static int getBackgroundTasksCount(long groupId,
490 java.lang.String[] taskExecutorClassNames)
491 throws com.liferay.portal.kernel.exception.SystemException {
492 return getService()
493 .getBackgroundTasksCount(groupId, taskExecutorClassNames);
494 }
495
496 public static int getBackgroundTasksCount(long groupId,
497 java.lang.String[] taskExecutorClassNames, boolean completed)
498 throws com.liferay.portal.kernel.exception.SystemException {
499 return getService()
500 .getBackgroundTasksCount(groupId, taskExecutorClassNames,
501 completed);
502 }
503
504 public static java.lang.String getBackgroundTaskStatusJSON(
505 long backgroundTaskId) {
506 return getService().getBackgroundTaskStatusJSON(backgroundTaskId);
507 }
508
509 public static void resumeBackgroundTask(long backgroundTaskId)
510 throws com.liferay.portal.kernel.exception.SystemException {
511 getService().resumeBackgroundTask(backgroundTaskId);
512 }
513
514 public static void triggerBackgroundTask(long backgroundTaskId) {
515 getService().triggerBackgroundTask(backgroundTaskId);
516 }
517
518 public static BackgroundTaskLocalService getService() {
519 if (_service == null) {
520 _service = (BackgroundTaskLocalService)PortalBeanLocatorUtil.locate(BackgroundTaskLocalService.class.getName());
521
522 ReferenceRegistry.registerReference(BackgroundTaskLocalServiceUtil.class,
523 "_service");
524 }
525
526 return _service;
527 }
528
529
532 public void setService(BackgroundTaskLocalService service) {
533 }
534
535 private static BackgroundTaskLocalService _service;
536 }