List of usage examples for com.liferay.portal.kernel.backgroundtask BackgroundTask getStatus
public int getStatus();
From source file:com.liferay.exportimport.internal.background.task.BaseStagingBackgroundTaskExecutor.java
License:Open Source License
protected void markBackgroundTask(long backgroundTaskId, String backgroundTaskState) { BackgroundTask backgroundTask = BackgroundTaskManagerUtil.fetchBackgroundTask(backgroundTaskId); if ((backgroundTask == null) || Validator.isNull(backgroundTaskState)) { return;//from w w w . j a v a 2 s. co m } Map<String, Serializable> taskContextMap = backgroundTask.getTaskContextMap(); if (taskContextMap == null) { taskContextMap = new HashMap<>(); } taskContextMap.put(backgroundTaskState, Boolean.TRUE); backgroundTask.setTaskContextMap(taskContextMap); BackgroundTaskManagerUtil.amendBackgroundTask(backgroundTask.getBackgroundTaskId(), taskContextMap, backgroundTask.getStatus(), new ServiceContext()); }