blob: a561a3bc975ac16d15fc9f9b2bb5b1be4a2bf827 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.j2ee.internal.archive;
import org.eclipse.core.runtime.Path;
import org.eclipse.jst.j2ee.internal.J2EEConstants;
import org.eclipse.jst.jee.archive.IArchive;
import org.eclipse.jst.jee.archive.IArchiveHandler;
public class EARComponentArchiveTypeHandler implements IArchiveHandler {
@Override
public boolean handlesArchive(IArchive archive) {
if (archive.getLoadAdapter() instanceof EARComponentArchiveLoadAdapter) {
return true;
} else if (archive.containsArchiveResource(new Path(J2EEConstants.APPLICATION_DD_URI))) {
return true;
} else {
// TODO handle the no DD case
return false;
}
}
}