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.jca/rarproject/org')
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentCreationDataModelProvider.java162
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentCreationFacetOperation.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentExportDataModelProvider.java70
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentImportDataModelProvider.java55
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentImportOperation.java75
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentCreationDataModelProperties.java35
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentExportDataModelProperties.java32
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentImportDataModelProperties.java32
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/rartp10.xml39
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/rartp15.xml10
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/internal/module/util/ConnectorEditAdapterFactory.java45
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/modulecore/util/ConnectorArtifactEdit.java383
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/modulecore/util/package.xml19
13 files changed, 0 insertions, 1029 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentCreationDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentCreationDataModelProvider.java
deleted file mode 100644
index c2c1e8835..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentCreationDataModelProvider.java
+++ /dev/null
@@ -1,162 +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.jca.operations;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchivePackage;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.CreationConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-/**
- * @deprecated
- * @see ConnectorFacetProjectCreationDataModelProvider
- */
-
-public class ConnectorComponentCreationDataModelProvider extends J2EEComponentCreationDataModelProvider implements IConnectorComponentCreationDataModelProperties {
-
- public ConnectorComponentCreationDataModelProvider() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.application.operations.FlexibleJ2EEModuleCreationDataModel#getDefaultJ2EEModuleVersion()
- */
- protected Integer getDefaultComponentVersion() {
- int highestJ2EEPref = J2EEPlugin.getDefault().getJ2EEPreferences().getHighestJ2EEVersionID();
- switch (highestJ2EEPref) {
- case (J2EEVersionConstants.J2EE_1_4_ID) :
- return new Integer(J2EEVersionConstants.JCA_1_5_ID);
- case (J2EEVersionConstants.J2EE_1_3_ID) :
- return new Integer(J2EEVersionConstants.JCA_1_0_ID);
- case (J2EEVersionConstants.J2EE_1_2_ID) :
- return null;
- default :
- return new Integer(J2EEVersionConstants.JCA_1_5_ID);
- }
- }
-
- protected DataModelPropertyDescriptor[] getValidComponentVersionDescriptors() {
- int highestJ2EEPref = J2EEPlugin.getDefault().getJ2EEPreferences().getHighestJ2EEVersionID();
- DataModelPropertyDescriptor[] descriptors = null;
- switch (highestJ2EEPref) {
- case J2EEVersionConstants.J2EE_1_3_ID :
- descriptors = new DataModelPropertyDescriptor[1];
- descriptors[0] = new DataModelPropertyDescriptor(new Integer(J2EEVersionConstants.JCA_1_0_ID), J2EEVersionConstants.VERSION_1_0_TEXT);
- break;
- case J2EEVersionConstants.J2EE_1_4_ID :
- default :
- descriptors = new DataModelPropertyDescriptor[2];
- descriptors[0] = new DataModelPropertyDescriptor(new Integer(J2EEVersionConstants.JCA_1_0_ID), J2EEVersionConstants.VERSION_1_0_TEXT);
- descriptors[1] = new DataModelPropertyDescriptor(new Integer(J2EEVersionConstants.JCA_1_5_ID), J2EEVersionConstants.VERSION_1_5_TEXT);
- break;
- }
- return descriptors;
- }
-
- protected int convertModuleVersionToJ2EEVersion(int moduleVersion) {
- switch (moduleVersion) {
- case J2EEVersionConstants.JCA_1_0_ID :
- return J2EEVersionConstants.J2EE_1_3_ID;
- case J2EEVersionConstants.JCA_1_5_ID :
- return J2EEVersionConstants.J2EE_1_4_ID;
- }
- return 0;
- }
-
- protected Integer convertJ2EEVersionToModuleVersion(Integer j2eeVersion) {
- switch (j2eeVersion.intValue()) {
- case J2EEVersionConstants.J2EE_1_3_ID :
- return new Integer(J2EEVersionConstants.JCA_1_0_ID);
- case J2EEVersionConstants.J2EE_1_4_ID :
- return new Integer(J2EEVersionConstants.JCA_1_5_ID);
- }
- return super.convertJ2EEVersionToModuleVersion(j2eeVersion);
- }
-
- protected EClass getComponentType() {
- return CommonarchivePackage.eINSTANCE.getRARFile();
- }
-
- protected String getComponentExtension() {
- return ".rar"; //$NON-NLS-1$
- }
-
- public DataModelPropertyDescriptor getPropertyDescriptor(String propertyName) {
- if (propertyName.equals(COMPONENT_VERSION)) {
- Integer propertyValue = (Integer) getProperty(propertyName);
- String description = null;
- switch (propertyValue.intValue()) {
- case J2EEVersionConstants.JCA_1_0_ID :
- description = J2EEVersionConstants.VERSION_1_0_TEXT;
- break;
- case J2EEVersionConstants.JCA_1_5_ID :
- default :
- description = J2EEVersionConstants.VERSION_1_5_TEXT;
- break;
- }
- return new DataModelPropertyDescriptor(propertyValue, description);
- }
- return super.getPropertyDescriptor(propertyName);
- }
-
-
- public IDataModelOperation getDefaultOperation() {
- //return new ConnectorComponentCreationOperation(model);
- return new ConnectorComponentCreationFacetOperation(model);
- }
-
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(MANIFEST_FOLDER)) {
- return IPath.SEPARATOR + CreationConstants.DEFAULT_CONNECTOR_SOURCE_FOLDER + IPath.SEPARATOR + J2EEConstants.META_INF;
- }
- if (propertyName.equals(ADD_TO_EAR)) {
- return Boolean.TRUE;
- }
- if (propertyName.equals(DD_FOLDER)) {
- return IPath.SEPARATOR + CreationConstants.DEFAULT_CONNECTOR_SOURCE_FOLDER + IPath.SEPARATOR + J2EEConstants.META_INF;
- }
- if (propertyName.equals(JAVASOURCE_FOLDER)) {
- return CreationConstants.DEFAULT_CONNECTOR_SOURCE_FOLDER;
- }
-
- return super.getDefaultProperty(propertyName);
- }
-
- public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
- return super.getValidPropertyDescriptors(propertyName);
- }
-
- public IStatus validate(String propertyName) {
- return super.validate(propertyName);
- }
- public boolean propertySet(String propertyName, Object propertyValue) {
- boolean doSet = super.propertySet(propertyName, propertyValue);
- if (propertyName.equals(JAVASOURCE_FOLDER)){
- //unless MANIFEST folder is opened up, it is set as same as Java source folder
- setProperty(MANIFEST_FOLDER, getProperty(JAVASOURCE_FOLDER)+ "/" + J2EEConstants.META_INF);
- }
- return doSet;
- }
-
- protected String getJ2EEProjectType() {
- return J2EEProjectUtilities.JCA;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentCreationFacetOperation.java b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentCreationFacetOperation.java
deleted file mode 100644
index 08423fc98..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentCreationFacetOperation.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jca.operations;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.datamodel.properties.IJavaComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDataModelProvider;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.J2EEComponentCreationFacetOperation;
-import org.eclipse.wst.common.componentcore.datamodel.FacetProjectCreationDataModelProvider;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties.FacetDataModelMap;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class ConnectorComponentCreationFacetOperation extends J2EEComponentCreationFacetOperation {
-
- public ConnectorComponentCreationFacetOperation(IDataModel model) {
- super(model);
- }
-
- public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- String projectName = model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME);
- dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, projectName);
-
- FacetDataModelMap map = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- map.add(setupJavaInstallAction());
- IDataModel newModel = setupConnectorInstallAction();
- map.add(newModel);
- setRuntime(newModel, dm); // Setting runtime property
-
- IStatus stat = dm.getDefaultOperation().execute(monitor, info);
- if (stat.isOK()) {
- String earProjectName = (String) model.getProperty(IJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_NAME);
- IProject earProject = ProjectUtilities.getProject(earProjectName);
- if (earProject != null && earProject.exists())
- stat = addtoEar(projectName, earProjectName);
- }
-
- return stat;
- }
-
- protected IDataModel setupConnectorInstallAction() {
- String versionStr = model.getPropertyDescriptor(IJ2EEComponentCreationDataModelProperties.COMPONENT_VERSION).getPropertyDescription();
- IDataModel connectorFacetInstallDataModel = DataModelFactory.createDataModel(new ConnectorFacetInstallDataModelProvider());
- connectorFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME));
- connectorFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, versionStr);
- connectorFacetInstallDataModel.setProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER, model.getStringProperty(IJavaComponentCreationDataModelProperties.JAVASOURCE_FOLDER));
- connectorFacetInstallDataModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR,model.getBooleanProperty(IJ2EEComponentCreationDataModelProperties.ADD_TO_EAR));
- if (model.getBooleanProperty(IJ2EEComponentCreationDataModelProperties.ADD_TO_EAR))
- connectorFacetInstallDataModel.setProperty(IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME, model.getProperty(IJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_NAME));
- connectorFacetInstallDataModel.setProperty(IJ2EEModuleFacetInstallDataModelProperties.RUNTIME_TARGET_ID, model.getProperty(IJ2EEComponentCreationDataModelProperties.RUNTIME_TARGET_ID));
- return connectorFacetInstallDataModel;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentExportDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentExportDataModelProvider.java
deleted file mode 100644
index 968405838..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentExportDataModelProvider.java
+++ /dev/null
@@ -1,70 +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.jca.operations;
-
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentExportDataModelProvider;
-import org.eclipse.jst.j2ee.internal.earcreation.EARCreationResourceHandler;
-import org.eclipse.jst.j2ee.internal.jca.archive.operations.ConnectorComponentExportOperation;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class ConnectorComponentExportDataModelProvider extends J2EEComponentExportDataModelProvider {
-
- public ConnectorComponentExportDataModelProvider() {
- super();
- }
-
- public IDataModelOperation getDefaultOperation() {
- return new ConnectorComponentExportOperation(model);
- }
-
- protected String getProjectType() {
- return J2EEProjectUtilities.JCA;
- }
-
- protected String getWrongComponentTypeString(String projectName) {
- return EARCreationResourceHandler.getString(EARCreationResourceHandler.NOT_A_RAR, new Object[]{projectName});
- }
-
- protected String getModuleExtension() {
- return ".rar"; //$NON-NLS-1$
- }
- /**
- * Exports the specified Connector Module project to the specified Connector RAR file.
- *
- * @param connectorProjectName
- * The name of the Connector Module project to export.
- * @param rarFileName
- * The fully qualified Connector RAR file location to export the specified Connector
- * Module project.
- * @param overwriteExisting
- * If this is <code>true</code> then an existing file at the location specified by
- * <code>earFileName</code> will be overwritten.
- * @param exportSource
- * If this is <code>true</code> then all source files in the specified Connector
- * Module will be included in the resulting Connector RAR file.
- * @plannedfor WTP 1.0
- */
-// public static void exportProject(String connectorProjectName, String rarFileName, boolean overwriteExisting, boolean exportSource) {
-// ConnectorModuleExportDataModel dataModel = new ConnectorModuleExportDataModel();
-// dataModel.setProperty(PROJECT_NAME, connectorProjectName);
-// dataModel.setBooleanProperty(OVERWRITE_EXISTING, overwriteExisting);
-// dataModel.setProperty(ARCHIVE_DESTINATION, rarFileName);
-// dataModel.setBooleanProperty(EXPORT_SOURCE_FILES, exportSource);
-// try {
-// dataModel.getDefaultOperation().run(null);
-// } catch (InvocationTargetException e) {
-// Logger.getLogger().logError(e);
-// } catch (InterruptedException e) {
-// Logger.getLogger().logError(e);
-// }
-// }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentImportDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentImportDataModelProvider.java
deleted file mode 100644
index 91995ee1f..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentImportDataModelProvider.java
+++ /dev/null
@@ -1,55 +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.jca.operations;
-
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentImportDataModelProvider;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.XMLResource;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-/**
- * This dataModel is used for to import Connector Modules (from RAR files) into the workspace.
- *
- * This class (and all its fields and methods) is likely to change during the WTP 1.0 milestones as
- * the new project structures are adopted. Use at your own risk.
- *
- * @plannedfor WTP 1.0
- */
-public final class ConnectorComponentImportDataModelProvider extends J2EEComponentImportDataModelProvider {
-
- public void init() {
- super.init();
- setIntProperty(IConnectorComponentCreationDataModelProperties.COMPONENT_VERSION, J2EEVersionConstants.J2EE_1_3_ID);
- }
-
- protected int getType() {
- return XMLResource.RAR_TYPE;
- }
-
- protected Archive openArchive(String uri) throws OpenFailureException {
- Archive archive = CommonarchiveFactory.eINSTANCE.openRARFile(getArchiveOptions(), uri);
- return archive;
- }
-
- protected IDataModel createJ2EEComponentCreationDataModel() {
- return DataModelFactory.createDataModel(new ConnectorComponentCreationDataModelProvider());
- }
-
- public IDataModelOperation getDefaultOperation() {
- return new ConnectorComponentImportOperation(model);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentImportOperation.java b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentImportOperation.java
deleted file mode 100644
index 5b11d118d..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/ConnectorComponentImportOperation.java
+++ /dev/null
@@ -1,75 +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.jca.operations;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-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.strategy.SaveStrategy;
-import org.eclipse.jst.j2ee.internal.archive.operations.ConnectorComponentSaveStrategyImpl;
-import org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactImportOperation;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class ConnectorComponentImportOperation extends J2EEArtifactImportOperation {
-
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
-
- public ConnectorComponentImportOperation(IDataModel model) {
- super(model);
- }
-
- protected void doExecute(IProgressMonitor monitor) throws ExecutionException {
- super.doExecute(monitor);
- addAssociateArchivesToClassPath();
- }
-
- /**
- * Adds all jar within the file to the classpath.
- */
- protected void addAssociateArchivesToClassPath() {
- List extraEntries = new ArrayList();
- List archiveList = moduleFile.getArchiveFiles();
- Iterator iterator = archiveList.iterator();
- IVirtualFile vFile = null;
- IFile file = null;
- while (iterator.hasNext()) {
- Archive anArchive = (Archive) iterator.next();
- if (anArchive.getName().endsWith(JAR_EXTENSION)) {
- vFile = virtualComponent.getRootFolder().getFile(anArchive.getURI());
- if (vFile.exists()) {
- file = vFile.getUnderlyingFile();
- extraEntries.add(JavaCore.newLibraryEntry(file.getFullPath(), file.getFullPath(), null, true));
- }
- }
- }
- try {
- addToClasspath(getDataModel(), extraEntries);
- } catch (JavaModelException e) {
- Logger.getLogger().logError(e);
- }
- }
-
- protected SaveStrategy createSaveStrategy(IVirtualComponent component) {
- ConnectorComponentSaveStrategyImpl saveStrat = new ConnectorComponentSaveStrategyImpl(component);
- return saveStrat;
-
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentCreationDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentCreationDataModelProperties.java
deleted file mode 100644
index 0ce7df6b1..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentCreationDataModelProperties.java
+++ /dev/null
@@ -1,35 +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.jca.operations;
-
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-/**
- * <p>
- * IConnectorComponentCreationDataModelProperties provides properties to the
- * ConnectorComponentCreationDataModelProvider as well as all extending interfaces extending
- * IConnectorComponentCreationDataModelProperties
- * @see org.eclipse.jst.j2ee.internal.jca.operations.ConnectorComponentCreationDataModelProvider
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- * @see org.eclipse.jst.j2ee.datamodel.properties.IJavaComponentCreationDataModelProperties
- * @see org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties
- * @plannedfor 1.0
- */
-
-public interface IConnectorComponentCreationDataModelProperties extends IJ2EEComponentCreationDataModelProperties {
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentExportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentExportDataModelProperties.java
deleted file mode 100644
index fc5a54a17..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentExportDataModelProperties.java
+++ /dev/null
@@ -1,32 +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.jca.operations;
-
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties;
-/**
- * <p>
- * IConnectorComponentExportDataModel provides properties to the IDataModel associated with the
- * ConnectorComponentExportDataModelProvider.\
- * NOTE: The associated Provider and Operations will be created during M5
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-public interface IConnectorComponentExportDataModelProperties extends IJ2EEComponentExportDataModelProperties {
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentImportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentImportDataModelProperties.java
deleted file mode 100644
index f1728462c..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/IConnectorComponentImportDataModelProperties.java
+++ /dev/null
@@ -1,32 +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.jca.operations;
-
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEModuleImportDataModelProperties;
-/**
- * <p>
- * IConnectorComponentImportDataModelProperties provides properties to the IDataModel associated with the
- * ConnectorComponentImportDataModelProvider.
- * NOTE: The associated Provider and Operations will be created during M5
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-public interface IConnectorComponentImportDataModelProperties extends IJ2EEModuleImportDataModelProperties {
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/rartp10.xml b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/rartp10.xml
deleted file mode 100644
index 6d5bc9c65..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/rartp10.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE connector PUBLIC "-//Sun Microsystems, Inc.//DTD Connector 1.0//EN" "http://java.sun.com/dtd/connector_1_0.dtd">
-<connector>
- <display-name></display-name>
- <description></description>
- <vendor-name></vendor-name>
- <spec-version></spec-version>
- <eis-type></eis-type>
- <version></version>
- <license>
- <description></description>
- <license-required>false</license-required>
- </license>
- <resourceadapter>
- <managedconnectionfactory-class></managedconnectionfactory-class>
- <connectionfactory-interface></connectionfactory-interface>
- <connectionfactory-impl-class></connectionfactory-impl-class>
- <connection-interface></connection-interface>
- <connection-impl-class></connection-impl-class>
- <transaction-support></transaction-support>
- <config-property>
- <description></description>
- <config-property-name></config-property-name>
- <config-property-type></config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <authentication-mechanism>
- <description></description>
- <authentication-mechanism-type></authentication-mechanism-type>
- <credential-interface></credential-interface>
- </authentication-mechanism>
- <reauthentication-support>false</reauthentication-support>
- <security-permission>
- <description></description>
- <security-permission-spec>
- </security-permission-spec>
- </security-permission>
- </resourceadapter>
-</connector>
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/rartp15.xml b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/rartp15.xml
deleted file mode 100644
index 029561d8b..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/internal/jca/operations/rartp15.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<connector id="Connector_ID" version="1.5" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd">
- <description></description>
- <display-name></display-name>
- <vendor-name></vendor-name>
- <eis-type></eis-type>
- <resourceadapter-version></resourceadapter-version>
- <resourceadapter>
- </resourceadapter>
-</connector>
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/internal/module/util/ConnectorEditAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/internal/module/util/ConnectorEditAdapterFactory.java
deleted file mode 100644
index 52d9ed6b6..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/internal/module/util/ConnectorEditAdapterFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jca.internal.module.util;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.jca.modulecore.util.ConnectorArtifactEdit;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-import org.eclipse.wst.common.componentcore.internal.ArtifactEditModel;
-
-public class ConnectorEditAdapterFactory implements IAdapterFactory {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adapterType == ConnectorArtifactEdit.ADAPTER_TYPE || adapterType == ArtifactEdit.ADAPTER_TYPE) {
- ArtifactEditModel editModel = (ArtifactEditModel) adaptableObject;
- if (J2EEProjectUtilities.isJCAProject(editModel.getProject()))
- return new ConnectorArtifactEdit((ArtifactEditModel) adaptableObject);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[]{ArtifactEdit.class, ConnectorEditAdapterFactory.class};
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/modulecore/util/ConnectorArtifactEdit.java b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/modulecore/util/ConnectorArtifactEdit.java
deleted file mode 100644
index faf1343a2..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/modulecore/util/ConnectorArtifactEdit.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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.jca.modulecore.util;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
-import org.eclipse.jst.j2ee.componentcore.EnterpriseArtifactEdit;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.common.XMLResource;
-import org.eclipse.jst.j2ee.internal.jca.archive.operations.ConnectorComponentLoadStrategyImpl;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.jca.Connector;
-import org.eclipse.jst.j2ee.jca.ConnectorResource;
-import org.eclipse.jst.j2ee.jca.JcaFactory;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
-import org.eclipse.wst.common.componentcore.UnresolveableURIException;
-import org.eclipse.wst.common.componentcore.internal.ArtifactEditModel;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.impl.ModuleURIUtil;
-import org.eclipse.wst.common.componentcore.internal.util.IArtifactEditFactory;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-/**
- * Provides access to J2EE Connector models using the ArtifactEdit pattern.
- * <p>
- * Clients should use getConnectorArtifactForRead/Write() to acquire an instance
- * of the correct artifact edit class.
- * </p>
- */
-public class ConnectorArtifactEdit extends EnterpriseArtifactEdit implements IArtifactEditFactory {
- /**
- * <p>
- * Identifier used to link ConnectorArtifactEdit to a
- * ConnectorEditAdapterFactory {@see ConnectorEditAdapterFactory} stored in
- * an AdapterManger (@see AdapterManager)
- * </p>
- */
-
- public static final Class ADAPTER_TYPE = ConnectorArtifactEdit.class;
-
- /**
- *
- */
- public ConnectorArtifactEdit() {
- super();
- }
-
- /**
- * @param aHandle
- * @param toAccessAsReadOnly
- * @throws IllegalArgumentException
- */
- public ConnectorArtifactEdit(IProject aProject, boolean toAccessAsReadOnly) throws IllegalArgumentException {
- super(aProject, toAccessAsReadOnly);
- }
-
- public ConnectorArtifactEdit(IProject aProject, boolean toAccessAsReadOnly, boolean forCreate) throws IllegalArgumentException {
- super(aProject, toAccessAsReadOnly, forCreate, J2EEProjectUtilities.JCA);
- }
-
- /**
- * <p>
- * Creates an instance facade for the given {@see ArtifactEditModel}.
- * </p>
- *
- * @param anArtifactEditModel
- */
-
- public ConnectorArtifactEdit(ArtifactEditModel anArtifactEditModel) {
- super(anArtifactEditModel);
- }
-
- /**
- * <p>
- * Creates an instance facade for the given {@see ArtifactEditModel}
- * </p>
- * <p>
- * Note: This method is for internal use only. Clients should not call this
- * method.
- * </p>
- *
- * @param aNature
- * A non-null {@see ModuleCoreNature}for an accessible project
- * @param aModule
- * A non-null {@see WorkbenchComponent}pointing to a module from
- * the given {@see ModuleCoreNature}
- */
-
- protected ConnectorArtifactEdit(ModuleCoreNature aNature, IVirtualComponent aModule, boolean toAccessAsReadOnly) {
- super(aNature, aModule, toAccessAsReadOnly);
- }
-
- /**
- * @return ConnectorResource from (@link getDeploymentDescriptorResource())
- */
-
- public ConnectorResource getConnectorXmiResource() {
- return (ConnectorResource) getDeploymentDescriptorResource();
- }
-
- /**
- * <p>
- * Retrieves the underlying resource from the ArtifactEditModel using
- * defined URI.
- * </p>
- *
- * @return Resource
- */
-
- public Resource getDeploymentDescriptorResource() {
- return getArtifactEditModel().getResource(J2EEConstants.RAR_DD_URI_OBJ);
- }
-
- /**
- * <p>
- * Obtains the Connector (@see Connector) root object from the
- * ConnectorResource. If the root object does not exist, then one is created
- * (@link addConnectorIfNecessary(getConnectorXmiResource())). The root
- * object contains all other resource defined objects.
- * </p>
- *
- * @return EObject
- */
- public EObject getDeploymentDescriptorRoot() {
- List contents = getDeploymentDescriptorResource().getContents();
- if (contents.size() > 0)
- return (EObject) contents.get(0);
- addConnectorIfNecessary(getConnectorXmiResource());
- return (EObject) contents.get(0);
- }
-
- /**
- * <p>
- * Creates a deployment descriptor root object (Connector) and populates
- * with data. Adds the root object to the deployment descriptor resource.
- * </p>
- * <p>
- *
- * @param aModule
- * A non-null pointing to a {@see XMLResource} Note: This method
- * is typically used for JUNIT - move?
- * </p>
- */
- protected void addConnectorIfNecessary(XMLResource aResource) {
-
- if (aResource != null && aResource.getContents().isEmpty()) {
- Connector connector = JcaFactory.eINSTANCE.createConnector();
- aResource.getContents().add(connector);
- URI moduleURI = getArtifactEditModel().getModuleURI();
- try {
- connector.setDisplayName(StructureEdit.getDeployedName(moduleURI));
- } catch (UnresolveableURIException e) {
- //Ignore
- }
- aResource.setID(connector, J2EEConstants.CONNECTOR_ID);
- // TODO add more mandatory elements
- }
- }
-
- /**
- * <p>
- * Returns an instance facade to manage the underlying edit model for the
- * given {@see WorkbenchComponent}. Instances of ArtifactEdit that are
- * returned through this method must be {@see #dispose()}ed of when no
- * longer in use.
- * </p>
- * <p>
- * Use to acquire an ArtifactEdit facade for a specific
- * {@see WorkbenchComponent}&nbsp;that will not be used for editing.
- * Invocations of any save*() API on an instance returned from this method
- * will throw exceptions.
- * </p>
- * <p>
- * <b>The following method may return null. </b>
- * </p>
- *
- * @param aModule
- * A valid {@see WorkbenchComponent}&nbsp;with a handle that
- * resolves to an accessible project in the workspace
- * @return An instance of ArtifactEdit that may only be used to read the
- * underlying content model
- */
- public static ConnectorArtifactEdit getConnectorArtifactEditForRead(IProject aProject) {
- ConnectorArtifactEdit artifactEdit = null;
- try {
- if (isValidConnectorModule(ComponentCore.createComponent(aProject)))
- artifactEdit = new ConnectorArtifactEdit(aProject, true, false);
- } catch (Exception e) {
- artifactEdit = null;
- }
- return artifactEdit;
- }
-
- /**
- * <p>
- * Returns an instance facade to manage the underlying edit model for the
- * given {@see WorkbenchComponent}. Instances of ArtifactEdit that are
- * returned through this method must be {@see #dispose()}ed of when no
- * longer in use.
- * </p>
- * <p>
- * Use to acquire an ArtifactEdit facade for a specific
- * {@see WorkbenchComponent}&nbsp;that will be used for editing.
- * </p>
- * <p>
- * <b>The following method may return null. </b>
- * </p>
- *
- * @param aModule
- * A valid {@see WorkbenchComponent}&nbsp;with a handle that
- * resolves to an accessible project in the workspace
- * @return An instance of ArtifactEdit that may be used to modify and
- * persist changes to the underlying content model
- */
- public static ConnectorArtifactEdit getConnectorArtifactEditForWrite(IProject aProject) {
- ConnectorArtifactEdit artifactEdit = null;
- try {
- if (isValidConnectorModule(ComponentCore.createComponent(aProject)))
- artifactEdit = new ConnectorArtifactEdit(aProject, false, false);
- } catch (Exception e) {
- artifactEdit = null;
- }
- return artifactEdit;
- }
-
- /**
- * <p>
- * Returns an instance facade to manage the underlying edit model for the
- * given {@see WorkbenchComponent}. Instances of ConnectorArtifactEdit that
- * are returned through this method must be {@see #dispose()}ed of when no
- * longer in use.
- * </p>
- * <p>
- * Use to acquire an ConnectorArtifactEdit facade for a specific
- * {@see WorkbenchComponent}&nbsp;that will not be used for editing.
- * Invocations of any save*() API on an instance returned from this method
- * will throw exceptions.
- * </p>
- * <p>
- * <b>This method may return null. </b>
- * </p>
- * <p>
- * Note: This method is for internal use only. Clients should not call this
- * method.
- * </p>
- *
- * @param aModule
- * A valid {@see WorkbenchComponent}&nbsp;with a handle that
- * resolves to an accessible project in the workspace
- * @return An instance of ConnectorArtifactEdit that may only be used to
- * read the underlying content model
- * @throws UnresolveableURIException
- * could not resolve uri.
- */
- public static ConnectorArtifactEdit getConnectorArtifactEditForRead(IVirtualComponent aModule) {
- if (aModule == null)
- return null;
- return getConnectorArtifactEditForRead(aModule.getProject());
- }
-
- /**
- * <p>
- * Returns an instance facade to manage the underlying edit model for the
- * given {@see WorkbenchComponent}. Instances of ConnectorArtifactEdit that
- * are returned through this method must be {@see #dispose()}ed of when no
- * longer in use.
- * </p>
- * <p>
- * Use to acquire an ConnectorArtifactEdit facade for a specific
- * {@see WorkbenchComponent}&nbsp;that will be used for editing.
- * </p>
- * <p>
- * <b>This method may return null. </b>
- * </p>
- * <p>
- * Note: This method is for internal use only. Clients should not call this
- * method.
- * </p>
- *
- * @param aModule
- * A valid {@see WorkbenchComponent}&nbsp;with a handle that
- * resolves to an accessible project in the workspace
- * @return An instance of ConnectorArtifactEdit that may be used to modify
- * and persist changes to the underlying content model
- */
- public static ConnectorArtifactEdit getConnectorArtifactEditForWrite(IVirtualComponent aModule) {
- if (aModule == null)
- return null;
- return getConnectorArtifactEditForWrite(aModule.getProject());
- }
-
- /**
- * @param module
- * A {@see WorkbenchComponent}
- * @return True if the supplied module
- * {@see ArtifactEdit#isValidEditableModule(WorkbenchComponent)}and
- * the moduleTypeId is a JST module
- */
- public static boolean isValidConnectorModule(IVirtualComponent aModule) throws UnresolveableURIException {
- if (!isValidEditableModule(aModule))
- return false;
- /* and match the JST_Connector_MODULE type */
- return J2EEProjectUtilities.isJCAProject(aModule.getProject());
- }
-
- /**
- * <p>
- * Retrieves J2EE version information from ConnectorResource.
- * </p>
- *
- * @return an integer representation of a J2EE Spec version
- */
-
- public int getJ2EEVersion() {
- return getConnectorXmiResource().getJ2EEVersionID();
- }
-
- /**
- * @return Connector from (@link getDeploymentDescriptorRoot())
- */
- public Connector getConnector() {
- return (Connector) getDeploymentDescriptorRoot();
- }
-
- public EObject createModelRoot() {
- return createModelRoot(getJ2EEVersion());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.modulecore.util.EnterpriseArtifactEdit#createModelRoot(java.lang.Integer)
- */
- public EObject createModelRoot(int version) {
- ConnectorResource res = (ConnectorResource) getDeploymentDescriptorResource();
- res.setModuleVersionID(version);
- addConnectorIfNecessary(res);
- return ((ConnectorResource) getDeploymentDescriptorResource()).getRootObject();
- }
-
- public ArtifactEdit createArtifactEditForRead(IVirtualComponent aComponent) {
-
- return getConnectorArtifactEditForRead(aComponent);
- }
-
- public ArtifactEdit createArtifactEditForWrite(IVirtualComponent aComponent) {
- return getConnectorArtifactEditForWrite(aComponent);
- }
-
- public Archive asArchive(boolean includeSource) throws OpenFailureException{
- ConnectorComponentLoadStrategyImpl loader = new ConnectorComponentLoadStrategyImpl(getComponent());
- loader.setExportSource(includeSource);
- String uri = ModuleURIUtil.getHandleString(getComponent());
- return CommonarchiveFactory.eINSTANCE.openRARFile(loader, uri);
- }
-
- public static void createDeploymentDescriptor(IProject project, int version) {
- ConnectorArtifactEdit jcaEdit = new ConnectorArtifactEdit(project,false,true);
- try {
- jcaEdit.createModelRoot(version);
- jcaEdit.save(null);
- } finally {
- jcaEdit.dispose();
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/modulecore/util/package.xml b/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/modulecore/util/package.xml
deleted file mode 100644
index b428bb6eb..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/rarproject/org/eclipse/jst/j2ee/jca/modulecore/util/package.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html>
- <head>
- <meta
- name="root"
- content="../../../../../../../" />
- <title>WebArtifactEdit api overview</title>
- </head>
-
- <body>
- <abstract>
- This package includes the ConnectorArtifactEdit api. This api is used to work with the emf model
- of a flexible connector module. It contains api to read and serialize out the emf model for connector modules.
- </abstract>
-
- <a href="#top">top</a>
- </body>
-</html>
- \ No newline at end of file

Back to the top