Example usage for com.liferay.portal.kernel.backgroundtask BackgroundTaskManagerUtil deleteBackgroundTask

List of usage examples for com.liferay.portal.kernel.backgroundtask BackgroundTaskManagerUtil deleteBackgroundTask

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.backgroundtask BackgroundTaskManagerUtil deleteBackgroundTask.

Prototype

public static BackgroundTask deleteBackgroundTask(long backgroundTaskId) throws PortalException 

Source Link

Usage

From source file:ch.inofix.contact.service.impl.ContactServiceImpl.java

License:Open Source License

@Override
public void deleteBackgroundTask(long groupId, long backgroundTaskId) throws PortalException {

    ContactManagerPortletPermission.check(getPermissionChecker(), groupId,
            ContactManagerActionKeys.EXPORT_IMPORT_CONTACTS);

    BackgroundTaskManagerUtil.deleteBackgroundTask(backgroundTaskId);

}

From source file:ch.inofix.data.service.impl.MeasurementServiceImpl.java

License:Open Source License

@Override
public void deleteBackgroundTask(long groupId, long backgroundTaskId) throws PortalException {

    DataManagerPortletPermission.check(getPermissionChecker(), groupId,
            MeasurementActionKeys.EXPORT_IMPORT_MEASUREMENTS);

    BackgroundTaskManagerUtil.deleteBackgroundTask(backgroundTaskId);

}

From source file:com.liferay.exportimport.web.internal.portlet.action.ActionUtil.java

License:Open Source License

public static void deleteBackgroundTask(ActionRequest actionRequest) throws PortalException {

    long backgroundTaskId = ParamUtil.getLong(actionRequest, BackgroundTaskConstants.BACKGROUND_TASK_ID);

    BackgroundTaskManagerUtil.deleteBackgroundTask(backgroundTaskId);
}

From source file:com.liferay.staging.configuration.web.internal.portlet.StagingConfigurationPortlet.java

License:Open Source License

public void deleteBackgroundTask(ActionRequest actionRequest, ActionResponse actionResponse)
        throws IOException, PortalException {

    try {//from   w w w  . ja  v a  2 s. c  om
        long backgroundTaskId = ParamUtil.getLong(actionRequest, BackgroundTaskConstants.BACKGROUND_TASK_ID);

        BackgroundTaskManagerUtil.deleteBackgroundTask(backgroundTaskId);

        sendRedirect(actionRequest, actionResponse);
    } catch (Exception e) {
        if (e instanceof NoSuchBackgroundTaskException || e instanceof PrincipalException) {

            SessionErrors.add(actionRequest, e.getClass());
        } else {
            throw e;
        }
    }
}

From source file:com.liferay.staging.processes.web.internal.portlet.action.DeleteLayoutPublishBackgroundTaskMVCActionCommand.java

License:Open Source License

protected void deleteBackgroundTask(ActionRequest actionRequest) throws PortalException {

    long[] backgroundTaskIds = ParamUtil.getLongValues(actionRequest, "deleteBackgroundTaskIds");

    for (long backgroundTaskId : backgroundTaskIds) {
        BackgroundTaskManagerUtil.deleteBackgroundTask(backgroundTaskId);
    }//  w  w  w . j  a va  2  s.c o m
}