Example usage for com.liferay.portal.kernel.util ServerDetector JBOSS_ID

List of usage examples for com.liferay.portal.kernel.util ServerDetector JBOSS_ID

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util ServerDetector JBOSS_ID.

Prototype

String JBOSS_ID

To view the source code for com.liferay.portal.kernel.util ServerDetector JBOSS_ID.

Click 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 w w  w.  j  a v a2s.  c o  m*/

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

    DeployUtil.undeploy(appServerType, deployDir);

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