Example usage for com.liferay.portal.deploy DeployUtil undeploy

List of usage examples for com.liferay.portal.deploy DeployUtil undeploy

Introduction

In this page you can find the example usage for com.liferay.portal.deploy DeployUtil undeploy.

Prototype

public static void undeploy(String appServerType, File deployDir) throws Exception 

Source Link

Usage

From source file:com.liferay.portlet.plugininstaller.action.InstallPluginAction.java

License:Open Source License

protected void uninstall(ActionRequest actionRequest) throws Exception {
    String appServerType = ServerDetector.getServerId();

    String deploymentContext = ParamUtil.getString(actionRequest, "deploymentContext");

    if (appServerType.startsWith(ServerDetector.JBOSS_ID)) {
        deploymentContext += ".war";
    }//from ww  w . jav a2  s. c  o  m

    File deployDir = new File(DeployUtil.getAutoDeployDestDir() + "/" + deploymentContext);

    DeployUtil.undeploy(appServerType, deployDir);

    SessionMessages.add(actionRequest, "triggeredPortletUndeploy");
}