Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.jca/jca')
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JCAResourceHandler.java39
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JcaModuleExtensionImpl.java75
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JcaPlugin.java156
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetInstallDataModelProvider.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetInstallDelegate.java192
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetPostInstallDelegate.java81
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetProjectCreationDataModelProvider.java69
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/IConnectorFacetInstallDataModelProperties.java18
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/rartp10.xml39
-rw-r--r--plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/rartp15.xml10
10 files changed, 0 insertions, 716 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JCAResourceHandler.java b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JCAResourceHandler.java
deleted file mode 100644
index 98429cfa7..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JCAResourceHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 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.plugin;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class JCAResourceHandler extends NLS {
-
- private static final String BUNDLE_NAME = "rar";//$NON-NLS-1$
-
- private JCAResourceHandler() {
- // Do not instantiate
- }
-
- public static String LicenseItemProvider_UI_0;
- public static String SecurityPermissionItemProvider_UI_0;
- public static String ConfigPropertyItemProvider_UI_0;
- public static String _UI_ResourceAdapter_type;
- public static String _UI_OutboundResourceAdapter_type;
- public static String _UI_ConnectionDefinition_type;
- public static String _UI_InboundResourceAdapter_type;
- public static String _UI_MessageAdapter_type;
- public static String _UI_MessageListener_type;
- public static String _UI_ActivationSpec_type;
- public static String _UI_RequiredConfigPropertyType_type;
- public static String _UI_AdminObject_type;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, JCAResourceHandler.class);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JcaModuleExtensionImpl.java b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JcaModuleExtensionImpl.java
deleted file mode 100644
index 27df27099..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JcaModuleExtensionImpl.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
- *******************************************************************************/
-/*
- * Created on Sep 29, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.jca.internal.plugin;
-
-
-import org.eclipse.jst.j2ee.internal.jca.operations.ConnectorComponentImportDataModelProvider;
-import org.eclipse.jst.j2ee.internal.moduleextension.EarModuleExtensionImpl;
-import org.eclipse.jst.j2ee.internal.moduleextension.JcaModuleExtension;
-import org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetProjectCreationDataModelProvider;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-
-public class JcaModuleExtensionImpl extends EarModuleExtensionImpl implements JcaModuleExtension {
-
- /**
- *
- */
- public JcaModuleExtensionImpl() {
- super();
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.JcaModuleExtension#createProjectInfo()
- */
- // public J2EEJavaProjectInfo createProjectInfo() {
- // return new ConnectorProjectInfo();
- // }
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.JcaModuleExtension#createImportOperation(org.eclipse.core.resources.IProject,
- * org.eclipse.jst.j2ee.internal.internal.commonarchivecore.RARFile)
- */
- // public J2EEImportOperation createImportOperation(IProject proj, RARFile rarFile){
- // return new RARImportOperation(proj, rarFile);
- // }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.EarModuleExtension#createProjectDataModel()
- */
- public IDataModel createProjectDataModel() {
- return DataModelFactory.createDataModel(new ConnectorFacetProjectCreationDataModelProvider());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.EarModuleExtension#createImportDataModel()
- */
- public IDataModel createImportDataModel() {
- return DataModelFactory.createDataModel(new ConnectorComponentImportDataModelProvider());
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JcaPlugin.java b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JcaPlugin.java
deleted file mode 100644
index 7feb60873..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/internal/plugin/JcaPlugin.java
+++ /dev/null
@@ -1,156 +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.jca.internal.plugin;
-
-
-import java.io.IOException;
-import java.net.URL;
-import java.text.MessageFormat;
-
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.jca.internal.impl.ConnectorResourceFactory;
-import org.eclipse.wst.common.componentcore.internal.impl.WTPResourceFactoryRegistry;
-import org.eclipse.wst.common.frameworks.internal.WTPPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * This is a top-level class of the j2ee plugin.
- *
- * @see AbstractUIPlugin for additional information on UI plugins
- */
-
-public class JcaPlugin extends WTPPlugin implements ResourceLocator {
- // Default instance of the receiver
- private static JcaPlugin inst;
- protected final IPath iconsFolder = new Path(Platform.getBundle(PLUGIN_ID).getEntry("icons").getPath()); //$NON-NLS-1$
-
- public static final String PLUGIN_ID = "org.eclipse.jst.j2ee.jca"; //$NON-NLS-1$
- // Validation part of the plugin
- //Global ResourceSet (somewhat global)
-
- public static final String[] ICON_DIRS = new String[]{"icons/full/obj16", //$NON-NLS-1$
- "icons/full/cview16", //$NON-NLS-1$
- "icons/full/ctool16", //$NON-NLS-1$
- "icons/full/clcl16", //$NON-NLS-1$
- "icons/full/ovr16", //$NON-NLS-1$
- "icons/full/extra", //$NON-NLS-1$
- "icons/full/wizban", //$NON-NLS-1$
- "icons", //$NON-NLS-1$
- ""}; //$NON-NLS-1$
-
- /**
- * Create the J2EE plugin and cache its default instance
- */
- public JcaPlugin() {
- super();
- if (inst == null)
- inst = this;
- }
-
-
- /**
- * Get the plugin singleton.
- */
- static public JcaPlugin getDefault() {
- return inst;
- }
-
- /*
- * Javadoc copied from interface.
- */
- public URL getBaseURL() {
- return getBundle().getEntry("/"); //$NON-NLS-1$
- }
-
- /**
- * This gets a .gif from the icons folder.
- */
- public Object getImage(String key) {
- return J2EEPlugin.getImageURL(key, getBundle());
- }
-
-
- public static URL getInstallURL() {
- return getDefault().getBundle().getEntry("/"); //$NON-NLS-1$
- }
-
- /**
- * Get the singleton instance.
- */
- public static JcaPlugin getPlugin() {
- return inst;
- }
-
- /**
- * Return the plugin directory location- the directory that all the plugins are located in (i.e.
- * d:\installdir\plugin)
- */
- public static IPath getPluginLocation(String pluginId) {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- Bundle bundle = Platform.getBundle(pluginId);
- if (bundle != null) {
- try {
- IPath installPath = new Path(bundle.getEntry("/").toExternalForm()).removeTrailingSeparator(); //$NON-NLS-1$
- String installStr = Platform.asLocalURL(new URL(installPath.toString())).getFile();
- return new Path(installStr);
- } catch (IOException e) {
- //Ignore
- }
- }
- return null;
- }
-
- /*
- * Javadoc copied from interface.
- */
- public String getString(String key) {
- return Platform.getResourceString(getBundle(), key);
- }
-
- /*
- * Javadoc copied from interface.
- */
- public String getString(String key, Object[] substitutions) {
- return MessageFormat.format(getString(key), substitutions);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.WTPPlugin#getPluginID()
- */
- public String getPluginID() {
- return PLUGIN_ID;
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- ConnectorResourceFactory.register(WTPResourceFactoryRegistry.INSTANCE);
- }
- public String getString(String key, boolean translate) {
- // TODO For now... translate not supported
- return getString(key);
- }
-
- public String getString(String key, Object[] substitutions, boolean translate) {
- // TODO For now... translate not supported
- return getString(key,substitutions);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetInstallDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetInstallDataModelProvider.java
deleted file mode 100644
index 4d7d2dad5..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetInstallDataModelProvider.java
+++ /dev/null
@@ -1,37 +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.project.facet;
-
-import org.eclipse.jst.j2ee.internal.common.CreationConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.J2EEModuleFacetInstallDataModelProvider;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-public class ConnectorFacetInstallDataModelProvider extends J2EEModuleFacetInstallDataModelProvider implements IConnectorFacetInstallDataModelProperties {
-
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(FACET_ID)) {
- return J2EEProjectUtilities.JCA;
- } else if (propertyName.equals(CONFIG_FOLDER))
- return CreationConstants.DEFAULT_CONNECTOR_SOURCE_FOLDER;
- else if (propertyName.equals(MODULE_URI)) {
- String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ','_');
- return projectName + IJ2EEModuleConstants.RAR_EXT;
- }
- return super.getDefaultProperty(propertyName);
- }
-
- protected int convertFacetVersionToJ2EEVersion(IProjectFacetVersion version) {
- return J2EEVersionUtil.convertConnectorVersionStringToJ2EEVersionID(version.getVersionString());
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetInstallDelegate.java b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetInstallDelegate.java
deleted file mode 100644
index 710267906..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetInstallDelegate.java
+++ /dev/null
@@ -1,192 +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.project.facet;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jem.util.emf.workbench.WorkbenchByteArrayOutputStream;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.common.project.facet.WtpUtils;
-import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.jca.Connector;
-import org.eclipse.jst.j2ee.jca.modulecore.util.ConnectorArtifactEdit;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.J2EEFacetInstallDelegate;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.datamodel.FacetDataModelProvider;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-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;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.project.facet.core.IDelegate;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.project.facet.IProductConstants;
-import org.eclipse.wst.project.facet.ProductManager;
-
-public class ConnectorFacetInstallDelegate extends J2EEFacetInstallDelegate implements IDelegate {
-
- public static final String CONNECTOR_XML_TEMPLATE_10 = "rartp10.xml"; //$NON-NLS-1$
- public static final String CONNECTOR_XML_TEMPLATE_15 = "rartp15.xml"; //$NON-NLS-1$
-
- public void execute(IProject project, IProjectFacetVersion fv, Object config, IProgressMonitor monitor) throws CoreException {
- if (monitor != null) {
- monitor.beginTask("", 1); //$NON-NLS-1$
- }
-
- try {
- IDataModel model = (IDataModel) config;
-
- final IJavaProject jproj = JavaCore.create(project);
-
- // Add WTP natures.
-
- WtpUtils.addNatures(project);
-
- // Create the directory structure.
-
- final IWorkspace ws = ResourcesPlugin.getWorkspace();
- final IPath pjpath = project.getFullPath();
-
- // Setup the flexible project structure.
-
- final IVirtualComponent c = ComponentCore.createComponent(project);
-
- c.create(0, null);
- c.setMetaProperty("java-output-path", ProductManager.getProperty(IProductConstants.OUTPUT_FOLDER)); //$NON-NLS-1$
-
- final IVirtualFolder root = c.getRootFolder();
- IFolder sourceFolder = null;
- String configFolder = null;
- configFolder = model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER);
- root.createLink(new Path("/" + configFolder), 0, null); //$NON-NLS-1$
- String configFolderName = model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER);
- IPath configFolderpath = pjpath.append(configFolderName);
- sourceFolder = ws.getRoot().getFolder(configFolderpath);
-
- if (!sourceFolder.getFile(J2EEConstants.RAR_DD_URI).exists()) {
- String ver = model.getStringProperty(IFacetDataModelProperties.FACET_VERSION_STR);
- int nVer = J2EEVersionUtil.convertVersionStringToInt(ver);
-
- IFile aFile = sourceFolder.getFile(new Path(J2EEConstants.RAR_DD_URI));
- OutputStream out = new WorkbenchByteArrayOutputStream(aFile);
- String template = nVer == J2EEVersionConstants.JCA_1_0_ID
- ? CONNECTOR_XML_TEMPLATE_10
- : CONNECTOR_XML_TEMPLATE_15;
- InputStream in = getClass().getResourceAsStream(template);
- if (in != null & out != null) {
- try {
- ArchiveUtil.copy(in, out);
- } catch (IOException ioe) {
- Logger.getLogger().logError(ioe);
- } finally{
- try{
- if(null != out){
- out.close();
- } if(null != in){
- in.close();
- }
- }catch (IOException ioe) {
- Logger.getLogger().logError(ioe);
- }
- }
-
- ConnectorArtifactEdit edit = new ConnectorArtifactEdit(project, false, true);
- try{
- if( edit != null ){
- Connector connector = edit.getConnector();
- connector.setDisplayName(project.getName());
- edit.saveIfNecessary(new NullProgressMonitor());
- }
- }finally{
- if( edit != null ){
- edit.dispose();
- }
- }
- } else {
- //without a template
- ConnectorArtifactEdit.createDeploymentDescriptor(project, nVer);
- } // if
- }
-
- // add source folder maps
- final IClasspathEntry[] cp = jproj.getRawClasspath();
- for (int i = 0; i < cp.length; i++) {
- final IClasspathEntry cpe = cp[i];
- if (cpe.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
- root.createLink(cpe.getPath().removeFirstSegments(1), 0, null);
- }
- }
-
- IVirtualFile vf = c.getRootFolder().getFile(new Path(J2EEConstants.MANIFEST_URI));
- IFile manifestmf = vf.getUnderlyingFile();
- if (manifestmf == null || !manifestmf.exists()) {
- try {
- createManifest(project, c.getRootFolder().getUnderlyingFolder(), monitor);
- } catch (InvocationTargetException e) {
- Logger.getLogger().logError(e);
- } catch (InterruptedException e) {
- Logger.getLogger().logError(e);
- }
- }
-
- // Setup the classpath.
- ClasspathHelper.removeClasspathEntries(project, fv);
-
- if (!ClasspathHelper.addClasspathEntries(project, fv)) {
- // TODO: Support the no runtime case.
- // ClasspathHelper.addClasspathEntries( project, fv, <something> );
- }
-
-
-
- try {
- ((IDataModelOperation) model.getProperty(FacetDataModelProvider.NOTIFICATION_OPERATION)).execute(monitor, null);
- } catch (ExecutionException e) {
- Logger.getLogger().logError(e);
- }
-
- if (monitor != null) {
- monitor.worked(1);
- }
- }
-
- finally {
- if (monitor != null) {
- monitor.done();
- }
- }
-
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetPostInstallDelegate.java b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetPostInstallDelegate.java
deleted file mode 100644
index cf3b259e9..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetPostInstallDelegate.java
+++ /dev/null
@@ -1,81 +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.project.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.J2EEFacetInstallDelegate;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IDelegate;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-
-public class ConnectorFacetPostInstallDelegate extends J2EEFacetInstallDelegate implements IDelegate {
-
- public static final String CONNECTOR_XML_TEMPLATE_10 = "rartp10.xml"; //$NON-NLS-1$
- public static final String CONNECTOR_XML_TEMPLATE_15 = "rartp15.xml"; //$NON-NLS-1$
-
- public void execute(IProject project, IProjectFacetVersion fv, Object config, IProgressMonitor monitor) throws CoreException {
- if (monitor != null) {
- monitor.beginTask("", 1); //$NON-NLS-1$
- }
-
- try {
- IDataModel model = (IDataModel) config;
-
- final IVirtualComponent c = ComponentCore.createComponent(project);
-
- // Associate with an EAR, if necessary.
-
- final String earProjectName = (String) model.getProperty(IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME);
- if (model.getBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR)) {
- if (earProjectName != null && !earProjectName.equals("")) { //$NON-NLS-1$
-
- String ver = fv.getVersionString();
- String j2eeVersionText = J2EEVersionUtil.convertVersionIntToString
- (J2EEVersionUtil.convertConnectorVersionStringToJ2EEVersionID(ver));
-
- final String moduleURI = model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.MODULE_URI);
-
- IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- installAndAddModuletoEAR( j2eeVersionText,
- earProjectName,
- (IRuntime) model.getProperty(IJ2EEFacetInstallDataModelProperties.FACET_RUNTIME),
- project,
- moduleURI,
- monitor );
-
-
- }
- }
-
- if (monitor != null) {
- monitor.worked(1);
- }
- }
-
- finally {
- if (monitor != null) {
- monitor.done();
- }
- }
-
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetProjectCreationDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetProjectCreationDataModelProvider.java
deleted file mode 100644
index 3f4328123..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetProjectCreationDataModelProvider.java
+++ /dev/null
@@ -1,69 +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.project.facet;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.jst.common.project.facet.IJavaFacetInstallDataModelProperties;
-import org.eclipse.jst.common.project.facet.JavaFacetInstallDataModelProvider;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.J2EEFacetProjectCreationDataModelProvider;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-public class ConnectorFacetProjectCreationDataModelProvider extends J2EEFacetProjectCreationDataModelProvider {
-
- public ConnectorFacetProjectCreationDataModelProvider() {
- super();
- }
-
- public void init() {
- super.init();
- FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP);
- IDataModel javaFacet = DataModelFactory.createDataModel(new JavaFacetInstallDataModelProvider());
- map.add(javaFacet);
- IDataModel jcaFacet = DataModelFactory.createDataModel(new ConnectorFacetInstallDataModelProvider());
- map.add(jcaFacet);
- javaFacet.setProperty(IJavaFacetInstallDataModelProperties.SOURCE_FOLDER_NAME,jcaFacet.getStringProperty(IConnectorFacetInstallDataModelProperties.CONFIG_FOLDER));
- jcaFacet.addListener(new IDataModelListener() {
- public void propertyChanged(DataModelEvent event) {
- if (IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME.equals(event.getPropertyName())) {
- if (isPropertySet(EAR_PROJECT_NAME))
- setProperty(EAR_PROJECT_NAME, (String)event.getProperty());
- else
- model.notifyPropertyChange(EAR_PROJECT_NAME, IDataModel.DEFAULT_CHG);
- }else if (IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR.equals(event.getPropertyName())) {
- setProperty(ADD_TO_EAR, event.getProperty());
- }
- }
- });
-
- Collection requiredFacets = new ArrayList();
- requiredFacets.add(ProjectFacetsManager.getProjectFacet(javaFacet.getStringProperty(IFacetDataModelProperties.FACET_ID)));
- requiredFacets.add(ProjectFacetsManager.getProjectFacet(jcaFacet.getStringProperty(IFacetDataModelProperties.FACET_ID)));
- setProperty(REQUIRED_FACETS_COLLECTION, requiredFacets);
- }
-
- public boolean propertySet(String propertyName, Object propertyValue) {
- if( propertyName.equals( MODULE_URI )){
- FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP);
- IDataModel rarFacet = map.getFacetDataModel( J2EEProjectUtilities.JCA );
- rarFacet.setProperty( IJ2EEModuleFacetInstallDataModelProperties.MODULE_URI, propertyValue );
- }
- return super.propertySet(propertyName, propertyValue);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/IConnectorFacetInstallDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/IConnectorFacetInstallDataModelProperties.java
deleted file mode 100644
index fbdf2baaf..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/IConnectorFacetInstallDataModelProperties.java
+++ /dev/null
@@ -1,18 +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.project.facet;
-
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-
-public interface IConnectorFacetInstallDataModelProperties
- extends IJ2EEModuleFacetInstallDataModelProperties{
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/rartp10.xml b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/rartp10.xml
deleted file mode 100644
index 6d5bc9c65..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/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/jca/org/eclipse/jst/j2ee/jca/project/facet/rartp15.xml b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/rartp15.xml
deleted file mode 100644
index 029561d8b..000000000
--- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/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>

Back to the top