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

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

Introduction

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

Prototype

public static void shutdown(long milliseconds) 

Source Link

Usage

From source file:com.liferay.marketplace.bundle.BundleManager.java

License:Open Source License

public List<Bundle> installLPKG(File file) throws Exception {
    _lpkgVerifier.verify(file);/*from   w w  w . j a  v a  2  s  .c o  m*/

    File installFile = new File(getInstallDirName(), file.getName());

    Files.move(file.toPath(), installFile.toPath(), StandardCopyOption.REPLACE_EXISTING);

    if (isRestartRequired(installFile)) {
        ShutdownUtil.shutdown(0);

        return Collections.emptyList();
    }

    List<Bundle> bundles = _lpkgDeployer.deploy(_bundleContext, installFile);

    for (int i = 1; i < bundles.size(); i++) {
        Bundle bundle = bundles.get(i);

        bundle.start();
    }

    return bundles;
}