blob: d14713ff7b23a4d6798be7dd13c2b4e2ad0716df [file] [log] [blame]
/**********************************************************************
* Copyright (c) 2003, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
 *
* Contributors:
* IBM Corporation - Initial API and implementation
**********************************************************************/
package org.eclipse.jst.server.tomcat.core.internal;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jst.server.core.IWebModule;
/**
* Tomcat 55 handler.
*/
public class Tomcat55Handler extends Tomcat50Handler {
/**
* @see ITomcatVersionHandler#verifyInstallPath(IPath)
*/
public boolean verifyInstallPath(IPath installPath) {
if (installPath == null)
return false;
if (!TomcatPlugin.verifyTomcatVersionFromPath(installPath, TomcatPlugin.TOMCAT_55))
return false;
return TomcatPlugin.verifyInstallPath(installPath, TomcatPlugin.TOMCAT_55);
}
/**
* @see ITomcatVersionHandler#canAddModule(IWebModule)
*/
public IStatus canAddModule(IWebModule module) {
if ("1.2".equals(module.getJ2EESpecificationVersion()) || "1.3".equals(module.getJ2EESpecificationVersion()) || "1.4".equals(module.getJ2EESpecificationVersion()))
return new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, Messages.canAddModule, null);
return new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, Messages.errorSpec55, null);
}
}