Example usage for com.liferay.portal.util ShutdownUtil cancel

List of usage examples for com.liferay.portal.util ShutdownUtil cancel

Introduction

In this page you can find the example usage for com.liferay.portal.util ShutdownUtil cancel.

Prototype

public static void cancel() 

Source Link

Usage

From source file:com.liferay.portlet.admin.action.EditServerAction.java

License:Open Source License

protected void shutdown(ActionRequest actionRequest) throws Exception {
    long minutes = ParamUtil.getInteger(actionRequest, "minutes") * Time.MINUTE;
    String message = ParamUtil.getString(actionRequest, "message");

    if (minutes <= 0) {
        ShutdownUtil.cancel();
    } else {//from  www .  j a v  a 2 s .c om
        ShutdownUtil.shutdown(minutes, message);
    }
}

From source file:com.liferay.portlet.admin.action.ServerAction.java

License:Open Source License

private void _shutdown(ActionRequest req) throws Exception {
    long minutes = ParamUtil.getInteger(req, "shutdown_minutes") * Time.MINUTE;
    String message = ParamUtil.getString(req, "shutdown_message");

    if (minutes <= 0) {
        ShutdownUtil.cancel();
    } else {/*from  w  w  w  .  j  av a 2 s  .c om*/
        ShutdownUtil.shutdown(minutes, message);
    }
}

From source file:com.liferay.server.admin.web.internal.portlet.action.EditServerMVCActionCommand.java

License:Open Source License

protected void shutdown(ActionRequest actionRequest) throws Exception {
    if (ShutdownUtil.isInProcess()) {
        ShutdownUtil.cancel();
    } else {//from  w w w . jav a2 s. co  m
        long minutes = ParamUtil.getInteger(actionRequest, "minutes") * Time.MINUTE;

        if (minutes <= 0) {
            SessionErrors.add(actionRequest, "shutdownMinutes");
        } else {
            String message = ParamUtil.getString(actionRequest, "message");

            ShutdownUtil.shutdown(minutes, message);
        }
    }
}