Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations')
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientArchiveOpsResourceHandler.java53
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentExportOperation.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentImportOperation.java26
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentLoadStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentSaveStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentLoadStrategyImpl.java267
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentSaveStrategyImpl.java145
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ConnectorComponentSaveStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/DependentJarExportMerger.java127
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARArchiveOpsResourceHandler.java63
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentExportOperation.java54
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentImportOperation.java175
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentLoadStrategyImpl.java80
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentSaveStrategyImpl.java238
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EJBArchiveOpsResourceHandler.java53
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EJBComponentSaveStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/IJ2EEImportExportConstants.java25
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/IOverwriteHandler.java142
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ImportOption.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEArtifactExportOperation.java170
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEArtifactImportOperation.java141
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEComponentSaveStrategyImpl.java51
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEImportConstants.java27
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEJavaComponentSaveStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategy.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategyImpl.java393
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentCreationDataModelProvider.java153
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentLoadStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentSaveStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/OverwriteHandlerException.java37
30 files changed, 0 insertions, 2724 deletions
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientArchiveOpsResourceHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientArchiveOpsResourceHandler.java
deleted file mode 100644
index b60a93985..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientArchiveOpsResourceHandler.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class AppClientArchiveOpsResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("appclientarchiveops");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public static void nlsConcatenationFinder() {
- // used to tag methods which have concatenated strings
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentExportOperation.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentExportOperation.java
deleted file mode 100644
index 5040f3340..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentExportOperation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004, 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.j2ee.internal.archive.operations;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchivePackage;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class AppClientComponentExportOperation extends J2EEArtifactExportOperation {
-
- public AppClientComponentExportOperation(IDataModel model) {
- super(model);
- }
-
- public void export() throws SaveFailureException, CoreException, InvocationTargetException, InterruptedException {
- try {
- CommonarchiveFactory caf = ((CommonarchivePackage) EPackage.Registry.INSTANCE.getEPackage(CommonarchivePackage.eNS_URI)).getCommonarchiveFactory();
- AppClientComponentLoadStrategyImpl ls = new AppClientComponentLoadStrategyImpl(getComponent());
- ls.setExportSource(isExportSource());
- setModuleFile(caf.openApplicationClientFile(ls, getDestinationPath().toOSString()));
- getModuleFile().saveAsNoReopen(getDestinationPath().toOSString());
- } catch (SaveFailureException ex) {
- throw ex;
- } catch (Exception e) {
- throw new SaveFailureException(AppClientArchiveOpsResourceHandler.getString("ARCHIVE_OPERATION_OpeningArchive"), e);//$NON-NLS-1$
- }
- }
-
- protected String archiveString() {
- return AppClientArchiveOpsResourceHandler.getString("Application_Client_File_UI_"); //$NON-NLS-1$ = "Application Client File"
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentImportOperation.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentImportOperation.java
deleted file mode 100644
index 2d147f4f2..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentImportOperation.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.SaveStrategy;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class AppClientComponentImportOperation extends J2EEArtifactImportOperation {
-
- public AppClientComponentImportOperation(IDataModel model) {
- super(model);
- }
-
- protected SaveStrategy createSaveStrategy(IVirtualComponent virtualComponent) {
- AppClientComponentSaveStrategyImpl saveStrat = new AppClientComponentSaveStrategyImpl(virtualComponent);
- return saveStrat;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentLoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentLoadStrategyImpl.java
deleted file mode 100644
index 953444498..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentLoadStrategyImpl.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class AppClientComponentLoadStrategyImpl extends ComponentLoadStrategyImpl {
-
- public AppClientComponentLoadStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentSaveStrategyImpl.java
deleted file mode 100644
index 7c769bd1e..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class AppClientComponentSaveStrategyImpl extends J2EEComponentSaveStrategyImpl {
-
- public AppClientComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentLoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentLoadStrategyImpl.java
deleted file mode 100644
index 887f3c0a7..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentLoadStrategyImpl.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jst.common.componentcore.util.ComponentUtilities;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ResourceLoadException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategyImpl;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.impl.ModuleURIUtil;
-import org.eclipse.wst.common.componentcore.internal.impl.PlatformURLModuleConnection;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualContainer;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-
-public abstract class ComponentLoadStrategyImpl extends LoadStrategyImpl {
-
- protected IVirtualComponent vComponent;
- protected boolean exportSource;
- protected ArrayList filesList;
- protected Set visitedURIs;
- private int javaOutputFolderSegmentCount;
- private IFolder[] outputFolders;
-
- public ComponentLoadStrategyImpl(IVirtualComponent vComponent) {
- this.vComponent = vComponent;
- filesList = new ArrayList();
- }
-
- public boolean contains(String uri) {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- return rootFolder.getFile(new Path(uri)).exists();
- }
-
- protected void initializeResourceSet() {
- resourceSet = WorkbenchResourceHelper.getResourceSet(vComponent.getProject());
- }
-
- protected boolean primContains(String uri) {
- return false;
- }
-
- public List getFiles() {
- filesList.clear();
- try {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualResource[] members = rootFolder.members();
- filesList = getFiles(members);
- IPackageFragmentRoot[] roots = ComponentUtilities.getSourceContainers(vComponent);
- outputFolders = new IFolder[roots.length];
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
- for (int i = 0; i < roots.length; i++) {
- IResource source;
- IPath outputPath = roots[i].getRawClasspathEntry().getOutputLocation();
-
- if( outputPath != null ){
- outputFolders[i] = ResourcesPlugin.getWorkspace().getRoot().getFolder(outputPath);
-
- IPath sourcePath = roots[i].getPath();
-
- if( sourcePath.segmentCount() > 1 )
- source = workspaceRoot.getFolder(sourcePath);
- else
- source = getComponent().getProject();
- IVirtualResource[] virtualSources = ComponentCore.createResources(source);
- IResource actualResource = virtualSources[0].getUnderlyingResource();
- int sourceOffset = actualResource.getProjectRelativePath().segmentCount() - sourcePath.segmentCount();
- int runtimeOffset = outputPath.segmentCount() - virtualSources[0].getRuntimePath().segmentCount();
-
- javaOutputFolderSegmentCount = sourceOffset + runtimeOffset;
-
- getFiles(new IResource[]{outputFolders[i]});
- }
-
- }
-
-
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- return filesList;
- }
-
- protected ArrayList getFiles(IResource[] resources) throws CoreException {
- for (int i = 0; i < resources.length; i++) {
- File cFile = null;
- if (resources[i].getType() == IResource.FILE) {
- // We have to avoid duplicates between the source and output folders (non-java
- // resources)
- IPath runtimePath = resources[i].getProjectRelativePath().removeFirstSegments(javaOutputFolderSegmentCount);
- String uri = runtimePath == null ? null : runtimePath.toString();
- if (uri == null)
- continue;
- if (!shouldInclude(uri)) //$NON-NLS-1$
- continue;
- if (getVisitedURIs().contains(uri))
- continue;
- cFile = createFile(uri);
- cFile.setLastModified(getLastModified(resources[i]));
- getVisitedURIs().add(uri);
- getURIResourceMap().put(uri, resources[i]);
- filesList.add(cFile);
- } else if (shouldInclude((IContainer) resources[i])) {
- IResource[] nestedResources = ((IContainer) resources[i]).members();
- getFiles(nestedResources);
- }
- }
- return filesList;
- }
-
- protected java.util.ArrayList getFiles(IVirtualResource[] virtualResources) throws CoreException {
- for (int i = 0; i < virtualResources.length; i++) {
- File cFile = null;
- if (virtualResources[i].getType() == IVirtualResource.FILE) {
- // We have to avoid duplicates between the source and output folders (non-java
- // resources)
- IPath runtimePath = virtualResources[i].getRuntimePath();
- String uri = runtimePath == null ? null : runtimePath.toString();
- if (uri == null)
- continue;
- if (!shouldInclude(uri)) //$NON-NLS-1$
- continue;
- if (getVisitedURIs().contains(uri))
- continue;
- if (uri.charAt(0) == Path.SEPARATOR) {
- uri = uri.substring(1);
- }
- cFile = createFile(uri);
- cFile.setLastModified(getLastModified(virtualResources[i].getUnderlyingResource()));
- getVisitedURIs().add(uri);
- filesList.add(cFile);
- } else if (shouldInclude((IVirtualContainer) virtualResources[i])) {
- IVirtualResource[] nestedVirtualResources = ((IVirtualContainer) virtualResources[i]).members();
- getFiles(nestedVirtualResources);
- }
- }
- return filesList;
- }
-
- protected long getLastModified(IResource aResource) {
- return aResource.getLocation().toFile().lastModified();
- }
-
- private Map uriResourceMap;
-
- private Map getURIResourceMap() {
- if (uriResourceMap == null) {
- uriResourceMap = new HashMap();
- }
- return uriResourceMap;
- }
-
- public Set getVisitedURIs() {
- if (visitedURIs == null)
- visitedURIs = new HashSet();
- return visitedURIs;
- }
-
- public void setExportSource(boolean newExportSource) {
- exportSource = newExportSource;
- }
-
- public boolean isExportSource() {
- return exportSource;
- }
-
- protected boolean shouldInclude(IContainer container) {
- return true;
- }
-
- protected boolean shouldInclude(IVirtualContainer vContainer) {
- return true;
- }
-
- protected boolean shouldInclude(String uri) {
- return isExportSource() || !isSource(uri);
- }
-
- protected boolean isSource(String uri) {
- if (uri == null)
- return false;
- return uri.endsWith(ArchiveUtil.DOT_JAVA) || uri.endsWith(ArchiveUtil.DOT_SQLJ);
- }
-
- public InputStream getInputStream(String uri) throws IOException, FileNotFoundException {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualResource vResource = rootFolder.findMember(uri);
- String filePath = null;
- if (null != vResource && vResource.exists()) {
- filePath = vResource.getUnderlyingResource().getLocation().toOSString();
- } else {
- IResource resource = (IResource) getURIResourceMap().get(uri);
- if (null == resource) {
- String eString = EARArchiveOpsResourceHandler.getString("ARCHIVE_OPERATION_FileNotFound");//$NON-NLS-1$
- throw new FileNotFoundException(eString);
- }
- filePath = resource.getLocation().toOSString();
- }
- java.io.File file = new java.io.File(filePath);
- InputStream inputStream = new FileInputStream(file);
- return inputStream;
-
- }
-
- public Resource getMofResource(String uri) throws FileNotFoundException, ResourceLoadException {
- try {
- URI compUri = ModuleURIUtil.fullyQualifyURI(vComponent.getComponentHandle());
- IPath requestPath = new Path(compUri.path()).append(new Path(uri));
- URI resourceURI = URI.createURI(PlatformURLModuleConnection.MODULE_PROTOCOL + requestPath.toString());
- return getResourceSet().getResource(resourceURI, true);
- } catch (WrappedException wrapEx) {
- if ((ExtendedEcoreUtil.getFileNotFoundDetector().isFileNotFound(wrapEx))) {
- FileNotFoundException fileNotFoundEx = ExtendedEcoreUtil.getInnerFileNotFoundException(wrapEx);
- throw fileNotFoundEx;
- }
- throwResourceLoadException(uri, wrapEx);
- return null; // never happens - compiler expects it though
- }
-
- }
-
- public boolean isClassLoaderNeeded() {
- return false;
- }
-
- public IVirtualComponent getComponent() {
- return vComponent;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentSaveStrategyImpl.java
deleted file mode 100644
index e2c7852b9..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.SaveStrategy;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.SaveStrategyImpl;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public abstract class ComponentSaveStrategyImpl extends SaveStrategyImpl {
-
- protected IDataModel dataModel;
- protected IVirtualComponent vComponent;
- protected IOverwriteHandler overwriteHandler;
- protected IProgressMonitor progressMonitor;
-
- public ComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super();
- if(null == vComponent){
- throw new NullPointerException();
- }
- this.vComponent = vComponent;
- }
-
- public void setDataModel(IDataModel dataModel){
- this.dataModel = dataModel;
- }
-
- public void setOverwriteHandler(IOverwriteHandler newOverwriteHandler) {
- overwriteHandler = newOverwriteHandler;
- }
-
- public void setProgressMonitor(IProgressMonitor newProgressMonitor) {
- progressMonitor = newProgressMonitor;
- }
-
- protected void validateEdit(IFile aFile) {
- if (overwriteHandler == null)
- return;
- if (!(aFile.exists() && aFile.isReadOnly()))
- return;
-
- overwriteHandler.validateEdit(aFile);
- }
-
- protected boolean shouldOverwrite(String uri) {
- if (overwriteHandler.isOverwriteNone())
- return false;
- return (overwriteHandler.isOverwriteResources() || overwriteHandler.isOverwriteAll() || overwriteHandler.shouldOverwrite(uri));
- }
-
- protected SaveStrategy createNestedSaveStrategy(Archive anArchive) throws IOException {
- return null;
- }
-
- protected OutputStream getOutputStreamForResource(Resource aResource) throws IOException {
- // this method has no references in the hirarchy
- return null;
- }
-
- public void save(File aFile, InputStream in) throws SaveFailureException {
- try {
- String displayString = EJBArchiveOpsResourceHandler.getString("IMPORT_OPERATION_STRING"); //$NON-NLS-1$
- progressMonitor.subTask(displayString + aFile.getURI());
- IPath path = new Path(aFile.getURI().toString());
- saveToOutputPath(path, in);
- } catch (OverwriteHandlerException ohe) {
- throw ohe;
- } catch (Exception e) {
- String errorString = EJBArchiveOpsResourceHandler.getString("ARCHIVE_OPERATION_SaveFile") + aFile.getName(); //$NON-NLS-1$
- throw new SaveFailureException(errorString, e);
- }
- }
-
- protected void saveToWorkbenchPath(IPath workbenchPath, InputStream in) throws Exception {
- IFile iFile = ResourcesPlugin.getWorkspace().getRoot().getFile(workbenchPath);
- //IFile iFile = vComponent.getProject().getFile(workbenchPath);
- saveToIFile(iFile, in);
- }
-
- /**
- * Saves to the specified output path. The workbench path is computed from the output path.
- *
- * @param outputPath
- * @param in
- * @throws Exception
- */
- protected void saveToOutputPath(IPath outputPath, InputStream in) throws Exception {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualFile vFile = rootFolder.getFile(outputPath);
- IFile iFile = vFile.getUnderlyingFile();
- saveToIFile(iFile, in);
- }
-
- protected void saveToIFile(IFile iFile, InputStream in) throws Exception {
- validateEdit(iFile);
- if (iFile.exists())
- iFile.setContents(in, true, true, null);
- else {
- mkdirs(iFile.getFullPath().removeLastSegments(1), ResourcesPlugin.getWorkspace().getRoot());
- iFile.create(in, true, null);
- }
- }
-
-
- protected void mkdirs(IPath path, IWorkspaceRoot root) throws CoreException {
- if (path.segmentCount() <= 1)
- return;
- IFolder folder = root.getFolder(path);
- if (!folder.exists()) {
- mkdirs(path.removeLastSegments(1), root);
- folder.create(true, true, null);
- }
- }
-
- public void save(ArchiveManifest aManifest) throws SaveFailureException {
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ConnectorComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ConnectorComponentSaveStrategyImpl.java
deleted file mode 100644
index f0c4e7ae0..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ConnectorComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class ConnectorComponentSaveStrategyImpl extends J2EEComponentSaveStrategyImpl {
-
- public ConnectorComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/DependentJarExportMerger.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/DependentJarExportMerger.java
deleted file mode 100644
index 10fa31740..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/DependentJarExportMerger.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.jar.Attributes;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchivePackage;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DuplicateObjectException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveConstants;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
-
-public class DependentJarExportMerger {
- protected Archive outgoingArchive;
- protected IProject project;
- protected List dependentArchives;
- protected boolean includeSource;
-
- /**
- * DependentJarExportMerger constructor comment.
- */
- public DependentJarExportMerger(Archive archive, IProject aProject, boolean includeSourceFiles) {
- super();
- outgoingArchive = archive;
- project = aProject;
- includeSource = includeSourceFiles;
- }
-
- protected void finalize() throws Throwable {
- release();
- }
-
- public CommonarchiveFactory getArchiveFactory() {
- return CommonarchivePackage.eINSTANCE.getCommonarchiveFactory();
- }
-
- public void merge() {
- String[] cp = outgoingArchive.getManifest().getClassPathTokenized();
- dependentArchives = new ArrayList(cp.length);
- List keepClassPaths = new ArrayList();
- for (int i = 0; i < cp.length; i++) {
- Archive dependentJar = null;
- IFile file = null;
- try {
- file = project.getFile(cp[i]);
- } catch (IllegalArgumentException e) {
- continue;
- }
- if (file.exists() && cp[i].endsWith(J2EEImportConstants.IMPORTED_JAR_SUFFIX)) {
- try {
- dependentJar = getArchiveFactory().primOpenArchive(file.getLocation().toOSString());
- } catch (OpenFailureException ex) {
- // Need to write this to the log file
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex);
- continue;
- }
- dependentArchives.add(dependentJar);
- mergeFiles(dependentJar);
- } else
- keepClassPaths.add(cp[i]);
- }
- resetClassPath(keepClassPaths);
- }
-
- protected void mergeFiles(Archive dependentJar) {
- List files = dependentJar.getFiles();
- List filesToAdd = new java.util.ArrayList();
- for (int i = 0; i < files.size(); i++) {
- File aFile = (File) files.get(i);
- if (shouldMerge(aFile))
- filesToAdd.add(aFile);
- }
- try {
- outgoingArchive.addCopyFiles(filesToAdd);
- } catch (DuplicateObjectException ignore) {
- // Shouldn't happen because we just checked for dups
- }
- }
-
- /**
- * Clients must call this when done to close the archives
- */
- public void release() {
- if (dependentArchives == null)
- return;
- for (int i = 0; i < dependentArchives.size(); i++) {
- Archive anArchive = (Archive) dependentArchives.get(i);
- if (anArchive.isOpen())
- anArchive.close();
- }
- }
-
- protected void resetClassPath(List cp) {
- ArchiveManifest mf = outgoingArchive.getManifest();
- if (cp.isEmpty())
- mf.getMainAttributes().remove(Attributes.Name.CLASS_PATH);
- else {
- mf.setClassPath("");//$NON-NLS-1$
- for (int i = 0; i < cp.size(); i++) {
- mf.appendClassPath((String) cp.get(i));
- }
- }
- }
-
- protected boolean shouldMerge(File aFile) {
-
- String uri = aFile.getURI();
- if (!(uri.endsWith(".java") || uri.endsWith(".class")))//$NON-NLS-2$//$NON-NLS-1$
- return false;
- if (!includeSource && uri.endsWith(".java"))//$NON-NLS-1$
- return false;
- return !outgoingArchive.containsFile(uri) && !ArchiveConstants.MANIFEST_URI.equals(uri);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARArchiveOpsResourceHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARArchiveOpsResourceHandler.java
deleted file mode 100644
index 87289bf0b..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARArchiveOpsResourceHandler.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class EARArchiveOpsResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("eararchiveops");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public static String getString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getString(key), args);
- } catch (IllegalArgumentException e) {
- return getString(key);
- }
-
- }
-
- public static void nlsConcatenationFinder() {
- // used to tag methods which have concatenated strings
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentExportOperation.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentExportOperation.java
deleted file mode 100644
index 24d6bf917..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentExportOperation.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004, 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.j2ee.internal.archive.operations;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.common.componentcore.util.ComponentUtilities;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class EARComponentExportOperation extends J2EEArtifactExportOperation {
-
- public EARComponentExportOperation(IDataModel model) {
- super(model);
- }
-
- protected void export() throws SaveFailureException, CoreException, InvocationTargetException, InterruptedException {
- EARArtifactEdit artifactEdit = null;
- try {
- artifactEdit = (EARArtifactEdit) ComponentUtilities.getArtifactEditForRead(getComponent());
- EARFile archive = (EARFile) artifactEdit.asArchive(isExportSource());
- String destination = getDestinationPath().toOSString();
- archive.setURI(destination);
- setModuleFile(archive);
- archive.saveAsNoReopen(destination);
- } catch (SaveFailureException ex) {
- throw ex;
- } catch (Exception e) {
- throw new SaveFailureException(AppClientArchiveOpsResourceHandler.getString("ARCHIVE_OPERATION_OpeningArchive"), e);//$NON-NLS-1$
- } finally {
- if (null != artifactEdit) {
- artifactEdit.dispose();
- }
- }
- }
-
- protected String archiveString() {
- return "EAR";
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentImportOperation.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentImportOperation.java
deleted file mode 100644
index 0d47a116b..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentImportOperation.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-import java.io.FileNotFoundException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.SaveStrategy;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.j2ee.datamodel.properties.IEARComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.internal.common.XMLResource;
-import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class EARComponentImportOperation extends J2EEArtifactImportOperation {
-
- private EARFile earFile;
-
- public EARComponentImportOperation(IDataModel dataModel) {
- super(dataModel);
- earFile = (EARFile) model.getProperty(IEARComponentImportDataModelProperties.FILE);
- }
-
- /**
- * Subclasses must override to performs the workbench modification steps that are to be
- * contained within a single logical workbench change.
- *
- * @param monitor
- * the progress monitor to use to display progress
- */
- protected void doExecute(IProgressMonitor monitor) throws ExecutionException {
- super.doExecute(monitor);
- List modelsToImport = (List) model.getProperty(IEARComponentImportDataModelProperties.HANDLED_PROJECT_MODELS_LIST);
- try {
- IDataModel importModel = null;
- List allModels = (List) model.getProperty(IEARComponentImportDataModelProperties.ALL_PROJECT_MODELS_LIST);
- List componentHandlesToAdd = new ArrayList();
- for (int i = 0; i < allModels.size(); i++) {
- importModel = (IDataModel) allModels.get(i);
- if (modelsToImport.contains(importModel)) {
- importModel.setProperty(IJ2EEComponentImportDataModelProperties.CLOSE_ARCHIVE_ON_DISPOSE, Boolean.FALSE);
- try {
- importModel.getDefaultOperation().execute(monitor, info);
- } catch (ExecutionException e) {
- Logger.getLogger().logError(e);
- }
- componentHandlesToAdd.add(((IVirtualComponent) importModel.getProperty(IJ2EEComponentImportDataModelProperties.COMPONENT)).getComponentHandle());
- }
- }
- if (componentHandlesToAdd.size() > 0) {
- IDataModel addComponentsDM = DataModelFactory.createDataModel(new CreateReferenceComponentsDataModelProvider());
- addComponentsDM.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT_HANDLE, virtualComponent.getComponentHandle());
- addComponentsDM.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_HANDLE_LIST, componentHandlesToAdd);
- addComponentsDM.getDefaultOperation().execute(monitor, info);
- }
- try {
- fixupClasspaths(modelsToImport, virtualComponent);
- } catch (JavaModelException e) {
- Logger.getLogger().logError(e);
- }
- } finally {
- resetDisposeImportModels();
- // FileSet.printState();
- }
- }
-
- /**
- * @param modelsToImport
- */
- private void resetDisposeImportModels() {
- resetDisposeImportModels((List) model.getProperty(IEARComponentImportDataModelProperties.ALL_PROJECT_MODELS_LIST));
- }
-
- private void resetDisposeImportModels(List models) {
- IDataModel model;
- for (int i = 0; i < models.size(); i++) {
- model = (IDataModel) models.get(i);
- model.setProperty(IJ2EEComponentImportDataModelProperties.CLOSE_ARCHIVE_ON_DISPOSE, Boolean.TRUE);
- }
- }
-
-
- private void fixupClasspaths(List selectedModels, IVirtualComponent earComponent) throws JavaModelException {
- IDataModel importModel;
- for (int i = 0; i < selectedModels.size(); i++) {
- importModel = (IDataModel) selectedModels.get(i);
- Archive archive = (Archive) importModel.getProperty(IJ2EEComponentImportDataModelProperties.FILE);
- String[] manifestClasspath = archive.getManifest().getClassPathTokenized();
- if (manifestClasspath.length > 0) {
- List extraEntries = fixupClasspath(earComponent, manifestClasspath, new ArrayList(), archive, (IVirtualComponent) importModel.getProperty(IJ2EEComponentImportDataModelProperties.COMPONENT));
- addToClasspath(importModel, extraEntries);
- }
- }
- }
-
- private List fixupClasspath(IVirtualComponent earComponent, String[] manifestClasspath, List computedFiles, Archive anArchive, IVirtualComponent nestedComponent) throws JavaModelException {
- List extraEntries = new ArrayList();
- for (int j = 0; j < manifestClasspath.length; j++) {
- String manifestURI = ArchiveUtil.deriveEARRelativeURI(manifestClasspath[j], anArchive);
- if (null == manifestURI) {
- continue;
- }
- IVirtualFile vFile = earComponent.getRootFolder().getFile(manifestURI);
- if (!computedFiles.contains(vFile)) {
- computedFiles.add(vFile);
- if (vFile.exists()) {
- IFile file = vFile.getUnderlyingFile();
- extraEntries.add(JavaCore.newLibraryEntry(file.getFullPath(), file.getFullPath(), null, true));
- Archive archive = null;
- try {
- archive = (Archive) earFile.getFile(file.getProjectRelativePath().toString());
- String[] nestedManifestClasspath = archive.getManifest().getClassPathTokenized();
- extraEntries.addAll(fixupClasspath(earComponent, nestedManifestClasspath, computedFiles, archive, nestedComponent));
- } catch (FileNotFoundException e) {
- Logger.getLogger().logError(e);
- } finally {
- if (null != archive) {
- archive.close();
- }
- }
- } else {
- String compSearchName = manifestURI.substring(0, manifestURI.length() - 4);
- IVirtualReference vRef = earComponent.getReference(compSearchName);
- if (null != vRef && nestedComponent != vRef.getReferencedComponent()) {
- IProject project = vRef.getReferencedComponent().getProject();
- extraEntries.add(JavaCore.newProjectEntry(project.getFullPath(), true));
- }
- }
- }
- }
- return extraEntries;
- }
-
- private void releaseDeploymentDescriptor() {
- try {
- if (earFile != null && earFile.isDeploymentDescriptorSet()) {
- XMLResource res = (XMLResource) earFile.getDeploymentDescriptor().eResource();
- if (res != null)
- res.releaseFromRead();
- }
- } catch (Exception suppress) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(suppress);
- }
- }
-
- protected SaveStrategy createSaveStrategy(IProject project) { // NOOP
- return null;
- }
-
- protected SaveStrategy createSaveStrategy(IVirtualComponent virtualComponent) {
- return new EARComponentSaveStrategyImpl(virtualComponent);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentLoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentLoadStrategyImpl.java
deleted file mode 100644
index eddc1035e..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentLoadStrategyImpl.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.common.componentcore.util.ComponentUtilities;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
-import org.eclipse.jst.j2ee.componentcore.EnterpriseArtifactEdit;
-import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit;
-import org.eclipse.jst.j2ee.internal.project.J2EEComponentUtilities;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-public class EARComponentLoadStrategyImpl extends ComponentLoadStrategyImpl {
-
- public EARComponentLoadStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- public List getFiles() {
- super.getFiles();
- addModulesAndUtilities();
- return filesList;
- }
-
- public void addModulesAndUtilities() {
- EARArtifactEdit earArtifactEdit = null;
- try {
- earArtifactEdit = EARArtifactEdit.getEARArtifactEditForRead(vComponent);
- List components = earArtifactEdit.getComponentReferences();
- for (Iterator iterator = components.iterator(); iterator.hasNext();) {
- IVirtualReference reference = (IVirtualReference) iterator.next();
- IVirtualComponent referencedComponent = reference.getReferencedComponent();
- String componentTypeId = referencedComponent.getComponentTypeId();
- if (IModuleConstants.JST_APPCLIENT_MODULE.equals(componentTypeId) || IModuleConstants.JST_EJB_MODULE.equals(componentTypeId) || IModuleConstants.JST_WEB_MODULE.equals(componentTypeId) || IModuleConstants.JST_CONNECTOR_MODULE.equals(componentTypeId)) {
- ArtifactEdit componentArtifactEdit = null;
- try {
- componentArtifactEdit = ComponentUtilities.getArtifactEditForRead(referencedComponent);
- Archive archive = ((EnterpriseArtifactEdit) componentArtifactEdit).asArchive(exportSource);
- archive.setURI(earArtifactEdit.getModuleURI(referencedComponent));
- filesList.add(archive);
- } catch (OpenFailureException oe) {
- // TODO
- } finally {
- if (componentArtifactEdit != null) {
- componentArtifactEdit.dispose();
- }
- }
- } else if (IModuleConstants.JST_UTILITY_MODULE.equals(componentTypeId)) {
- try {
- String uri = referencedComponent.getName() + ".jar";
- Archive archive = J2EEComponentUtilities.asArchive(uri, referencedComponent, exportSource);
- filesList.add(archive);
- } catch (OpenFailureException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
-
- } finally {
- if (null != earArtifactEdit) {
- earArtifactEdit.dispose();
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentSaveStrategyImpl.java
deleted file mode 100644
index 219c4fdc4..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jem.workbench.utility.JemProjectUtilities;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.j2ee.datamodel.properties.IEARComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class EARComponentSaveStrategyImpl extends J2EEComponentSaveStrategyImpl implements IJ2EEImportExportConstants {
-
- protected Map createdComponentsMap;
-
- public EARComponentSaveStrategyImpl(IVirtualComponent component) {
- super(component);
- }
-
- public void setDataModel(IDataModel dataModel) {
- super.setDataModel(dataModel);
-
- setArchive((Archive) dataModel.getProperty(IEARComponentImportDataModelProperties.FILE));
- overwriteHandler = (IOverwriteHandler) dataModel.getProperty(IEARComponentImportDataModelProperties.OVERWRITE_HANDLER);
- if (null != overwriteHandler) {
- overwriteHandler.setEarSaveStrategy(this);
- }
- buildProjectsMap();
- }
-
-
-
- /**
- * Creates a Map mapping archive uris to projects for all archives in the ear that imported as
- * projects.
- */
- private void buildProjectsMap() {
- createdComponentsMap = new HashMap();
- List createdProjectsList = (List) dataModel.getProperty(IEARComponentImportDataModelProperties.ALL_PROJECT_MODELS_LIST);
- IDataModel importDM = null;
- Archive anArchive = null;
- for (int i = 0; i < createdProjectsList.size(); i++) {
- importDM = (IDataModel) createdProjectsList.get(i);
- anArchive = (Archive) importDM.getProperty(IJ2EEComponentImportDataModelProperties.FILE);
- createdComponentsMap.put(anArchive.getURI(), importDM.getProperty(IJ2EEComponentImportDataModelProperties.COMPONENT));
- }
- }
-
- protected void addFileToClasspath(IProject p, IFile file, List cp) {
- if (!file.exists())
- return;
-
- // Assume the file also contains the source
- IPath path = file.getFullPath();
- IClasspathEntry entry = JavaCore.newLibraryEntry(path, path, null, true);
- if (!cp.contains(entry))
- cp.add(entry);
- }
-
- protected void addProjectToClasspath(IProject dependent, IProject prereq, List cp) {
- IClasspathEntry entry = JavaCore.newProjectEntry(prereq.getFullPath(), true);
- if (!cp.contains(entry))
- cp.add(entry);
- }
-
- protected EARFile getEARFile() {
- return (EARFile) getArchive();
- }
-
-
- protected java.io.OutputStream getOutputStreamForResource(org.eclipse.emf.ecore.resource.Resource aResource) throws java.io.IOException {
- return null;
- }
-
- public void save() throws SaveFailureException {
-
- saveFiles();
- saveManifest();
- saveMofResources();
- progressMonitor.subTask(EARArchiveOpsResourceHandler.getString("Updating_project_classpath_UI_")); //$NON-NLS-1$ = "Updating project classpaths..."
- updateComponentClasspaths();
-
- }
-
- public void save(Archive anArchive) throws SaveFailureException {
- progressMonitor.subTask(anArchive.getURI());
- saveArchiveAsJARInEAR(anArchive);
- }
-
- protected void saveArchiveAsJARInEAR(Archive anArchive) throws SaveFailureException {
- try {
- anArchive.save(createNestedSaveStrategy(anArchive));
- progressMonitor.worked(1);
- } catch (IOException e) {
- throw new SaveFailureException(anArchive.getURI(), e);
- }
- }
-
- protected SubProgressMonitor subMonitor() {
- return new SubProgressMonitor(progressMonitor, 10);
- }
-
- public void setMonitor(org.eclipse.core.runtime.IProgressMonitor newMonitor) {
- progressMonitor = newMonitor;
- }
-
- protected boolean shouldSave(File aFile) {
- if (aFile.isArchive()) {
- if (operationHandlesNested((Archive) aFile)) {
- return false;
- }
- return getFilter().shouldSave(aFile.getURI(), getArchive());
- }
- return super.shouldSave(aFile);
- }
-
- protected boolean operationHandlesNested(Archive archive) {
- if (null != dataModel) {
- List list = (List) dataModel.getProperty(IEARComponentImportDataModelProperties.HANDLED_PROJECT_MODELS_LIST);
- for (int i = 0; i < list.size(); i++) {
- if (archive == ((IDataModel) list.get(i)).getProperty(IEARComponentImportDataModelProperties.FILE)) {
- return true;
- }
- }
- }
- return false;
- }
-
- protected boolean shouldSave(String uri) {
- if (overwriteHandler != null) {
- if (overwriteHandler.isOverwriteNone())
- return false;
- return ((super.shouldSave(uri)) && (!overwriteHandler.isOverwriteResources()) && (!overwriteHandler.isOverwriteAll()) && (overwriteHandler.shouldOverwrite(uri)));
- }
- return true;
- }
-
-
- /*
- * Parse the manifest of the module file; for each cp entry 1) cananonicalize to a uri that
- * looks like the entry in the ear 2) If the ear contains a file with that uri (the entry is
- * valid) a) If the file is another was blown out to a project, add a cp entry for a referenced
- * project b) otherwise, add a cp entry that points to the file in the ear project, and cp
- * entries for all prereqs
- */
- protected void updateProjectClasspath(Archive anArchive, IVirtualComponent component) {
-
- String message = EARArchiveOpsResourceHandler.getString("Updating_project_classpath_UI_") + component.getName(); //$NON-NLS-1$ = "Updating project classpaths..."
- progressMonitor.subTask(message);
- List projectCpEntries = new ArrayList();
- Set visited = new HashSet();
- traverseClasspaths(component.getProject(), anArchive, projectCpEntries, visited);
-
- try {
- if (!projectCpEntries.isEmpty())
- JemProjectUtilities.appendJavaClassPath(component.getProject(), projectCpEntries);
- JemProjectUtilities.forceClasspathReload(component.getProject());
- } catch (JavaModelException ex) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex);
- }
-
- }
-
- /*
- * If you have a dependency to a JAR in the EAR project, and the JAR depends on another JAR in
- * the EAR; you want to compile cleanly after import, so you need both those JARs on your build
- * path
- */
- protected void traverseClasspaths(IProject p, Archive anArchive, List projectCpEntries, Set visitedArchives) {
- visitedArchives.add(anArchive);
- String[] manifestCpEntries = anArchive.getManifest().getClassPathTokenized();
- EARFile earFile = (EARFile) dataModel.getProperty(IJ2EEComponentImportDataModelProperties.FILE);
- for (int i = 0; i < manifestCpEntries.length; i++) {
- String uri = ArchiveUtil.deriveEARRelativeURI(manifestCpEntries[i], anArchive);
- // ensure the entry is valid or skip to the next
- if (uri == null)
- continue;
- File aFile = null;
- try {
- aFile = earFile.getFile(uri);
- } catch (FileNotFoundException notThere) {
- }
- if (aFile == null || !aFile.isArchive() || visitedArchives.contains(aFile))
- continue;
- Archive depArchive = (Archive) aFile;
- IProject prereq = null;
- IVirtualComponent depComponent = (IVirtualComponent) createdComponentsMap.get(uri);
- if (depComponent != null)
- prereq = depComponent.getProject();
-
- if (prereq != null) {
- addProjectToClasspath(p, prereq, projectCpEntries);
- } else {
- addFileToClasspath(p, vComponent.getRootFolder().getFile(uri).getUnderlyingFile(), projectCpEntries);
- traverseClasspaths(p, depArchive, projectCpEntries, visitedArchives);
- }
- }
- }
-
- protected void updateComponentClasspaths() {
- List jarFiles = getEARFile().getArchiveFiles();
- for (int i = 0; i < jarFiles.size(); i++) {
- Archive anArchive = (Archive) jarFiles.get(i);
- IVirtualComponent component = (IVirtualComponent) createdComponentsMap.get(anArchive.getURI());
- if (component != null)
- updateProjectClasspath(anArchive, component);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EJBArchiveOpsResourceHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EJBArchiveOpsResourceHandler.java
deleted file mode 100644
index f7b9cf6dd..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EJBArchiveOpsResourceHandler.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class EJBArchiveOpsResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("ejbarchiveops");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public static void nlsConcatenationFinder() {
- // used to tag methods which have concatenated strings
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EJBComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EJBComponentSaveStrategyImpl.java
deleted file mode 100644
index 0b1b3a1fa..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EJBComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class EJBComponentSaveStrategyImpl extends J2EEComponentSaveStrategyImpl {
-
- public EJBComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/IJ2EEImportExportConstants.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/IJ2EEImportExportConstants.java
deleted file mode 100644
index d9b1aa642..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/IJ2EEImportExportConstants.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-
-//TODO DELETE
-/**
- * @deprecated
- *
- */
-public interface IJ2EEImportExportConstants {
-
- public String CLASSPATH_FILE_URI = ProjectUtilities.DOT_CLASSPATH;
- public String PROJECT_FILE_URI = ProjectUtilities.DOT_PROJECT;
- public String PROJECT_RUNTIME_URI = ".runtime"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/IOverwriteHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/IOverwriteHandler.java
deleted file mode 100644
index c978f2eea..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/IOverwriteHandler.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator;
-
-
-/**
- * Insert the type's description here. Creation date: (4/16/2001 3:12:41 PM)
- *
- * @author: Administrator
- */
-public interface IOverwriteHandler {
- public static final String NO = EJBArchiveOpsResourceHandler.getString("No_UI"); //$NON-NLS-1$
- public static final String YES = EJBArchiveOpsResourceHandler.getString("Yes_UI"); //$NON-NLS-1$
- public static final String ALL = EJBArchiveOpsResourceHandler.getString("Yes_To_All_UI"); //$NON-NLS-1$
- public static final String NONE = EJBArchiveOpsResourceHandler.getString("Cancel_UI_"); //$NON-NLS-1$
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- org.eclipse.core.resources.IProject getProject();
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- boolean isOverwriteAll();
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- boolean isOverwriteNone();
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- boolean isOverwriteResources();
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- String queryOverwrite(String resourcePath);
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- void setEarSaveStrategy(EARComponentSaveStrategyImpl newEarSaveStrategy);
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- void setEjbSaveStrategy(J2EEComponentSaveStrategyImpl newEjbSaveStrategy);
-
- /**
- * Sets the RAR SaveStrategy.
- *
- * @param RARProjectSaveStrategyImpl
- * rarSaveStrategy - The rar save strategy to set.
- */
- void setRARSaveStrategy(J2EEComponentSaveStrategyImpl newRARSaveStrategy);
-
- void setOverwriteAll(boolean newAllTrue);
-
- void setOverwriteNone(boolean newNoneTrue);
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- void setOverwriteResources(boolean newOverwriteResources);
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- void setProject(org.eclipse.core.resources.IProject newProject);
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- void setWarSaveStrategy(J2EEComponentSaveStrategyImpl newWarSaveStrategy);
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- boolean shouldOverwrite(String uri);
-
- /**
- * Check to see if the file can be checked out.
- *
- * @throws OverwriteHandlerException
- * if the validate fails
- */
- void validateEdit(IFile aFile) throws OverwriteHandlerException;
-
- /**
- * Check to see if the files can be checked out.
- *
- * @throws OverwriteHandlerException
- * if the validate fails
- */
- void validateState(ResourceStateValidator resourceStateValidator);
-
- /**
- * Insert the method's description here. Creation date: (4/16/2001 3:13:38 PM)
- *
- * @return boolean
- */
- boolean shouldOverwriteWLProject(IProject fProject, java.lang.String uri);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ImportOption.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ImportOption.java
deleted file mode 100644
index 2e2330978..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ImportOption.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.project.IJ2EEProjectTypes;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-
-/**
- * This class defines the rules for importing an individual nested JAR in an EAR project
- */
-public class ImportOption implements IJ2EEProjectTypes {
- /**
- * Project info for the individual module/JAR, or null if the file should be placed in the
- * application
- */
- protected IDataModel model;
-
- /**
- * Valid only if the project info is not null
- *
- * @see IJ2EEProjectTypes
- */
- protected int projectType = IJ2EEProjectTypes.DEFAULT;
-
- /**
- * @see IJ2EEProjectTypes#MODULE
- * @see IJ2EEProjectTypes#UTIL
- */
- protected int archiveType = IJ2EEProjectTypes.MODULE;
-
- /**
- * Constructor for ImportOption.
- */
- public ImportOption(IDataModel model) {
- super();
- this.model = model;
- }
-
- public ImportOption(IDataModel model, int type) {
- this(model);
- projectType = type;
- }
-
- public IDataModel getModel() {
- return model;
- }
-
- public int getProjectType() {
- return projectType;
- }
-
- public String getProjectName() {
- return model.getStringProperty(IJ2EEComponentCreationDataModelProperties.PROJECT_NAME);
- }
-
- /**
- * @return Returns the archiveType.
- */
- public int getArchiveType() {
- return archiveType;
- }
-
- /**
- * @param archiveType
- * The archiveType to set.
- */
- public void setArchiveType(int archiveType) {
- this.archiveType = archiveType;
- }
-
- /**
- * @param projectType
- * The projectType to set.
- */
- public void setProjectType(int projectType) {
- this.projectType = projectType;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEArtifactExportOperation.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEArtifactExportOperation.java
deleted file mode 100644
index 1f9530191..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEArtifactExportOperation.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004, 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.j2ee.internal.archive.operations;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.common.componentcore.util.ComponentUtilities;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties;
-import org.eclipse.jst.j2ee.internal.plugin.LibCopyBuilder;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public abstract class J2EEArtifactExportOperation extends AbstractDataModelOperation {
-
- protected IProgressMonitor progressMonitor;
- private IVirtualComponent component;
- private IPath destinationPath;
- private ModuleFile moduleFile;
- private boolean exportSource = false;
-
- public J2EEArtifactExportOperation() {
- super();
- }
-
- public J2EEArtifactExportOperation(IDataModel model) {
- super(model);
- }
-
- public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- setComponent(ComponentUtilities.getComponent(model.getStringProperty(IJ2EEComponentExportDataModelProperties.COMPONENT_NAME))[0]);
- setDestinationPath(new Path(model.getStringProperty(IJ2EEComponentExportDataModelProperties.ARCHIVE_DESTINATION)));
- setExportSource(model.getBooleanProperty(IJ2EEComponentExportDataModelProperties.EXPORT_SOURCE_FILES));
- try {
- setProgressMonitor(monitor);
- // defect 240999
- component.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
- if (model.getBooleanProperty(IJ2EEComponentExportDataModelProperties.RUN_BUILD)) {
- runNecessaryBuilders(component, monitor);
- }
- export();
- } catch (Exception e) {
- throw new ExecutionException(EJBArchiveOpsResourceHandler.getString("Error_exporting__UI_") + archiveString(), e);
- }
- return OK_STATUS;
- }
-
- protected abstract void export() throws SaveFailureException, CoreException, InvocationTargetException, InterruptedException;
-
- protected abstract String archiveString();
-
- protected void setProgressMonitor(IProgressMonitor newProgressMonitor) {
- progressMonitor = newProgressMonitor;
- }
-
- protected IProgressMonitor getProgressMonitor() {
- return progressMonitor;
- }
-
- private void setComponent(IVirtualComponent newComponent) {
- component = newComponent;
- }
-
- protected IVirtualComponent getComponent() {
- return component;
- }
-
- protected IPath getDestinationPath() {
- return destinationPath;
- }
-
- protected void setDestinationPath(IPath newDestinationPath) {
- destinationPath = newDestinationPath;
- }
-
- protected boolean isExportSource() {
- return exportSource;
- }
-
- protected void setExportSource(boolean newExportSource) {
- exportSource = newExportSource;
- }
-
- protected ModuleFile getModuleFile() {
- return moduleFile;
- }
-
- protected void setModuleFile(ModuleFile newModuleFile) {
- moduleFile = newModuleFile;
- }
-
- public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // TODO Auto-generated method stub
- return null;
- }
-
- protected void runNecessaryBuilders(IVirtualComponent component, IProgressMonitor monitor) throws CoreException {
- IProject project = component.getProject();
- IProjectDescription description = project.getDescription();
- ICommand javaBuilder = getJavaCommand(description);
- if (javaBuilder != null) {
- project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, JavaCore.BUILDER_ID, javaBuilder.getArguments(), monitor);
- }
- ICommand libCopyBuilder = getLibCopyBuilder(description);
- if (null != libCopyBuilder) {
- project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, LibCopyBuilder.BUILDER_ID, libCopyBuilder.getArguments(), monitor);
- }
- }
-
- /**
- * Find the specific Java command amongst the build spec of a given description
- */
- protected ICommand getJavaCommand(IProjectDescription description) throws CoreException {
- if (description == null) {
- return null;
- }
-
- ICommand[] commands = description.getBuildSpec();
- for (int i = 0; i < commands.length; ++i) {
- if (commands[i].getBuilderName().equals(JavaCore.BUILDER_ID)) {
- return commands[i];
- }
- }
- return null;
- }
-
- protected ICommand getLibCopyBuilder(IProjectDescription description) throws CoreException {
- if (description == null) {
- return null;
- }
-
- ICommand[] commands = description.getBuildSpec();
- for (int i = 0; i < commands.length; ++i) {
- if (commands[i].getBuilderName().equals(LibCopyBuilder.BUILDER_ID)) {
- return commands[i];
- }
- }
- return null;
-
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEArtifactImportOperation.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEArtifactImportOperation.java
deleted file mode 100644
index c9d8aa13f..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEArtifactImportOperation.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.SaveStrategy;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.enablement.nonui.WFTWrappedException;
-
-public abstract class J2EEArtifactImportOperation extends AbstractDataModelOperation {
-
- protected ModuleFile moduleFile;
- protected IVirtualComponent virtualComponent;
- protected IAdaptable info;
-
- public J2EEArtifactImportOperation(IDataModel model) {
- super(model);
- }
-
- public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- try {
- this.info = info;
- doExecute(monitor);
- return OK_STATUS;
- } finally {
- model.dispose();
- }
- }
-
- protected void doExecute(IProgressMonitor monitor) throws ExecutionException {
- moduleFile = (ModuleFile) model.getProperty(IJ2EEComponentImportDataModelProperties.FILE);
- monitor.beginTask(null, moduleFile.getFiles().size());
-
- virtualComponent = createVirtualComponent(model.getNestedModel(IJ2EEComponentImportDataModelProperties.NESTED_MODEL_J2EE_COMPONENT_CREATION), monitor);
-
- try {
- importModuleFile(monitor);
- } catch (InvocationTargetException e) {
- throw new ExecutionException(e.getMessage(), e);
- } catch (InterruptedException e) {
- throw new ExecutionException(e.getMessage(), e);
- }
- }
-
- protected IVirtualComponent createVirtualComponent(IDataModel model, IProgressMonitor monitor) throws ExecutionException {
- model.getDefaultOperation().execute(monitor, info);
- return (IVirtualComponent) model.getProperty(IComponentCreationDataModelProperties.COMPONENT);
- }
-
- /**
- * Creates the appropriate save strategy. Subclases should overwrite this method to create the
- * appropriate save startegy for the kind of J2EE module project to import the archive
- */
- protected abstract SaveStrategy createSaveStrategy(IVirtualComponent virtualComponent);
-
- protected void modifyStrategy(SaveStrategy saveStrat) {
- }
-
- /**
- * perform the archive import operation
- *
- * @throws java.lang.reflect.InvocationTargetException
- * @throws java.lang.InterruptedException
- */
- protected void importModuleFile(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.worked(1);
- J2EEComponentSaveStrategyImpl aStrategy = (J2EEComponentSaveStrategyImpl) createSaveStrategy(virtualComponent);
- aStrategy.setProgressMonitor(monitor);
- aStrategy.setOverwriteHandler((IOverwriteHandler) model.getProperty(IJ2EEComponentImportDataModelProperties.OVERWRITE_HANDLER));
- aStrategy.setDataModel(model);
- modifyStrategy(aStrategy);
- moduleFile.save(aStrategy);
- } catch (OverwriteHandlerException oe) {
- throw new InterruptedException();
- } catch (Exception ex) {
- throw new WFTWrappedException(ex, EJBArchiveOpsResourceHandler.getString("ERROR_IMPORTING_MODULE_FILE")); //$NON-NLS-1$
- }
- }
-
- protected static void addToClasspath(IDataModel importModel, List extraEntries) throws JavaModelException {
- if (extraEntries.size() > 0) {
- IJavaProject javaProject = JavaCore.create(((IVirtualComponent)importModel.getProperty(IJ2EEComponentImportDataModelProperties.COMPONENT)).getProject());
- IClasspathEntry[] javaClasspath = javaProject.getRawClasspath();
- List nonDuplicateList = new ArrayList();
- for (int i = 0; i < extraEntries.size(); i++) {
- IClasspathEntry extraEntry = (IClasspathEntry) extraEntries.get(i);
- boolean include = true;
- for (int j = 0; include && j < javaClasspath.length; j++) {
- if (extraEntry.equals(javaClasspath[j])) {
- include = false;
- }
- }
- if (include) {
- nonDuplicateList.add(extraEntry);
- }
- }
- if (nonDuplicateList.size() > 0) {
- IClasspathEntry[] newJavaClasspath = new IClasspathEntry[javaClasspath.length + nonDuplicateList.size()];
- System.arraycopy(javaClasspath, 0, newJavaClasspath, 0, javaClasspath.length);
- for (int j = 0; j < nonDuplicateList.size(); j++) {
- newJavaClasspath[javaClasspath.length + j] = (IClasspathEntry) nonDuplicateList.get(j);
- }
- javaProject.setRawClasspath(newJavaClasspath, new NullProgressMonitor());
- }
- }
- }
-
- public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- return null;
- }
-
- public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- return null;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEComponentSaveStrategyImpl.java
deleted file mode 100644
index 0dd8ae931..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jem.util.emf.workbench.WorkbenchByteArrayOutputStream;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-
-public abstract class J2EEComponentSaveStrategyImpl extends ComponentSaveStrategyImpl {
-
- public J2EEComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- public void save(ArchiveManifest aManifest) throws SaveFailureException {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualFile vFile = rootFolder.getFile(new Path(J2EEConstants.MANIFEST_URI));
- IFile iFile = vFile.getUnderlyingFile();
- validateEdit(iFile);
- OutputStream out = new WorkbenchByteArrayOutputStream(iFile);
- try {
- aManifest.write(out);
- } catch (IOException e) {
- Logger.getLogger().logError(e);
- } finally {
- try {
- out.close();
- } catch (IOException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEImportConstants.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEImportConstants.java
deleted file mode 100644
index 9bf8af510..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEImportConstants.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 18, 2003
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.archive.operations;
-
-/**
- * @author jsholl
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class J2EEImportConstants {
- public static final String IMPORTED_JAR_SUFFIX = ".imported_classes.jar"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEJavaComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEJavaComponentSaveStrategyImpl.java
deleted file mode 100644
index c7a0496be..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEJavaComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class J2EEJavaComponentSaveStrategyImpl extends J2EEComponentSaveStrategyImpl {
-
- public J2EEJavaComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategy.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategy.java
deleted file mode 100644
index 8b11665b4..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategy.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategy;
-
-//TODO delete jsholl
-/**
- * @deprecated
- *
- */
-public interface J2EELoadStrategy extends LoadStrategy {
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategyImpl.java
deleted file mode 100644
index 1fdd344ea..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EELoadStrategyImpl.java
+++ /dev/null
@@ -1,393 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.internal.resources.ProjectDescription;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.URIConverter;
-import org.eclipse.emf.ecore.resource.Resource.Factory.Registry;
-import org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter;
-import org.eclipse.jem.util.emf.workbench.WorkbenchURIConverterImpl;
-import org.eclipse.jem.workbench.utility.JemProjectUtilities;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ArchiveRuntimeException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategyImpl;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-
-//TODO delete jsholl
-/**
- * @deprecated
- *
- */
-public abstract class J2EELoadStrategyImpl extends LoadStrategyImpl implements IJ2EEImportExportConstants {
- protected IProject project;
- protected ArrayList filesList;
- //This one is used for the dot files in the project
- protected WorkbenchURIConverter projectMetaURIConverter;
- protected WorkbenchURIConverter projectURIConverter;
- protected Set visitedURIs;
- private boolean exportSource = false;
- private boolean includeProjectMetaFiles = false;
- protected List sourceFolders;
-
- /**
- * J2EELoadStrategyImpl constructor comment.
- */
- public J2EELoadStrategyImpl() {
- super();
- }
-
- /**
- * @see com.ibm.etools.archive.LoadStrategy
- */
- public boolean contains(String uri) {
-
- if (projectURIConverter == null)
- getProjectURIConverter();
- return projectURIConverter.getFile(uri).exists();
-
- }
-
- /* should never get called outside of runtime */
- protected boolean primContains(String uri) {
- return false;
- }
-
- protected long getLastModified(IResource aResource) {
- return aResource.getLocation().toFile().lastModified();
- }
-
- /**
- * @see com.ibm.etools.archive.LoadStrategy
- */
- public java.util.List getFiles() {
-
- filesList.clear();
- try {
-
- List projMembers = Arrays.asList(project.members());
- List exopProjMembers = new ArrayList();
- Iterator iterator = projMembers.iterator();
- while (iterator.hasNext()) {
- exopProjMembers.add(iterator.next());
- }
-
- filesList = getFiles(exopProjMembers);
-
- } catch (Exception exc) {
- throw new ArchiveRuntimeException(EJBArchiveOpsResourceHandler.getString("ARCHIVE_OPERATION_FilesFromProject"), exc); //$NON-NLS-1$
- //$NON-NLS-1$
- }
- return filesList;
- }
-
- protected java.util.ArrayList getFiles(List projectResources) throws Exception {
- if (projectResources.isEmpty()) {
- return filesList;
- }
-
- IContainer outputFolder = JemProjectUtilities.getJavaProjectOutputContainer(getProject());
-
- Iterator iterator = projectResources.iterator();
- while (iterator.hasNext()) {
- File cFile = null;
- IResource res = (IResource) (iterator.next());
- if ((res.getType() == IResource.FILE)) {
-
- //We have to avoid duplicates between the source and output folders (non-java
- // resources)
- IPath path = getOutputPathForFile(res.getProjectRelativePath());
- String uri = path == null ? null : path.toString();
-
- //Avoid adding files in source folder which are not in output folder.
- //unless they are .java or .sqlj (source)
- if (outputFolder != null && !outputFolder.exists(path)) {
- if (uri != null && !isSource(uri) && !uri.equals(ProjectDescription.DESCRIPTION_FILE_NAME) && !uri.equals(".classpath")) //$NON-NLS-1$
- continue;
- }
-
- if (uri == null)
- continue;
- if (!shouldInclude(uri)) //$NON-NLS-1$
- continue;
- if (getVisitedURIs().contains(uri))
- continue;
- cFile = createFile(uri);
- cFile.setLastModified(getLastModified(res));
- getVisitedURIs().add(uri);
- filesList.add(cFile);
- } else {
- if (shouldInclude((IContainer) res))
- getFiles(Arrays.asList(((IContainer) res).members()));
- }
- }
- return filesList;
- }
-
- protected boolean isSource(String uri) {
- if (uri == null)
- return false;
- return uri.endsWith(ArchiveUtil.DOT_JAVA) || uri.endsWith(ArchiveUtil.DOT_SQLJ);// ||
- // uri.equals(ProjectDescription.DESCRIPTION_FILE_NAME)
- // ||
- // uri.equals(".classpath");
- }
-
- protected boolean shouldInclude(IContainer iContainer) {
- return true;
- }
-
- protected boolean shouldInclude(String uri) {
- return isExportSource() || !isSource(uri);
- }
-
- /**
- * @see com.ibm.etools.archive.LoadStrategy
- */
- public java.io.InputStream getInputStream(String uri) throws IOException, FileNotFoundException {
-
- try {
- if (projectURIConverter == null)
- getProjectURIConverter();
- if (isProjectMetaFile(uri))
- return getProjectMetaURIConverter().createInputStream(URI.createURI(uri));
- return projectURIConverter.createInputStream(URI.createURI(uri));
- } catch (IOException e) {
- throw e;
- } catch (Exception e) {
- throw new ArchiveRuntimeException(e);
- }
- }
-
- protected boolean isProjectMetaFile(String uri) {
- return PROJECT_FILE_URI.equals(uri) || CLASSPATH_FILE_URI.equals(uri);
- }
-
- public abstract IContainer getModuleContainer();
-
- protected IPath getOutputPathForFile(IPath aPath) throws Exception {
- if (isProjectMetaFile(aPath.toString())) {
- if (includeProjectMetaFiles)
- return aPath;
- return null;
- }
- IContainer moduleContainer = getModuleContainer();
- IPath moduleContainerPath = moduleContainer.getProjectRelativePath();
- //check if the file is an output folder file
- if (aPath.segmentCount() > moduleContainerPath.segmentCount() && aPath.removeLastSegments(aPath.segmentCount() - moduleContainerPath.segmentCount()).equals(moduleContainerPath)) {
- IPath tempPath = aPath.removeFirstSegments(moduleContainerPath.segmentCount());
- if (moduleContainer.exists(tempPath)) {
- return tempPath;
- }
- }
- //if this file is in a source folder, find the source folder
- //and remove the source folder portion from the path
- List lSourceFolders = getSourceFolders();
- for (int i = 0; i < lSourceFolders.size(); i++) {
- IPath folderPath = ((IFolder) lSourceFolders.get(i)).getProjectRelativePath();
- if (aPath.segmentCount() > folderPath.segmentCount() && aPath.removeLastSegments(aPath.segmentCount() - folderPath.segmentCount()).equals(folderPath)) {
- return aPath.removeFirstSegments(folderPath.segmentCount());
- }
- }
- return null;
- }
-
- // int charIndex = 0;
-
- // ArrayList tokens = new ArrayList();
- // String pathString = aPath.toString();
- //
- // for (int i = 0; i < pathString.length(); i++) {
- // if (pathString.charAt(i) == '/') {
- // tokens.add(pathString.substring(charIndex, i));
- // charIndex = ++i;
- // }
- // }
-
- // int indexOfModule = -1;
- // IContainer outputFolder = ProjectUtilities.getJavaProjectOutputContainer(getProject());
- // check if file is an output folder file
-
- // if (tokens.contains(getModuleFolderName())) {
- // indexOfModule = tokens.indexOf(getModuleFolderName());
- // // make sure the path exists, if not, we should check source folders
- // if (!outputFolder.exists(aPath.removeFirstSegments(indexOfModule + 1)))
- // indexOfModule = -1;
- // }
- // check if file is a source folder file
- // if (indexOfModule == -1) {
- // List localSourceFolders = getSourceFoldersNames();
- // if (localSourceFolders != null) {
- // for (int j = 0; j < localSourceFolders.size(); j++) {
- // if (!tokens.isEmpty()) {
- // if (((String) tokens.get(0)).equals(localSourceFolders.get(j))) {
- // indexOfModule = tokens.indexOf(localSourceFolders.get(j));
- // break;
- // }
- // continue;
- // }
- // }
- // }
- // }
- // if (indexOfModule > -1)
- // return aPath.removeFirstSegments(indexOfModule + 1);
- // return null;
- // }
- /**
- * Insert the method's description here. Creation date: (7/19/2001 3:58:31 PM)
- *
- * @return org.eclipse.core.resources.IProject
- */
- public org.eclipse.core.resources.IProject getProject() {
- return project;
- }
-
- public abstract WorkbenchURIConverter getProjectURIConverter();
-
- public String getSourceFolderName() throws Exception {
- try {
- return JemProjectUtilities.getSourceFolderOrFirst(project, null).getName();
- } catch (Exception e) {
- throw new SaveFailureException(EJBArchiveOpsResourceHandler.getString("ARCHIVE_OPERATION_ProjectNature"), e);//$NON-NLS-1$
- }
-
- }
-
- public List getSourceFoldersNames() throws Exception {
- try {
- List sourceFolderNames = new ArrayList();
- List localSourceFolders = getSourceFolders();
- for (int i = 0; i < localSourceFolders.size(); i++) {
- sourceFolderNames.add(((org.eclipse.core.resources.IFolder) localSourceFolders.get(i)).getName());
- }
- return sourceFolderNames;
-
- } catch (Exception e) {
- throw new SaveFailureException(EJBArchiveOpsResourceHandler.getString("ARCHIVE_OPERATION_ProjectNature"), e); //$NON-NLS-1$
- }
- }
-
-
- protected List getSourceFolders() {
- if (sourceFolders == null) {
- sourceFolders = JemProjectUtilities.getSourceContainers(project);
- }
- return sourceFolders;
- }
-
- public Set getVisitedURIs() {
- if (visitedURIs == null)
- visitedURIs = new HashSet();
- return visitedURIs;
- }
-
- public boolean isClassLoaderNeeded() {
- return false;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/19/2001 6:07:54 PM)
- *
- * @return boolean
- */
- public boolean isExportSource() {
- return exportSource;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/19/2001 6:07:54 PM)
- *
- * @param newExportSource
- * boolean
- */
- public void setExportSource(boolean newExportSource) {
- exportSource = newExportSource;
- }
-
- /**
- * Returns the includeProjectMetaFiles.
- *
- * @return boolean
- */
- public boolean shouldIncludeProjectMetaFiles() {
- return includeProjectMetaFiles;
- }
-
-
- /**
- * Sets the includeProjectMetaFiles.
- *
- * @param includeProjectMetaFiles
- * The includeProjectMetaFiles to set
- */
- public void setIncludeProjectMetaFiles(boolean includeProjectMetaFiles) {
- this.includeProjectMetaFiles = includeProjectMetaFiles;
- }
-
- protected URIConverter getProjectMetaURIConverter() {
- if (projectMetaURIConverter == null)
- projectMetaURIConverter = new WorkbenchURIConverterImpl(getProject());
- return projectMetaURIConverter;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.archive.impl.LoadStrategyImpl#requiresIterationOnSave()
- */
- public boolean requiresIterationOnSave() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.commonarchivecore.strategy.LoadStrategyImpl#initializeResourceSet()
- */
- protected void initializeResourceSet() {
- resourceSet = WorkbenchResourceHelper.getResourceSet(project);
- }
-
- /*
- * Overrode from super to bypass SAX
- */
- protected Registry createResourceFactoryRegistry() {
- return new J2EEResourceFactoryRegistry();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.commonarchivecore.strategy.LoadStrategyImpl#getAbsolutePath()
- */
- public String getAbsolutePath() throws FileNotFoundException {
- return project.getLocation().toOSString();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentCreationDataModelProvider.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentCreationDataModelProvider.java
deleted file mode 100644
index d795109de..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentCreationDataModelProvider.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jst.j2ee.application.internal.operations.FlexibleJavaProjectCreationDataModelProvider;
-import org.eclipse.jst.j2ee.application.internal.operations.JavaUtilityComponentCreationOperation;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchivePackage;
-import org.eclipse.jst.j2ee.datamodel.properties.IJavaComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.project.datamodel.properties.IFlexibleJavaProjectCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.operation.ComponentCreationDataModelProvider;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.properties.IFlexibleProjectCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.internal.FlexibleJavaProjectPreferenceUtil;
-import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonMessages;
-import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
-
-public class JavaComponentCreationDataModelProvider extends ComponentCreationDataModelProvider implements IJavaComponentCreationDataModelProperties {
-
-
- public String[] getPropertyNames() {
- String[] props = new String[]{JAVASOURCE_FOLDER, MANIFEST_FOLDER, RUNTIME_TARGET_ID};
- return combineProperties(super.getPropertyNames(), props);
- }
-
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(JAVASOURCE_FOLDER)) {
- return getComponentName();
- }else if (propertyName.equals(MANIFEST_FOLDER)) {
- if(isProjMultiComponents)
- return getComponentName() + "/" + J2EEConstants.META_INF; //$NON-NLS-1$
- else
- return "/" + J2EEConstants.META_INF; //$NON-NLS-1$
- }
- return super.getDefaultProperty(propertyName);
- }
-
- public void init() {
- super.init();
- }
-
- public boolean propertySet(String propertyName, Object propertyValue) {
- boolean status = super.propertySet(propertyName, propertyValue);
- if (PROJECT_NAME.equals(propertyName)) {
-// model.notifyPropertyChange(PROJECT_NAME, IDataModel.VALUE_CHG);
-// IDataModel dm = (IDataModel)model.getNestedModel(NESTED_PROJECT_CREATION_DM);
-// dm.setProperty(IFlexibleProjectCreationDataModelProperties.PROJECT_NAME, propertyValue);
- } else if(LOCATION.equals(propertyName)) {
- IDataModel dm = model.getNestedModel(NESTED_PROJECT_CREATION_DM);
- dm.setProperty(IFlexibleProjectCreationDataModelProperties.PROJECT_LOCATION, propertyValue);
- } else if(RUNTIME_TARGET_ID.equals(propertyName)) {
- IDataModel dm = model.getNestedModel(NESTED_PROJECT_CREATION_DM);
- dm.setProperty(IFlexibleJavaProjectCreationDataModelProperties.RUNTIME_TARGET_ID, propertyValue);
- }
- return status;
- }
-
- public IStatus validate(String propertyName) {
- if (propertyName.equals(JAVASOURCE_FOLDER)) {
- IStatus status = OK_STATUS;
- String srcFolderName = model.getStringProperty(JAVASOURCE_FOLDER);
- if (srcFolderName == null || srcFolderName.length()==0) {
- String errorMessage = WTPCommonPlugin.getResourceString(WTPCommonMessages.PROJECT_NAME_EMPTY);
- status = WTPCommonPlugin.createErrorStatus(errorMessage);
- }
- return status;
-
- } else if (propertyName.equals(MANIFEST_FOLDER)) {
- IStatus status = OK_STATUS;
- String srcFolderName = model.getStringProperty(MANIFEST_FOLDER);
- if (srcFolderName == null || srcFolderName.length()==0) {
- String errorMessage = WTPCommonPlugin.getResourceString(WTPCommonMessages.PROJECT_NAME_EMPTY);
- status = WTPCommonPlugin.createErrorStatus(errorMessage);
- }
- return status;
- } else if (propertyName.equals(RUNTIME_TARGET_ID)) {
- //if multiple modules are supported, the project is already been created, no need for validation here
- if(!FlexibleJavaProjectPreferenceUtil.getMultipleModulesPerProjectProp()){
- IDataModel dm = model.getNestedModel(NESTED_PROJECT_CREATION_DM);
- IStatus nestedValiation = dm.validate();
- if(!nestedValiation.isOK())
- return nestedValiation;
- }else
- return OK_STATUS;
- }
-// else if(propertyName.equals(PROJECT_NAME)){
-// IDataModel projectdm = (IDataModel)model.getNestedModel(NESTED_PROJECT_CREATION_DM);
-// return projectdm.validateProperty(IFlexibleProjectCreationDataModelProperties.PROJECT_NAME);
-// }
-
- return super.validate(propertyName);
- }
-
- public JavaComponentCreationDataModelProvider() {
- super();
- }
-
- protected EClass getComponentType() {
- return CommonarchivePackage.eINSTANCE.getModuleFile();
- }
-
- protected Integer getDefaultComponentVersion() {
- Integer version = new Integer("10");
- return version;
- }
-
- protected String getComponentID() {
- return IModuleConstants.JST_UTILITY_MODULE;
- }
-
- protected String getComponentExtension() {
- return ".jar"; //$NON-NLS-1$
- }
-
- protected List getProperties() {
- return null;
- }
-
- public IDataModelOperation getDefaultOperation() {
- return new JavaUtilityComponentCreationOperation(model);
- }
-
- protected void initProjectCreationModel() {
- IDataModel dm = DataModelFactory.createDataModel(new FlexibleJavaProjectCreationDataModelProvider());
- model.addNestedModel(NESTED_PROJECT_CREATION_DM, dm);
- model.setProperty(LOCATION, dm.getProperty(IFlexibleProjectCreationDataModelProperties.PROJECT_LOCATION));
-
- }
-
- public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
- if (propertyName.equals(RUNTIME_TARGET_ID)) {
- //IDataModel projectdm = (IDataModel)model.getNestedModel(NESTED_PROJECT_CREATION_DM);
- //return projectdm.getValidPropertyDescriptors(IFlexibleJavaProjectCreationDataModelProperties.SERVER_TARGET_ID);
- }
- return null;
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentLoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentLoadStrategyImpl.java
deleted file mode 100644
index 3ffab1e65..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentLoadStrategyImpl.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class JavaComponentLoadStrategyImpl extends ComponentLoadStrategyImpl {
-
- public JavaComponentLoadStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentSaveStrategyImpl.java
deleted file mode 100644
index 2269718c4..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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.j2ee.internal.archive.operations;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class JavaComponentSaveStrategyImpl extends ComponentSaveStrategyImpl {
-
- public JavaComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/OverwriteHandlerException.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/OverwriteHandlerException.java
deleted file mode 100644
index 5d32ca549..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/OverwriteHandlerException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.j2ee.internal.archive.operations;
-
-
-
-/**
- * Insert the type's description here. Creation date: (8/16/2001 6:07:35 PM)
- *
- * @author: Administrator
- */
-public class OverwriteHandlerException extends RuntimeException {
- /**
- * OverwriteHandlerException constructor comment.
- */
- public OverwriteHandlerException() {
- super();
- }
-
- /**
- * OverwriteHandlerException constructor comment.
- *
- * @param s
- * java.lang.String
- */
- public OverwriteHandlerException(String s) {
- super(s);
- }
-} \ No newline at end of file

Back to the top