Class BackgroundTaskManagerUtil
Object
com.liferay.portal.kernel.backgroundtask.BackgroundTaskManagerUtil
- Author:
- Michael C. Han
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BackgroundTask
addBackgroundTask
(long userId, long groupId, String name, String[] servletContextNames, Class<?> taskExecutorClass, Map<String, Serializable> taskContextMap, ServiceContext serviceContext) static BackgroundTask
addBackgroundTask
(long userId, long groupId, String name, String taskExecutorClassName, Map<String, Serializable> taskContextMap, ServiceContext serviceContext) static void
addBackgroundTaskAttachment
(long userId, long backgroundTaskId, String fileName, File file) static BackgroundTask
amendBackgroundTask
(long backgroundTaskId, Map<String, Serializable> taskContextMap, int status, ServiceContext serviceContext) static BackgroundTask
amendBackgroundTask
(long backgroundTaskId, Map<String, Serializable> taskContextMap, int status, String statusMessage, ServiceContext serviceContext) static void
cleanUpBackgroundTask
(BackgroundTask backgroundTask, int status) static void
static BackgroundTask
deleteBackgroundTask
(long backgroundTaskId) static void
deleteCompanyBackgroundTasks
(long companyId) static void
deleteGroupBackgroundTasks
(long groupId) static void
deleteGroupBackgroundTasks
(long groupId, String name, String taskExecutorClassName) static BackgroundTask
fetchBackgroundTask
(long backgroundTaskId) static BackgroundTask
fetchFirstBackgroundTask
(long groupId, String taskExecutorClassName, boolean completed, OrderByComparator<BackgroundTask> orderByComparator) static BackgroundTask
fetchFirstBackgroundTask
(String taskExecutorClassName, int status) static BackgroundTask
fetchFirstBackgroundTask
(String taskExecutorClassName, int status, OrderByComparator<BackgroundTask> orderByComparator) static BackgroundTask
getBackgroundTask
(long backgroundTaskId) static List<BackgroundTask>
getBackgroundTasks
(long[] groupIds, String taskExecutorClassName, boolean completed, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) static List<BackgroundTask>
getBackgroundTasks
(long[] groupIds, String taskExecutorClassName, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) static List<BackgroundTask>
getBackgroundTasks
(long[] groupIds, String name, String[] taskExecutorClassNames, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) static List<BackgroundTask>
getBackgroundTasks
(long[] groupIds, String name, String taskExecutorClassName, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) static List<BackgroundTask>
getBackgroundTasks
(long groupId, int status) static List<BackgroundTask>
getBackgroundTasks
(long groupId, String taskExecutorClassName) static List<BackgroundTask>
getBackgroundTasks
(long groupId, String[] taskExecutorClassNames) static List<BackgroundTask>
getBackgroundTasks
(long groupId, String[] taskExecutorClassNames, int status) static List<BackgroundTask>
getBackgroundTasks
(long groupId, String[] taskExecutorClassNames, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) static List<BackgroundTask>
getBackgroundTasks
(long groupId, String taskExecutorClassName, boolean completed, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) static List<BackgroundTask>
getBackgroundTasks
(long groupId, String taskExecutorClassName, int status) static List<BackgroundTask>
getBackgroundTasks
(long groupId, String taskExecutorClassName, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) static List<BackgroundTask>
getBackgroundTasks
(long groupId, String name, String taskExecutorClassName, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) static List<BackgroundTask>
getBackgroundTasks
(String[] taskExecutorClassNames, int status) static List<BackgroundTask>
getBackgroundTasks
(String[] taskExecutorClassNames, int status, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) static List<BackgroundTask>
getBackgroundTasks
(String taskExecutorClassName, int status) static List<BackgroundTask>
getBackgroundTasks
(String taskExecutorClassName, int status, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) static List<BackgroundTask>
getBackgroundTasksByDuration
(long[] groupIds, String[] taskExecutorClassName, boolean completed, int start, int end, boolean orderByType) static List<BackgroundTask>
getBackgroundTasksByDuration
(long[] groupIds, String[] taskExecutorClassName, int start, int end, boolean orderByType) static int
getBackgroundTasksCount
(long[] groupIds, String taskExecutorClassName) static int
getBackgroundTasksCount
(long[] groupIds, String taskExecutorClassName, boolean completed) static int
getBackgroundTasksCount
(long[] groupIds, String name, String taskExecutorClassName) static int
getBackgroundTasksCount
(long[] groupIds, String name, String[] taskExecutorClassNames) static int
getBackgroundTasksCount
(long[] groupIds, String name, String taskExecutorClassName, boolean completed) static int
getBackgroundTasksCount
(long groupId, String taskExecutorClassName) static int
getBackgroundTasksCount
(long groupId, String[] taskExecutorClassNames) static int
getBackgroundTasksCount
(long groupId, String[] taskExecutorClassNames, boolean completed) static int
getBackgroundTasksCount
(long groupId, String taskExecutorClassName, boolean completed) static int
getBackgroundTasksCount
(long groupId, String name, String taskExecutorClassName) static int
getBackgroundTasksCount
(long groupId, String name, String taskExecutorClassName, boolean completed) static String
getBackgroundTaskStatusJSON
(long backgroundTaskId) static void
resumeBackgroundTask
(long backgroundTaskId) static void
triggerBackgroundTask
(long backgroundTaskId)
-
Constructor Details
-
BackgroundTaskManagerUtil
public BackgroundTaskManagerUtil()
-
-
Method Details
-
addBackgroundTask
public static BackgroundTask addBackgroundTask(long userId, long groupId, String name, String taskExecutorClassName, Map<String, Serializable> taskContextMap, ServiceContext serviceContext) throws PortalException- Throws:
PortalException
-
addBackgroundTask
public static BackgroundTask addBackgroundTask(long userId, long groupId, String name, String[] servletContextNames, Class<?> taskExecutorClass, Map<String, Serializable> taskContextMap, ServiceContext serviceContext) throws PortalException- Throws:
PortalException
-
addBackgroundTaskAttachment
public static void addBackgroundTaskAttachment(long userId, long backgroundTaskId, String fileName, File file) throws PortalException - Throws:
PortalException
-
amendBackgroundTask
public static BackgroundTask amendBackgroundTask(long backgroundTaskId, Map<String, Serializable> taskContextMap, int status, ServiceContext serviceContext) -
amendBackgroundTask
public static BackgroundTask amendBackgroundTask(long backgroundTaskId, Map<String, Serializable> taskContextMap, int status, String statusMessage, ServiceContext serviceContext) -
cleanUpBackgroundTask
-
cleanUpBackgroundTasks
public static void cleanUpBackgroundTasks() -
deleteBackgroundTask
- Throws:
PortalException
-
deleteCompanyBackgroundTasks
- Throws:
PortalException
-
deleteGroupBackgroundTasks
- Throws:
PortalException
-
deleteGroupBackgroundTasks
public static void deleteGroupBackgroundTasks(long groupId, String name, String taskExecutorClassName) throws PortalException - Throws:
PortalException
-
fetchBackgroundTask
-
fetchFirstBackgroundTask
public static BackgroundTask fetchFirstBackgroundTask(long groupId, String taskExecutorClassName, boolean completed, OrderByComparator<BackgroundTask> orderByComparator) -
fetchFirstBackgroundTask
-
fetchFirstBackgroundTask
public static BackgroundTask fetchFirstBackgroundTask(String taskExecutorClassName, int status, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTask
- Throws:
PortalException
-
getBackgroundTasks
-
getBackgroundTasks
-
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long groupId, String taskExecutorClassName, boolean completed, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long groupId, String taskExecutorClassName, int status) -
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long groupId, String taskExecutorClassName, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long groupId, String name, String taskExecutorClassName, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long groupId, String[] taskExecutorClassNames) -
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long groupId, String[] taskExecutorClassNames, int status) -
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long groupId, String[] taskExecutorClassNames, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long[] groupIds, String taskExecutorClassName, boolean completed, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long[] groupIds, String taskExecutorClassName, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long[] groupIds, String name, String taskExecutorClassName, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(long[] groupIds, String name, String[] taskExecutorClassNames, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTasks
-
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(String taskExecutorClassName, int status, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTasks
-
getBackgroundTasks
public static List<BackgroundTask> getBackgroundTasks(String[] taskExecutorClassNames, int status, int start, int end, OrderByComparator<BackgroundTask> orderByComparator) -
getBackgroundTasksByDuration
public static List<BackgroundTask> getBackgroundTasksByDuration(long[] groupIds, String[] taskExecutorClassName, boolean completed, int start, int end, boolean orderByType) -
getBackgroundTasksByDuration
public static List<BackgroundTask> getBackgroundTasksByDuration(long[] groupIds, String[] taskExecutorClassName, int start, int end, boolean orderByType) -
getBackgroundTasksCount
-
getBackgroundTasksCount
public static int getBackgroundTasksCount(long groupId, String taskExecutorClassName, boolean completed) -
getBackgroundTasksCount
-
getBackgroundTasksCount
-
getBackgroundTasksCount
-
getBackgroundTasksCount
public static int getBackgroundTasksCount(long groupId, String[] taskExecutorClassNames, boolean completed) -
getBackgroundTasksCount
-
getBackgroundTasksCount
public static int getBackgroundTasksCount(long[] groupIds, String taskExecutorClassName, boolean completed) -
getBackgroundTasksCount
-
getBackgroundTasksCount
-
getBackgroundTasksCount
-
getBackgroundTaskStatusJSON
-
resumeBackgroundTask
public static void resumeBackgroundTask(long backgroundTaskId) -
triggerBackgroundTask
public static void triggerBackgroundTask(long backgroundTaskId)
-