Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 203158 | Differences between
and this patch

Collapse All | Expand All

(-)META-INF/MANIFEST.MF (-3 / +10 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: Zseries Plug-in
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.zseries
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.zseries;singleton:=true
5
Bundle-Version: 1.0.0
5
Bundle-Version: 1.0.0.200709132
6
Bundle-Localization: plugin
7
Bundle-Vendor: %providerName
8
Export-Package: org.eclipse.datatools.enablement.ibm.db2.internal.zseries
9
Require-Bundle: org.eclipse.datatools.connectivity;bundle-version="[1.0.1,2.0.0)",
10
 org.eclipse.datatools.connectivity.db.generic;bundle-version="[1.0.0,2.0.0)",
11
 org.eclipse.datatools.connectivity.sqm.core;bundle-version="[1.0.1,2.0.0)"
12
Bundle-RequiredExecutionEnvironment: J2SE-1.4
(-)build.properties (-1 / +5 lines)
Lines 1-4 Link Here
1
source.. = src/
1
source.. = src/
2
output.. = bin/
2
output.. = bin/
3
bin.includes = META-INF/,\
3
bin.includes = META-INF/,\
4
               .
4
               .,\
5
               plugin.xml,\
6
               plugin.properties,\
7
               icons/,\
8
               about.html
(-)plugin.xml (+155 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.0"?>
3
<plugin>
4
   <extension
5
         point="org.eclipse.datatools.connectivity.sqm.core.databaseRecognition">
6
      <recognizer
7
            class="org.eclipse.datatools.enablement.ibm.db2.internal.zseries.ZSeriesDatabaseRecognizer">
8
      </recognizer>
9
   </extension>
10
   <extension
11
         point="org.eclipse.datatools.connectivity.connectionProfile">
12
      <connectionProfile
13
            category="org.eclipse.datatools.connectivity.db.category"
14
            configurationType="org.eclipse.datatools.connectivity.db.generic.configurationType"
15
            icon="icons/jdbc_16.gif"
16
            id="org.eclipse.datatools.enablement.ibm.db2.zseries.connectionProfile"
17
            name="%profile.db2.zseries.title"
18
            pingFactory="org.eclipse.datatools.enablement.ibm.db2.internal.zseries.JDBCZSeriesConnectionFactory"
19
            propertiesPersistenceHook="org.eclipse.datatools.enablement.ibm.db2.internal.zseries.ZSeriesDBPropertiesPersistenceHook"/>
20
      <connectionFactory
21
            class="org.eclipse.datatools.enablement.ibm.db2.internal.zseries.JDBCZSeriesConnectionFactory"
22
            id="java.sql.Connection"
23
            name="%jdbc.connection.name"
24
            profile="org.eclipse.datatools.enablement.ibm.db2.zseries.connectionProfile"/>
25
    </extension>
26
27
   
28
	<extension
29
         point="org.eclipse.datatools.connectivity.driverExtension">    
30
         <category
31
      		parentCategory="org.eclipse.datatools.connectivity.db.driverCategory"
32
            id="org.eclipse.datatools.enablement.ibm.db2.zseries.driverCategory"
33
            name="%DB2_UDB_ZSERIES_CATEGORY_NAME"/>
34
                 
35
      <driverTemplate
36
            createDefault="false"
37
            emptyJarListIsOK="false"
38
            id="org.eclipse.datatools.enablement.ibm.db2.zseries.driverTemplate"
39
            jarList="C:\Program Files\IBM\SQLLIB\java\db2jcc.jar,C:\Program Files\IBM\SQLLIB\java\db2jcc_license_cisuz.jar"
40
            name="%org.eclipse.datatools.enablement.ibm.db2.zseries.driverTemplate"
41
            parentCategory="org.eclipse.datatools.enablement.ibm.db2.zseries.driverCategory">
42
         <properties>
43
            <property
44
                  generated="false"
45
                  id="org.eclipse.datatools.connectivity.db.driverClass"
46
                  name="%driverClass"
47
                  value="com.ibm.db2.jcc.DB2Driver"
48
                  required="true"
49
                  visible="true"/>
50
            <property
51
                  generated="false"
52
                  id="org.eclipse.datatools.connectivity.db.vendor"
53
                  name="%driverVendor"
54
                  value="DB2 UDB zSeries"
55
                  required="true"
56
                  visible="false"/>
57
            <property
58
                  generated="false"
59
                  id="org.eclipse.datatools.connectivity.db.version"
60
                  name="%driverVersion"
61
                  value="V9 (New-Function Mode)"
62
                  required="true"
63
                  visible="false"/>   
64
            <property
65
                  generated="false"
66
                  id="org.eclipse.datatools.connectivity.db.databaseName"
67
                  name="%driverDBName"
68
                  value="location"
69
                  required="true"
70
                  visible="true"/>                             
71
            <property
72
                  generated="false"
73
                  id="org.eclipse.datatools.connectivity.db.URL"
74
                  name="%driverConnectionURL"
75
                  value="jdbc:db2://host:446/location:retrieveMessagesFromServerOnGetMessage=true;"
76
                  required="true"
77
                  visible="true"/>
78
            <property
79
                  generated="false"
80
                  id="org.eclipse.datatools.connectivity.db.username"
81
                  name="%driverUID"
82
                  value=""
83
                  required="false"
84
                  visible="true"/>
85
            <property
86
                  customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
87
                  generated="false"
88
                  id="org.eclipse.datatools.connectivity.db.password"
89
                  name="%driverPWD"
90
                  required="false"
91
                  visible="true"/>
92
         </properties>
93
      </driverTemplate>
94
   
95
      <driverTemplate
96
            createDefault="false"
97
            emptyJarListIsOK="false"
98
            id="org.eclipse.datatools.enablement.ibm.db2.zseries.other.driverTemplate"
99
            jarList=""
100
            name="%org.eclipse.datatools.enablement.ibm.db2.zseries.other.driverTemplate"
101
            parentCategory="org.eclipse.datatools.enablement.ibm.db2.zseries.driverCategory">
102
         <properties>
103
            <property
104
                  generated="false"
105
                  id="org.eclipse.datatools.connectivity.db.driverClass"
106
                  name="%driverClass"
107
                  value=""
108
                  required="true"
109
                  visible="true"/>
110
            <property
111
                  generated="false"
112
                  id="org.eclipse.datatools.connectivity.db.vendor"
113
                  name="%driverVendor"
114
                  value="DB2 UDB zSeries"
115
                  required="true"
116
                  visible="false"/>
117
            <property
118
                  generated="false"
119
                  id="org.eclipse.datatools.connectivity.db.version"
120
                  name="%driverVersion"
121
                  value="V9 (New-Function Mode)"
122
                  required="true"
123
                  visible="false"/>   
124
            <property
125
                  generated="false"
126
                  id="org.eclipse.datatools.connectivity.db.databaseName"
127
                  name="%driverDBName"
128
                  value=""
129
                  required="true"
130
                  visible="true"/>                             
131
            <property
132
                  generated="false"
133
                  id="org.eclipse.datatools.connectivity.db.URL"
134
                  name="%driverConnectionURL"
135
                  value=""
136
                  required="true"
137
                  visible="true"/>
138
            <property
139
                  generated="false"
140
                  id="org.eclipse.datatools.connectivity.db.username"
141
                  name="%driverUID"
142
                  value=""
143
                  required="false"
144
                  visible="true"/>
145
            <property
146
                  customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
147
                  generated="false"
148
                  id="org.eclipse.datatools.connectivity.db.password"
149
                  name="%driverPWD"
150
                  required="false"
151
                  visible="true"/>
152
         </properties>
153
      </driverTemplate>
154
   </extension>
155
 </plugin>  
(-)plugin.properties (+28 lines)
Added Link Here
1
###############################################################################
2
# Copyright (c) 2006, 2007 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
6
# http://www.eclipse.org/legal/epl-v10.html
7
# 
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
10
###############################################################################
11
pluginName=Eclipse Data Tools Platform IBM DB2 UDB zSeries Plug-in
12
providerName=Eclipse.org
13
14
driverClass = Driver Class
15
driverVendor = Vendor
16
driverVersion = Version
17
driverDBName = Database Name
18
driverConnectionURL = Connection URL
19
driverUID = User ID
20
driverPWD = Password
21
22
DB2_UDB_ZSERIES_CATEGORY_NAME = DB2 for z/OS
23
24
org.eclipse.datatools.enablement.ibm.db2.zseries.driverTemplate = IBM Data Server Driver for JDBC and SQLJ
25
org.eclipse.datatools.enablement.ibm.db2.zseries.other.driverTemplate = Other Driver
26
27
jdbc.connection.name = JDBC Connection
28
profile.db2.zseries.title = DB2 for z/OS
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/zseries/JDBCZSeriesJDBCConnection.java (+69 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.zseries;
12
13
import java.sql.Connection;
14
import java.sql.DatabaseMetaData;
15
import java.sql.SQLException;
16
import java.util.Properties;
17
18
import org.eclipse.datatools.connectivity.IConnectionProfile;
19
import org.eclipse.datatools.connectivity.Version;
20
import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
21
import org.eclipse.datatools.connectivity.db.generic.JDBCConnection;
22
import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinition;
23
import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinitionRegistry;
24
import org.eclipse.datatools.connectivity.sqm.internal.core.RDBCorePlugin;
25
26
public class JDBCZSeriesJDBCConnection extends JDBCConnection {
27
28
	private Version techVersion = Version.NULL_VERSION;
29
	private Version serverVersion = Version.NULL_VERSION;
30
	private String serverName;
31
	
32
	public JDBCZSeriesJDBCConnection(IConnectionProfile profile, Class factoryClass) {
33
		super(profile, factoryClass);
34
	}
35
	
36
	public String getProviderName() {
37
		return serverName;
38
	}
39
40
	public Version getProviderVersion() {
41
		return serverVersion;
42
	}
43
44
	public Version getTechnologyVersion() {
45
		return techVersion;
46
	}
47
48
	protected void initVersions() {
49
		try {
50
			DatabaseMetaData dbmd = ((Connection) this.getRawConnection())
51
					.getMetaData();
52
			try {
53
				Properties props = getConnectionProfile().getBaseProperties();
54
				String vendor = (String)props.get(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID);
55
				String version = (String)props.get(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID);
56
				DatabaseDefinitionRegistry dbDefRegistry = RDBCorePlugin.getDefault().getDatabaseDefinitionRegistry();
57
				DatabaseDefinition dbDef = dbDefRegistry.getDefinition(vendor, version);
58
				serverName = dbDef.getProductDisplayString() + " " + dbDef.getVersionDisplayString();
59
			} catch (Exception e) {
60
			}
61
			try {
62
				techVersion = new Version(dbmd.getJDBCMajorVersion(), dbmd
63
						.getJDBCMinorVersion(), 0, new String());
64
			} catch (Exception e) {
65
			}
66
		} catch (SQLException e) {
67
		}
68
	}
69
}
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/zseries/IZSeriesConnectionProfileConstants.java (+18 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.zseries;
12
13
14
public interface IZSeriesConnectionProfileConstants {
15
16
	public static final String DB2_ZSERIES_CATEGORY_ID = "org.eclipse.datatools.enablement.ibm.db2.zseries.driverCategory"; //$NON-NLS-1$
17
18
}
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/zseries/ZSeriesDatabaseRecognizer.java (+59 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.zseries;
12
13
import java.sql.Connection;
14
15
import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinition;
16
import org.eclipse.datatools.connectivity.sqm.internal.core.definition.DatabaseDefinitionRegistryImpl;
17
import org.eclipse.datatools.connectivity.sqm.internal.core.definition.IDatabaseRecognizer;
18
19
public class ZSeriesDatabaseRecognizer implements IDatabaseRecognizer {
20
    public static final String PRODUCT = "DB2 UDB zSeries"; //$NON-NLS-1$
21
	public static final String VERSION7 = "V7"; //$NON-NLS-1$
22
	public static final String VERSION8_NewFunctionMode = "V8 (New-Function Mode)"; //$NON-NLS-1$
23
	public static final String VERSION8_CompatMode = "V8 (Compatibility Mode)"; //$NON-NLS-1$
24
	public static final String VERSION9_NewFunctionMode = "V9 (New-Function Mode)"; //$NON-NLS-1$
25
	public static final String VERSION9_CompatMode = "V9 (Compatibility Mode)"; //$NON-NLS-1$
26
27
    
28
    public DatabaseDefinition recognize(Connection connection) {
29
        try {
30
            String version = connection.getMetaData().getDatabaseProductVersion();
31
            if(version.startsWith("DSN07")) { //$NON-NLS-1$
32
                return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V7"); //$NON-NLS-1$
33
            }
34
            else if(version.startsWith("DSN08")) { //$NON-NLS-1$
35
                char m = version.charAt(7);
36
                if(m > '4') {
37
                    return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V8 (New-Function Mode)"); //$NON-NLS-1$
38
                }
39
                else {
40
                    return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V8 (Compatibility Mode)");                     //$NON-NLS-1$
41
                }
42
            }
43
            else if(version.startsWith("DSN09"))
44
            {
45
            	char m = version.charAt(7);
46
                if(m > '4') {
47
                    return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V9 (New-Function Mode)"); //$NON-NLS-1$
48
                }
49
                else {
50
                    return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V9 (Compatibility Mode)");                     //$NON-NLS-1$
51
                }
52
            }
53
        }
54
        catch (Exception e) {
55
        }
56
57
        return null;
58
    }
59
}
(-)icons/jdbc_16.gif (+3 lines)
Added Link Here
1
GIF89a³€ŸŸŸ¿ÜÛÀ¿À­®­€€¿¿¿ßß¿ÿßßîîî`_`_`_öööÑÑÑÿÿÿ!ù,sÐIֈ½?I™l ‚ƒ•HD0€‚È!Fè²$0ê
2
Â
3
?P(x?ä±($ƒÁá…gÅÓpÅ¢ÉD*‰×aA?FÁi@vÛý†Ç³ròÌD­¡RTp2<_u`'‡G‘?”•–;
(-).settings/org.eclipse.jdt.core.prefs (+12 lines)
Added Link Here
1
#Fri Apr 13 14:14:14 PDT 2007
2
eclipse.preferences.version=1
3
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
4
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6
org.eclipse.jdt.core.compiler.compliance=1.4
7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
12
org.eclipse.jdt.core.compiler.source=1.4
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/zseries/ZSeriesDBPropertiesPersistenceHook.java (+17 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.zseries;
12
13
import org.eclipse.datatools.connectivity.db.generic.GenericDBPropertiesPersistenceHook;
14
15
public class ZSeriesDBPropertiesPersistenceHook extends
16
		GenericDBPropertiesPersistenceHook {
17
}
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/zseries/JDBCZSeriesConnectionFactory.java (+35 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
12
package org.eclipse.datatools.enablement.ibm.db2.internal.zseries;
13
14
import org.eclipse.datatools.connectivity.IConnection;
15
import org.eclipse.datatools.connectivity.IConnectionFactory;
16
import org.eclipse.datatools.connectivity.IConnectionProfile;
17
18
public class JDBCZSeriesConnectionFactory implements IConnectionFactory {
19
20
	public JDBCZSeriesConnectionFactory() {
21
		super();
22
	}
23
24
	public IConnection createConnection(IConnectionProfile profile) {
25
		JDBCZSeriesJDBCConnection connection = new JDBCZSeriesJDBCConnection(profile,
26
				getClass());
27
		connection.open();
28
		return connection;
29
	}
30
31
	public IConnection createConnection(IConnectionProfile profile, String uid,
32
			String pwd) {
33
		return createConnection(profile);
34
	}
35
}
(-)build.properties (-1 / +5 lines)
Lines 1-4 Link Here
1
source.. = src/
1
source.. = src/
2
output.. = bin/
2
output.. = bin/
3
bin.includes = META-INF/,\
3
bin.includes = META-INF/,\
4
               .
4
               .,\
5
               about.html,\
6
               icons/,\
7
               plugin.properties,\
8
               plugin.xml
(-)META-INF/MANIFEST.MF (-4 / +10 lines)
Lines 1-7 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: Luw Plug-in
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.luw
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.luw;singleton:=true
5
Bundle-Version: 1.0.0
5
Bundle-Version: 1.0.0.200710041
6
Require-Bundle: org.eclipse.core.runtime
6
Bundle-Localization: plugin
7
Require-Bundle: org.eclipse.datatools.connectivity;bundle-version="[1.0.1,2.0.0)",
8
 org.eclipse.datatools.connectivity.db.generic;bundle-version="[1.0.0,2.0.0)",
9
 org.eclipse.datatools.connectivity.sqm.core;bundle-version="[1.0.1,2.0.0)"
7
Eclipse-LazyStart: true
10
Eclipse-LazyStart: true
11
Export-Package: org.eclipse.datatools.enablement.ibm.db2.internal.luw
12
Bundle-Vendor: %providerName
13
Bundle-RequiredExecutionEnvironment: J2SE-1.4
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/luw/LUWDBPropertiesPersistenceHook.java (+17 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.luw;
12
13
import org.eclipse.datatools.connectivity.db.generic.GenericDBPropertiesPersistenceHook;
14
15
public class LUWDBPropertiesPersistenceHook extends
16
		GenericDBPropertiesPersistenceHook {
17
}
(-).settings/org.eclipse.jdt.core.prefs (+12 lines)
Added Link Here
1
#Fri Apr 13 14:14:14 PDT 2007
2
eclipse.preferences.version=1
3
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
4
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6
org.eclipse.jdt.core.compiler.compliance=1.4
7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
12
org.eclipse.jdt.core.compiler.source=1.4
(-)plugin.properties (+28 lines)
Added Link Here
1
###############################################################################
2
# Copyright (c) 2006, 2007 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
6
# http://www.eclipse.org/legal/epl-v10.html
7
# 
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
10
###############################################################################
11
pluginName=Eclipse Data Tools Platform IBM DB2 UDB LUW Plug-in
12
providerName=Eclipse.org
13
14
driverClass = Driver Class
15
driverVendor = Vendor
16
driverVersion = Version
17
driverDBName = Database Name
18
driverConnectionURL = Connection URL
19
driverUID = User ID
20
driverPWD = Password
21
22
DB2_UDB_CATEGORY_NAME = DB2 for Linux, UNIX, and Windows
23
24
org.eclipse.datatools.enablement.ibm.db2.luw.driverTemplate = IBM Data Server Driver for JDBC and SQLJ
25
org.eclipse.datatools.enablement.ibm.db2.luw.other.driverTemplate = Other Driver
26
27
jdbc.connection.name = JDBC Connection
28
profile.db2.luw.title = DB2 for Linux, UNIX, and Windows
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/luw/JDBCLUWConnectionFactory.java (+35 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
12
package org.eclipse.datatools.enablement.ibm.db2.internal.luw;
13
14
import org.eclipse.datatools.connectivity.IConnection;
15
import org.eclipse.datatools.connectivity.IConnectionFactory;
16
import org.eclipse.datatools.connectivity.IConnectionProfile;
17
18
public class JDBCLUWConnectionFactory implements IConnectionFactory {
19
20
	public JDBCLUWConnectionFactory() {
21
		super();
22
	}
23
24
	public IConnection createConnection(IConnectionProfile profile) {
25
		JDBCLUWJDBCConnection connection = new JDBCLUWJDBCConnection(profile,
26
				getClass());
27
		connection.open();
28
		return connection;
29
	}
30
31
	public IConnection createConnection(IConnectionProfile profile, String uid,
32
			String pwd) {
33
		return createConnection(profile);
34
	}
35
}
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/luw/ILUWConnectionProfileConstants.java (+18 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.luw;
12
13
14
public interface ILUWConnectionProfileConstants {
15
16
	public static final String DB2_LUW_CATEGORY_ID = "org.eclipse.datatools.enablement.ibm.db2.driverCategory"; //$NON-NLS-1$
17
18
}
(-)icons/jdbc_16.gif (+3 lines)
Added Link Here
1
GIF89a³€ŸŸŸ¿ÜÛÀ¿À­®­€€¿¿¿ßß¿ÿßßîîî`_`_`_öööÑÑÑÿÿÿ!ù,sÐIֈ½?I™l ‚ƒ•HD0€‚È!Fè²$0ê
2
Â
3
?P(x?ä±($ƒÁá…gÅÓpÅ¢ÉD*‰×aA?FÁi@vÛý†Ç³ròÌD­¡RTp2<_u`'‡G‘?”•–;
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/luw/JDBCLUWJDBCConnection.java (+69 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.luw;
12
13
import java.sql.Connection;
14
import java.sql.DatabaseMetaData;
15
import java.sql.SQLException;
16
import java.util.Properties;
17
18
import org.eclipse.datatools.connectivity.IConnectionProfile;
19
import org.eclipse.datatools.connectivity.Version;
20
import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
21
import org.eclipse.datatools.connectivity.db.generic.JDBCConnection;
22
import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinition;
23
import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinitionRegistry;
24
import org.eclipse.datatools.connectivity.sqm.internal.core.RDBCorePlugin;
25
26
public class JDBCLUWJDBCConnection extends JDBCConnection {
27
28
	private Version techVersion = Version.NULL_VERSION;
29
	private Version serverVersion = Version.NULL_VERSION;
30
	private String serverName;
31
32
	public JDBCLUWJDBCConnection(IConnectionProfile profile, Class factoryClass) {
33
		super(profile, factoryClass);
34
	}
35
36
	public String getProviderName() {
37
		return serverName;
38
	}
39
40
	public Version getProviderVersion() {
41
		return serverVersion;
42
	}
43
44
	public Version getTechnologyVersion() {
45
		return techVersion;
46
	}
47
48
	protected void initVersions() {
49
		try {
50
			DatabaseMetaData dbmd = ((Connection) this.getRawConnection())
51
					.getMetaData();
52
			try {
53
				Properties props = getConnectionProfile().getBaseProperties();
54
				String vendor = (String)props.get(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID);
55
				String version = (String)props.get(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID);
56
				DatabaseDefinitionRegistry dbDefRegistry = RDBCorePlugin.getDefault().getDatabaseDefinitionRegistry();
57
				DatabaseDefinition dbDef = dbDefRegistry.getDefinition(vendor, version);
58
				serverName = dbDef.getProductDisplayString() + " " + dbDef.getVersionDisplayString();
59
			} catch (Exception e) {
60
			}
61
			try {
62
				techVersion = new Version(dbmd.getJDBCMajorVersion(), dbmd
63
						.getJDBCMinorVersion(), 0, new String());
64
			} catch (Exception e) {
65
			}
66
		} catch (SQLException e) {
67
		}
68
	}
69
}
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/luw/LUWDatabaseRecognizer.java (+43 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.luw;
12
13
import java.sql.Connection;
14
15
import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinition;
16
import org.eclipse.datatools.connectivity.sqm.internal.core.definition.DatabaseDefinitionRegistryImpl;
17
import org.eclipse.datatools.connectivity.sqm.internal.core.definition.IDatabaseRecognizer;
18
19
public class LUWDatabaseRecognizer implements IDatabaseRecognizer {
20
	public static final String VERSION81 = "V8.1"; //$NON-NLS-1$
21
	public static final String VERSION82 = "V8.2"; //$NON-NLS-1$
22
	public static final String VERSION9 = "V9.1"; //$NON-NLS-1$
23
    private static final String PRODUCT = "DB2 UDB"; //$NON-NLS-1$
24
    
25
    public DatabaseDefinition recognize(Connection connection) {
26
        try {
27
            String version = connection.getMetaData().getDatabaseProductVersion();
28
            if(version.startsWith("SQL0801")) { //$NON-NLS-1$
29
                return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, VERSION81);
30
            }
31
            else if(version.startsWith("SQL0802")) { //$NON-NLS-1$
32
                return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, VERSION82);                
33
            }
34
            else if(version.startsWith("SQL0901")) { //$NON-NLS-1$
35
                return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, VERSION9);                               
36
            } 
37
        }
38
        catch (Exception e) {
39
        }
40
41
        return null;
42
    }
43
}
(-)plugin.xml (+157 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.0"?>
3
<plugin>
4
   <extension
5
         point="org.eclipse.datatools.connectivity.sqm.core.databaseRecognition">
6
      <recognizer
7
            class="org.eclipse.datatools.enablement.ibm.db2.internal.luw.LUWDatabaseRecognizer">
8
      </recognizer>
9
   </extension>
10
	<extension
11
         point="org.eclipse.datatools.connectivity.connectionProfile">
12
      <connectionProfile
13
            category="org.eclipse.datatools.connectivity.db.category"
14
            configurationType="org.eclipse.datatools.connectivity.db.generic.configurationType"
15
            icon="icons/jdbc_16.gif"
16
            id="org.eclipse.datatools.enablement.ibm.db2.luw.connectionProfile"
17
            name="%profile.db2.luw.title"
18
            pingFactory="org.eclipse.datatools.enablement.ibm.db2.internal.luw.JDBCLUWConnectionFactory"
19
            propertiesPersistenceHook="org.eclipse.datatools.enablement.ibm.db2.internal.luw.LUWDBPropertiesPersistenceHook"/>
20
      <connectionFactory
21
            class="org.eclipse.datatools.enablement.ibm.db2.internal.luw.JDBCLUWConnectionFactory"
22
            id="java.sql.Connection"
23
            name="%jdbc.connection.name"
24
            profile="org.eclipse.datatools.enablement.ibm.db2.luw.connectionProfile"/>
25
   </extension>   
26
   
27
	<extension
28
         point="org.eclipse.datatools.connectivity.driverExtension">    
29
         <category
30
      		parentCategory="org.eclipse.datatools.connectivity.db.driverCategory"
31
            id="org.eclipse.datatools.enablement.ibm.db2.driverCategory"
32
            name="%DB2_UDB_CATEGORY_NAME"/>    
33
   
34
      <driverTemplate
35
            createDefault="false"
36
            emptyJarListIsOK="false"
37
            id="org.eclipse.datatools.enablement.ibm.db2.luw.driverTemplate"
38
            jarList="C:\Program Files\IBM\SQLLIB\java\db2jcc.jar,C:\Program Files\IBM\SQLLIB\java\db2jcc_license_cisuz.jar"
39
            name="%org.eclipse.datatools.enablement.ibm.db2.luw.driverTemplate"
40
            parentCategory="org.eclipse.datatools.enablement.ibm.db2.driverCategory">
41
         <properties>
42
            <property
43
                  generated="false"
44
                  id="org.eclipse.datatools.connectivity.db.driverClass"
45
                  name="%driverClass"
46
                  value="com.ibm.db2.jcc.DB2Driver"
47
                  required="true"
48
                  visible="true"/>
49
            <property
50
                  generated="false"
51
                  id="org.eclipse.datatools.connectivity.db.vendor"
52
                  name="%driverVendor"
53
                  value="DB2 UDB"
54
                  required="true"
55
                  visible="false"/>
56
            <property
57
                  generated="false"
58
                  id="org.eclipse.datatools.connectivity.db.version"
59
                  name="%driverVersion"
60
                  value="V9.1"
61
                  required="true"
62
                  visible="false"/>   
63
            <property
64
                  generated="false"
65
                  id="org.eclipse.datatools.connectivity.db.databaseName"
66
                  name="%driverDBName"
67
                  value="SAMPLE"
68
                  required="true"
69
                  visible="true"/>                             
70
            <property
71
                  generated="false"
72
                  id="org.eclipse.datatools.connectivity.db.URL"
73
                  name="%driverConnectionURL"
74
                  value="jdbc:db2://localhost:50000/SAMPLE"
75
                  required="true"
76
                  visible="true"/>
77
            <property
78
                  generated="false"
79
                  id="org.eclipse.datatools.connectivity.db.username"
80
                  name="%driverUID"
81
                  value=""
82
                  required="false"
83
                  visible="true"/>
84
            <property
85
                  customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
86
                  generated="false"
87
                  id="org.eclipse.datatools.connectivity.db.password"
88
                  name="%driverPWD"
89
                  required="false"
90
                  visible="true"/>
91
         </properties>
92
      </driverTemplate>
93
   </extension>
94
   
95
   <extension
96
         point="org.eclipse.datatools.connectivity.driverExtension">    
97
      <driverTemplate
98
            createDefault="false"
99
            emptyJarListIsOK="false"
100
            id="org.eclipse.datatools.enablement.ibm.db2.luw.other.driverTemplate"
101
            jarList=""
102
            name="%org.eclipse.datatools.enablement.ibm.db2.luw.other.driverTemplate"
103
            parentCategory="org.eclipse.datatools.enablement.ibm.db2.driverCategory">
104
         <properties>
105
            <property
106
                  generated="false"
107
                  id="org.eclipse.datatools.connectivity.db.driverClass"
108
                  name="%driverClass"
109
                  value=""
110
                  required="true"
111
                  visible="true"/>
112
            <property
113
                  generated="false"
114
                  id="org.eclipse.datatools.connectivity.db.vendor"
115
                  name="%driverVendor"
116
                  value="DB2 UDB"
117
                  required="true"
118
                  visible="false"/>
119
            <property
120
                  generated="false"
121
                  id="org.eclipse.datatools.connectivity.db.version"
122
                  name="%driverVersion"
123
                  value="V9.1"
124
                  required="true"
125
                  visible="false"/>   
126
            <property
127
                  generated="false"
128
                  id="org.eclipse.datatools.connectivity.db.databaseName"
129
                  name="%driverDBName"
130
                  value=""
131
                  required="true"
132
                  visible="true"/>                             
133
            <property
134
                  generated="false"
135
                  id="org.eclipse.datatools.connectivity.db.URL"
136
                  name="%driverConnectionURL"
137
                  value=""
138
                  required="true"
139
                  visible="true"/>
140
            <property
141
                  generated="false"
142
                  id="org.eclipse.datatools.connectivity.db.username"
143
                  name="%driverUID"
144
                  value=""
145
                  required="false"
146
                  visible="true"/>
147
            <property
148
                  customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
149
                  generated="false"
150
                  id="org.eclipse.datatools.connectivity.db.password"
151
                  name="%driverPWD"
152
                  required="false"
153
                  visible="true"/>
154
         </properties>
155
      </driverTemplate>
156
   </extension>
157
 </plugin>  
(-)build.properties (-1 / +4 lines)
Lines 1-4 Link Here
1
source.. = src/
1
source.. = src/
2
output.. = bin/
2
output.. = bin/
3
bin.includes = META-INF/,\
3
bin.includes = META-INF/,\
4
               .
4
               .,\
5
               icons/,\
6
               plugin.properties,\
7
               plugin.xml
(-)META-INF/MANIFEST.MF (-3 / +14 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: Ui Plug-in
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.iseries.ui
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.iseries.ui;singleton:=true
5
Bundle-Version: 1.0.0
5
Bundle-Version: 1.0.0.200710041
6
Bundle-Localization: plugin
7
Bundle-Vendor: %providerName
8
Export-Package: org.eclipse.datatools.enablement.ibm.db2.iseries.internal.ui
9
Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0)",
10
 org.eclipse.datatools.connectivity;bundle-version="[1.0.1,2.0.0)",
11
 org.eclipse.datatools.connectivity.ui;bundle-version="[1.0.1,2.0.0)",
12
 org.eclipse.datatools.connectivity.db.generic;bundle-version="[1.0.0,2.0.0)",
13
 org.eclipse.datatools.connectivity.db.generic.ui;bundle-version="[1.0.1,2.0.0)",
14
 org.eclipse.datatools.connectivity.sqm.core;bundle-version="[1.0.1,2.0.0)",
15
 org.eclipse.datatools.enablement.ibm.db2.iseries;bundle-version="[1.0.0,2.0.0)"
16
Bundle-RequiredExecutionEnvironment: J2SE-1.4
(-)icons/new_db_element.gif (+4 lines)
Added Link Here
1
GIF89a÷ZcZcZc{„{„{„œœœ­­­µŒ9µ”9½½½½ÞÞÆ½ÆÖÖÖÞÞ½çΌÿÿÿÞÞÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ù,œt° €Áƒh?@‚‡$8A!C&ˆ8‘¢‹2näh „&
2
8 #LJJP¹rÀ–rPҀ?`D€€¢Ü
3
 ÀP	ˆàg͛-u²´i5èТG¥.]ÙôiTS«åš5çÖ±„"5Š”À€´$
4
Uª¼èeIpàÈ;
(-).settings/org.eclipse.jdt.core.prefs (+12 lines)
Added Link Here
1
#Fri Apr 13 14:14:14 PDT 2007
2
eclipse.preferences.version=1
3
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
4
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6
org.eclipse.jdt.core.compiler.compliance=1.4
7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
12
org.eclipse.jdt.core.compiler.source=1.4
(-)src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/ISeriesDBProfilePropertyPage.java (+24 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.iseries.internal.ui;
12
13
import org.eclipse.datatools.connectivity.db.generic.ui.GenericDBProfilePropertyPage;
14
import org.eclipse.datatools.enablement.ibm.db2.internal.iseries.IISeriesConnectionProfileConstants;
15
16
public class ISeriesDBProfilePropertyPage extends GenericDBProfilePropertyPage {
17
18
	public ISeriesDBProfilePropertyPage() {
19
		super();
20
		noDefaultAndApplyButton();
21
		setDriverCategory(IISeriesConnectionProfileConstants.DB2_ISERIES_CATEGORY_ID);	
22
	}
23
24
}
(-)src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/ISeriesDBProfileDetailsWizardPage.java (+23 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.iseries.internal.ui;
12
13
import org.eclipse.datatools.connectivity.db.generic.ui.GenericDBProfileDetailsWizardPage;
14
import org.eclipse.datatools.enablement.ibm.db2.internal.iseries.IISeriesConnectionProfileConstants;
15
16
public class ISeriesDBProfileDetailsWizardPage 
17
	extends GenericDBProfileDetailsWizardPage{
18
19
	public ISeriesDBProfileDetailsWizardPage(String pageName) {
20
		super(pageName);
21
		setDriverCategory(IISeriesConnectionProfileConstants.DB2_ISERIES_CATEGORY_ID);	
22
	}
23
}
(-)plugin.properties (+15 lines)
Added Link Here
1
###############################################################################
2
# Copyright (c) 2006, 2007 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
6
# http://www.eclipse.org/legal/epl-v10.html
7
# 
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
10
###############################################################################
11
pluginName=Eclipse Data Tools Platform IBM DB2 UDB UI iSeries Plug-in
12
providerName=Eclipse.org
13
14
profile.db2.iseries.wizard.title = DB2 for i5/OS
15
profile.db2.iseries.properties = DB2 for i5/OS Connection Properties
(-)plugin.xml (+26 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.0"?>
3
<plugin>
4
5
   <extension
6
         point="org.eclipse.datatools.connectivity.connectionProfile">
7
      <newWizard
8
            class="org.eclipse.datatools.enablement.ibm.db2.iseries.internal.ui.NewISeriesConnectionProfileWizard"
9
            icon="icons/new_db_element.gif"
10
            id="org.eclipse.datatools.enablement.ibm.db2.iseries.NewISeriesConnectionProfileWizard"
11
            name="%profile.db2.iseries.wizard.title"
12
            profile="org.eclipse.datatools.enablement.ibm.db2.iseries.connectionProfile"/>
13
   </extension>
14
   <extension
15
         point="org.eclipse.ui.propertyPages">
16
      <page
17
            class="org.eclipse.datatools.enablement.ibm.db2.iseries.internal.ui.ISeriesDBProfilePropertyPage"
18
            id="org.eclipse.datatools.enablement.ibm.db2.iseries.profileProperties"
19
            name="%profile.db2.iseries.properties"
20
            objectClass="org.eclipse.datatools.connectivity.IConnectionProfile">
21
         <filter
22
               name="org.eclipse.datatools.profile.property.id"
23
               value="org.eclipse.datatools.enablement.ibm.db2.iseries.connectionProfile"/>
24
      </page>
25
   </extension>
26
 </plugin>  
(-)src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/NewISeriesConnectionProfileWizard.java (+59 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.iseries.internal.ui;
12
13
import java.util.Properties;
14
15
import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
16
import org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants;
17
import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
18
import org.eclipse.datatools.connectivity.db.generic.ui.NewConnectionProfileWizard;
19
20
public class NewISeriesConnectionProfileWizard extends NewConnectionProfileWizard {
21
22
	protected ISeriesDBProfileDetailsWizardPage mPropPage;
23
24
	public NewISeriesConnectionProfileWizard() {
25
		super();
26
	}
27
28
	public void addCustomPages() {
29
		mPropPage = new ISeriesDBProfileDetailsWizardPage("detailsPage"); //$NON-NLS-1$
30
		addPage(mPropPage);
31
	}
32
	
33
	public Properties getProfileProperties() {
34
		Properties props = new Properties();
35
		props.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID,
36
				this.mPropPage.getDriverID());
37
		props.setProperty(
38
				IDBConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID,
39
				this.mPropPage.getDBConnProps());
40
		props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID, this.mPropPage
41
				.getDriverClass());
42
		props.setProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID, this.mPropPage
43
				.getVendor());		
44
		props.setProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID, this.mPropPage
45
				.getVersion());			
46
		props.setProperty(IDBDriverDefinitionConstants.DATABASE_NAME_PROP_ID, this.mPropPage
47
				.getDatabaseName());
48
		props.setProperty(IDBDriverDefinitionConstants.PASSWORD_PROP_ID, this.mPropPage
49
				.getDBPWD());
50
		props.setProperty(
51
				IDBConnectionProfileConstants.SAVE_PASSWORD_PROP_ID, String
52
						.valueOf(this.mPropPage.getSaveDBPWD()));
53
		props.setProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID, this.mPropPage
54
				.getDBUID());
55
		props.setProperty(IDBDriverDefinitionConstants.URL_PROP_ID,
56
				this.mPropPage.getURL());
57
		return props;
58
	}
59
}
(-)build.properties (-1 / +5 lines)
Lines 1-4 Link Here
1
source.. = src/
1
source.. = src/
2
output.. = bin/
2
output.. = bin/
3
bin.includes = META-INF/,\
3
bin.includes = META-INF/,\
4
               .
4
               .,\
5
               plugin.xml,\
6
               plugin.properties,\
7
               icons/,\
8
               about.html
(-)META-INF/MANIFEST.MF (-3 / +14 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: Ui Plug-in
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.zseries.ui
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.zseries.ui;singleton:=true
5
Bundle-Version: 1.0.0
5
Bundle-Version: 1.0.0.200709132
6
Bundle-Localization: plugin
7
Bundle-Vendor: %providerName
8
Export-Package: org.eclipse.datatools.enablement.ibm.db2.zseries.internal.ui
9
Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0)",
10
 org.eclipse.datatools.connectivity;bundle-version="[1.0.1,2.0.0)",
11
 org.eclipse.datatools.connectivity.ui;bundle-version="[1.0.1,2.0.0)",
12
 org.eclipse.datatools.connectivity.db.generic;bundle-version="[1.0.0,2.0.0)",
13
 org.eclipse.datatools.connectivity.db.generic.ui;bundle-version="[1.0.1,2.0.0)",
14
 org.eclipse.datatools.connectivity.sqm.core;bundle-version="[1.0.1,2.0.0)",
15
 org.eclipse.datatools.enablement.ibm.db2.zseries;bundle-version="[1.0.0,2.0.0)"
16
Bundle-RequiredExecutionEnvironment: J2SE-1.4
(-)icons/new_db_element.gif (+4 lines)
Added Link Here
1
GIF89a÷ZcZcZc{„{„{„œœœ­­­µŒ9µ”9½½½½ÞÞÆ½ÆÖÖÖÞÞ½çΌÿÿÿÞÞÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ù,œt° €Áƒh?@‚‡$8A!C&ˆ8‘¢‹2näh „&
2
8 #LJJP¹rÀ–rPҀ?`D€€¢Ü
3
 ÀP	ˆàg͛-u²´i5èТG¥.]ÙôiTS«åš5çÖ±„"5Š”À€´$
4
Uª¼èeIpàÈ;
(-).settings/org.eclipse.jdt.core.prefs (+12 lines)
Added Link Here
1
#Fri Apr 13 14:14:14 PDT 2007
2
eclipse.preferences.version=1
3
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
4
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6
org.eclipse.jdt.core.compiler.compliance=1.4
7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
12
org.eclipse.jdt.core.compiler.source=1.4
(-)src/org/eclipse/datatools/enablement/ibm/db2/zseries/internal/ui/ZSeriesDBProfilePropertyPage.java (+24 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.zseries.internal.ui;
12
13
import org.eclipse.datatools.connectivity.db.generic.ui.GenericDBProfilePropertyPage;
14
import org.eclipse.datatools.enablement.ibm.db2.internal.zseries.IZSeriesConnectionProfileConstants;
15
16
public class ZSeriesDBProfilePropertyPage extends GenericDBProfilePropertyPage {
17
18
	public ZSeriesDBProfilePropertyPage() {
19
		super();
20
		noDefaultAndApplyButton();
21
		setDriverCategory(IZSeriesConnectionProfileConstants.DB2_ZSERIES_CATEGORY_ID);	
22
	}
23
24
}
(-)plugin.xml (+27 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.0"?>
3
<plugin>
4
   
5
   <extension
6
         point="org.eclipse.datatools.connectivity.connectionProfile">
7
      <newWizard
8
            class="org.eclipse.datatools.enablement.ibm.db2.zseries.internal.ui.NewZSeriesConnectionProfileWizard"
9
            icon="icons/new_db_element.gif"
10
            id="org.eclipse.datatools.enablement.ibm.db2.zseries.NewZSeriesConnectionProfileWizard"
11
            name="%profile.db2.zseries.wizard.title"
12
            profile="org.eclipse.datatools.enablement.ibm.db2.zseries.connectionProfile"/>
13
   </extension>
14
   <extension
15
         point="org.eclipse.ui.propertyPages">
16
      <page
17
            class="org.eclipse.datatools.enablement.ibm.db2.zseries.internal.ui.ZSeriesDBProfilePropertyPage"
18
            id="org.eclipse.datatools.enablement.ibm.db2.zseries.profileProperties"
19
            name="%profile.db2.zseries.properties"
20
            objectClass="org.eclipse.datatools.connectivity.IConnectionProfile">
21
         <filter
22
               name="org.eclipse.datatools.profile.property.id"
23
               value="org.eclipse.datatools.enablement.ibm.db2.zseries.connectionProfile"/>
24
      </page>
25
   </extension>
26
   
27
 </plugin>  
(-)plugin.properties (+15 lines)
Added Link Here
1
###############################################################################
2
# Copyright (c) 2006, 2007 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
6
# http://www.eclipse.org/legal/epl-v10.html
7
# 
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
10
###############################################################################
11
pluginName=Eclipse Data Tools Platform IBM DB2 UDB zSeries UI Plug-in
12
providerName=Eclipse.org
13
14
profile.db2.zseries.wizard.title = DB2 for z/OS
15
profile.db2.zseries.properties = DB2 for z/OS Connection Properties
(-)src/org/eclipse/datatools/enablement/ibm/db2/zseries/internal/ui/ZSeriesDBProfileDetailsWizardPage.java (+23 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.zseries.internal.ui;
12
13
import org.eclipse.datatools.connectivity.db.generic.ui.GenericDBProfileDetailsWizardPage;
14
import org.eclipse.datatools.enablement.ibm.db2.internal.zseries.IZSeriesConnectionProfileConstants;
15
16
public class ZSeriesDBProfileDetailsWizardPage 
17
	extends GenericDBProfileDetailsWizardPage{
18
19
	public ZSeriesDBProfileDetailsWizardPage(String pageName) {
20
		super(pageName);
21
		setDriverCategory(IZSeriesConnectionProfileConstants.DB2_ZSERIES_CATEGORY_ID);	
22
	}
23
}
(-)src/org/eclipse/datatools/enablement/ibm/db2/zseries/internal/ui/NewZSeriesConnectionProfileWizard.java (+59 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.zseries.internal.ui;
12
13
import java.util.Properties;
14
15
import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
16
import org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants;
17
import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
18
import org.eclipse.datatools.connectivity.db.generic.ui.NewConnectionProfileWizard;
19
20
public class NewZSeriesConnectionProfileWizard extends NewConnectionProfileWizard {
21
22
	protected ZSeriesDBProfileDetailsWizardPage mPropPage;
23
24
	public NewZSeriesConnectionProfileWizard() {
25
		super();
26
	}
27
28
	public void addCustomPages() {
29
		mPropPage = new ZSeriesDBProfileDetailsWizardPage("detailsPage"); //$NON-NLS-1$
30
		addPage(mPropPage);
31
	}
32
	
33
	public Properties getProfileProperties() {
34
		Properties props = new Properties();
35
		props.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID,
36
				this.mPropPage.getDriverID());
37
		props.setProperty(
38
				IDBConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID,
39
				this.mPropPage.getDBConnProps());
40
		props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID, this.mPropPage
41
				.getDriverClass());
42
		props.setProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID, this.mPropPage
43
				.getVendor());		
44
		props.setProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID, this.mPropPage
45
				.getVersion());			
46
		props.setProperty(IDBDriverDefinitionConstants.DATABASE_NAME_PROP_ID, this.mPropPage
47
				.getDatabaseName());
48
		props.setProperty(IDBDriverDefinitionConstants.PASSWORD_PROP_ID, this.mPropPage
49
				.getDBPWD());
50
		props.setProperty(
51
				IDBConnectionProfileConstants.SAVE_PASSWORD_PROP_ID, String
52
						.valueOf(this.mPropPage.getSaveDBPWD()));
53
		props.setProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID, this.mPropPage
54
				.getDBUID());
55
		props.setProperty(IDBDriverDefinitionConstants.URL_PROP_ID,
56
				this.mPropPage.getURL());
57
		return props;
58
	}
59
}
(-)META-INF/MANIFEST.MF (-3 / +10 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: Iseries Plug-in
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.iseries
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.iseries;singleton:=true
5
Bundle-Version: 1.0.0
5
Bundle-Version: 1.0.0.200710041
6
Bundle-Localization: plugin
7
Bundle-Vendor: %providerName
8
Export-Package: org.eclipse.datatools.enablement.ibm.db2.internal.iseries
9
Require-Bundle: org.eclipse.datatools.connectivity;bundle-version="[1.0.1,2.0.0)",
10
 org.eclipse.datatools.connectivity.db.generic;bundle-version="[1.0.0,2.0.0)",
11
 org.eclipse.datatools.connectivity.sqm.core;bundle-version="[1.0.1,2.0.0)"
12
Bundle-RequiredExecutionEnvironment: J2SE-1.4
(-)build.properties (-1 / +5 lines)
Lines 1-4 Link Here
1
source.. = src/
1
source.. = src/
2
output.. = bin/
2
output.. = bin/
3
bin.includes = META-INF/,\
3
bin.includes = META-INF/,\
4
               .
4
               .,\
5
               plugin.xml,\
6
               plugin.properties,\
7
               icons/,\
8
               about.html
(-)plugin.xml (+214 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.0"?>
3
<plugin>
4
   <extension
5
         point="org.eclipse.datatools.connectivity.sqm.core.databaseRecognition">
6
      <recognizer
7
            class="org.eclipse.datatools.enablement.ibm.db2.internal.iseries.ISeriesDatabaseRecognizer">
8
      </recognizer>
9
   </extension>
10
   <extension
11
         point="org.eclipse.datatools.connectivity.connectionProfile">
12
      <connectionProfile
13
            category="org.eclipse.datatools.connectivity.db.category"
14
            configurationType="org.eclipse.datatools.connectivity.db.generic.configurationType"
15
            icon="icons/jdbc_16.gif"
16
            id="org.eclipse.datatools.enablement.ibm.db2.iseries.connectionProfile"
17
            name="%profile.db2.iseries.title"
18
            pingFactory="org.eclipse.datatools.enablement.ibm.db2.internal.iseries.JDBCISeriesConnectionFactory"
19
            propertiesPersistenceHook="org.eclipse.datatools.enablement.ibm.db2.internal.iseries.ISeriesDBPropertiesPersistenceHook"/>
20
      <connectionFactory
21
            class="org.eclipse.datatools.enablement.ibm.db2.internal.iseries.JDBCISeriesConnectionFactory"
22
            id="java.sql.Connection"
23
            name="%jdbc.connection.name"
24
            profile="org.eclipse.datatools.enablement.ibm.db2.iseries.connectionProfile"/>
25
   </extension>
26
   
27
	<extension
28
         point="org.eclipse.datatools.connectivity.driverExtension">    
29
         <category
30
      		parentCategory="org.eclipse.datatools.connectivity.db.driverCategory"
31
            id="org.eclipse.datatools.enablement.ibm.db2.iseries.driverCategory"
32
            name="%DB2_UDB_ISERIES_CATEGORY_NAME"/>
33
  
34
	  <driverTemplate
35
            createDefault="false"
36
            emptyJarListIsOK="false"
37
            id="org.eclipse.datatools.enablement.ibm.db2.iseries.toolbox.driverTemplate"
38
            jarList="jt400.jar"
39
            name="%org.eclipse.datatools.enablement.ibm.db2.iseries.toolbox.driverTemplate"
40
            parentCategory="org.eclipse.datatools.enablement.ibm.db2.iseries.driverCategory">
41
         <properties>
42
            <property
43
                  generated="false"
44
                  id="org.eclipse.datatools.connectivity.db.driverClass"
45
                  name="%driverClass"
46
                  value="com.ibm.as400.access.AS400JDBCDriver"
47
                  required="true"
48
                  visible="true"/>
49
            <property
50
                  generated="false"
51
                  id="org.eclipse.datatools.connectivity.db.vendor"
52
                  name="%driverVendor"
53
                  value="DB2 UDB iSeries"
54
                  required="true"
55
                  visible="false"/>
56
            <property
57
                  generated="false"
58
                  id="org.eclipse.datatools.connectivity.db.version"
59
                  name="%driverVersion"
60
                  value="V5R3"
61
                  required="true"
62
                  visible="false"/>   
63
            <property
64
                  generated="false"
65
                  id="org.eclipse.datatools.connectivity.db.databaseName"
66
                  name="%driverDBName"
67
                  value="host"
68
                  required="true"
69
                  visible="true"/>                             
70
            <property
71
                  generated="false"
72
                  id="org.eclipse.datatools.connectivity.db.URL"
73
                  name="%driverConnectionURL"
74
                  value="jdbc:as400:host;prompt=false"
75
                  required="true"
76
                  visible="true"/>
77
            <property
78
                  generated="false"
79
                  id="org.eclipse.datatools.connectivity.db.username"
80
                  name="%driverUID"
81
                  value=""
82
                  required="false"
83
                  visible="true"/>
84
            <property
85
                  customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
86
                  generated="false"
87
                  id="org.eclipse.datatools.connectivity.db.password"
88
                  name="%driverPWD"
89
                  required="false"
90
                  visible="true"/>
91
         </properties>
92
      </driverTemplate>
93
94
      <driverTemplate
95
            createDefault="false"
96
            emptyJarListIsOK="false"
97
            id="org.eclipse.datatools.enablement.ibm.db2.iseries.driverTemplate"
98
            jarList="C:\Program Files\IBM\SQLLIB\java\db2jcc.jar,C:\Program Files\IBM\SQLLIB\java\db2jcc_license_cisuz.jar"
99
            name="%org.eclipse.datatools.enablement.ibm.db2.iseries.driverTemplate"
100
            parentCategory="org.eclipse.datatools.enablement.ibm.db2.iseries.driverCategory">
101
         <properties>
102
            <property
103
                  generated="false"
104
                  id="org.eclipse.datatools.connectivity.db.driverClass"
105
                  name="%driverClass"
106
                  value="com.ibm.db2.jcc.DB2Driver"
107
                  required="true"
108
                  visible="true"/>
109
            <property
110
                  generated="false"
111
                  id="org.eclipse.datatools.connectivity.db.vendor"
112
                  name="%driverVendor"
113
                  value="DB2 UDB iSeries"
114
                  required="true"
115
                  visible="false"/>
116
            <property
117
                  generated="false"
118
                  id="org.eclipse.datatools.connectivity.db.version"
119
                  name="%driverVersion"
120
                  value="V5R3"
121
                  required="true"
122
                  visible="false"/>   
123
            <property
124
                  generated="false"
125
                  id="org.eclipse.datatools.connectivity.db.databaseName"
126
                  name="%driverDBName"
127
                  value="database"
128
                  required="true"
129
                  visible="true"/>                             
130
            <property
131
                  generated="false"
132
                  id="org.eclipse.datatools.connectivity.db.URL"
133
                  name="%driverConnectionURL"
134
                  value="jdbc:db2://host:446/database:retrieveMessagesFromServerOnGetMessage=true;"
135
                  required="true"
136
                  visible="true"/>
137
            <property
138
                  generated="false"
139
                  id="org.eclipse.datatools.connectivity.db.username"
140
                  name="%driverUID"
141
                  value=""
142
                  required="false"
143
                  visible="true"/>
144
            <property
145
                  customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
146
                  generated="false"
147
                  id="org.eclipse.datatools.connectivity.db.password"
148
                  name="%driverPWD"
149
                  required="false"
150
                  visible="true"/>
151
         </properties>
152
      </driverTemplate>
153
154
      <driverTemplate
155
            createDefault="false"
156
            emptyJarListIsOK="false"
157
            id="org.eclipse.datatools.enablement.ibm.db2.iseries.other.driverTemplate"
158
            jarList=""
159
            name="%org.eclipse.datatools.enablement.ibm.db2.iseries.other.driverTemplate"
160
            parentCategory="org.eclipse.datatools.enablement.ibm.db2.iseries.driverCategory">
161
         <properties>
162
            <property
163
                  generated="false"
164
                  id="org.eclipse.datatools.connectivity.db.driverClass"
165
                  name="%driverClass"
166
                  value=""
167
                  required="true"
168
                  visible="true"/>
169
            <property
170
                  generated="false"
171
                  id="org.eclipse.datatools.connectivity.db.vendor"
172
                  name="%driverVendor"
173
                  value="DB2 UDB iSeries"
174
                  required="true"
175
                  visible="false"/>
176
            <property
177
                  generated="false"
178
                  id="org.eclipse.datatools.connectivity.db.version"
179
                  name="%driverVersion"
180
                  value="V5R3"
181
                  required="true"
182
                  visible="false"/>   
183
            <property
184
                  generated="false"
185
                  id="org.eclipse.datatools.connectivity.db.databaseName"
186
                  name="%driverDBName"
187
                  value=""
188
                  required="true"
189
                  visible="true"/>                             
190
            <property
191
                  generated="false"
192
                  id="org.eclipse.datatools.connectivity.db.URL"
193
                  name="%driverConnectionURL"
194
                  value=""
195
                  required="true"
196
                  visible="true"/>
197
            <property
198
                  generated="false"
199
                  id="org.eclipse.datatools.connectivity.db.username"
200
                  name="%driverUID"
201
                  value=""
202
                  required="false"
203
                  visible="true"/>
204
            <property
205
                  customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
206
                  generated="false"
207
                  id="org.eclipse.datatools.connectivity.db.password"
208
                  name="%driverPWD"
209
                  required="false"
210
                  visible="true"/>
211
         </properties>
212
      </driverTemplate>
213
   </extension>
214
 </plugin>  
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/iseries/JDBCISeriesJDBCConnection.java (+69 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.iseries;
12
13
import java.sql.Connection;
14
import java.sql.DatabaseMetaData;
15
import java.sql.SQLException;
16
import java.util.Properties;
17
18
import org.eclipse.datatools.connectivity.IConnectionProfile;
19
import org.eclipse.datatools.connectivity.Version;
20
import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
21
import org.eclipse.datatools.connectivity.db.generic.JDBCConnection;
22
import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinition;
23
import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinitionRegistry;
24
import org.eclipse.datatools.connectivity.sqm.internal.core.RDBCorePlugin;
25
26
public class JDBCISeriesJDBCConnection extends JDBCConnection {
27
28
	private Version techVersion = Version.NULL_VERSION;
29
	private Version serverVersion = Version.NULL_VERSION;
30
	private String serverName;
31
	
32
	public JDBCISeriesJDBCConnection(IConnectionProfile profile, Class factoryClass) {
33
		super(profile, factoryClass);
34
	}
35
	
36
	public String getProviderName() {
37
		return serverName;
38
	}
39
40
	public Version getProviderVersion() {
41
		return serverVersion;
42
	}
43
44
	public Version getTechnologyVersion() {
45
		return techVersion;
46
	}
47
48
	protected void initVersions() {
49
		try {
50
			DatabaseMetaData dbmd = ((Connection) this.getRawConnection())
51
					.getMetaData();
52
			try {
53
				Properties props = getConnectionProfile().getBaseProperties();
54
				String vendor = (String)props.get(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID);
55
				String version = (String)props.get(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID);
56
				DatabaseDefinitionRegistry dbDefRegistry = RDBCorePlugin.getDefault().getDatabaseDefinitionRegistry();
57
				DatabaseDefinition dbDef = dbDefRegistry.getDefinition(vendor, version);
58
				serverName = dbDef.getProductDisplayString() + " " + dbDef.getVersionDisplayString();
59
			} catch (Exception e) {
60
			}
61
			try {
62
				techVersion = new Version(dbmd.getJDBCMajorVersion(), dbmd
63
						.getJDBCMinorVersion(), 0, new String());
64
			} catch (Exception e) {
65
			}
66
		} catch (SQLException e) {
67
		}
68
	}
69
}
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/iseries/ISeriesDatabaseRecognizer.java (+67 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.iseries;
12
13
import java.sql.Connection;
14
15
import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinition;
16
import org.eclipse.datatools.connectivity.sqm.internal.core.definition.DatabaseDefinitionRegistryImpl;
17
import org.eclipse.datatools.connectivity.sqm.internal.core.definition.IDatabaseRecognizer;
18
19
public class ISeriesDatabaseRecognizer implements IDatabaseRecognizer {
20
    private static final String PRODUCT = "DB2 UDB iSeries"; //$NON-NLS-1$
21
    
22
    public DatabaseDefinition recognize(Connection connection) {
23
        try {
24
            String version = connection.getMetaData().getDatabaseProductVersion();          
25
            // Support for the version string returned by the Toolbox for Java driver
26
            if (version.indexOf("V5R1") > -1){ //$NON-NLS-1$
27
                return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V5R1"); //$NON-NLS-1$
28
            }
29
            else if (version.indexOf("V5R2") > -1){ //$NON-NLS-1$
30
                return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V5R2"); //$NON-NLS-1$
31
            }
32
            else if (version.indexOf("V5R3") > -1){ //$NON-NLS-1$
33
                return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V5R3"); //$NON-NLS-1$
34
            }
35
            // Support for the version string returned by the Universal driver
36
            else if (version.indexOf("V05R01") > -1){ //$NON-NLS-1$
37
                return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V5R1"); //$NON-NLS-1$
38
            }
39
            else if (version.indexOf("V05R02") > -1){ //$NON-NLS-1$
40
                return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V5R2"); //$NON-NLS-1$
41
            }
42
            else if (version.indexOf("V05R03") > -1){ //$NON-NLS-1$
43
                return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V5R3"); //$NON-NLS-1$
44
            }            
45
            // Not sure what driver this code is supporting
46
            else if(version.startsWith("QSQ050")) { //$NON-NLS-1$
47
                    char r = version.charAt(6);
48
                    if(r == '1') {
49
                        return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V5R1");                     //$NON-NLS-1$
50
                    }
51
                    else if(r == '2') {
52
                        return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V5R2"); //$NON-NLS-1$
53
                    }
54
                    else if (r == '3'){
55
                        return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V5R3"); //$NON-NLS-1$
56
                    }
57
                    else if(r == '4') {
58
                        return DatabaseDefinitionRegistryImpl.INSTANCE.getDefinition(PRODUCT, "V5R4"); //$NON-NLS-1$
59
                    }
60
                }
61
        }
62
        catch (Exception e) {
63
        }
64
65
        return null;
66
    }
67
}
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/iseries/JDBCISeriesConnectionFactory.java (+35 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
12
package org.eclipse.datatools.enablement.ibm.db2.internal.iseries;
13
14
import org.eclipse.datatools.connectivity.IConnection;
15
import org.eclipse.datatools.connectivity.IConnectionFactory;
16
import org.eclipse.datatools.connectivity.IConnectionProfile;
17
18
public class JDBCISeriesConnectionFactory implements IConnectionFactory {
19
20
	public JDBCISeriesConnectionFactory() {
21
		super();
22
	}
23
24
	public IConnection createConnection(IConnectionProfile profile) {
25
		JDBCISeriesJDBCConnection connection = new JDBCISeriesJDBCConnection(profile,
26
				getClass());
27
		connection.open();
28
		return connection;
29
	}
30
31
	public IConnection createConnection(IConnectionProfile profile, String uid,
32
			String pwd) {
33
		return createConnection(profile);
34
	}
35
}
(-)plugin.properties (+29 lines)
Added Link Here
1
###############################################################################
2
# Copyright (c) 2006, 2007 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
6
# http://www.eclipse.org/legal/epl-v10.html
7
# 
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
10
###############################################################################
11
pluginName=Eclipse Data Tools Platform IBM DB2 UDB iSeries Plug-in
12
providerName=Eclipse.org
13
14
driverClass = Driver Class
15
driverVendor = Vendor
16
driverVersion = Version
17
driverDBName = Database Name
18
driverConnectionURL = Connection URL
19
driverUID = User ID
20
driverPWD = Password
21
22
DB2_UDB_ISERIES_CATEGORY_NAME = DB2 for i5/OS
23
24
org.eclipse.datatools.enablement.ibm.db2.iseries.driverTemplate = IBM Data Server Driver for JDBC and SQLJ
25
org.eclipse.datatools.enablement.ibm.db2.iseries.other.driverTemplate = Other Driver
26
org.eclipse.datatools.enablement.ibm.db2.iseries.toolbox.driverTemplate = AS/400 Toolbox for Java
27
28
jdbc.connection.name = JDBC Connection
29
profile.db2.iseries.title = DB2 for i5/OS
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/iseries/IISeriesConnectionProfileConstants.java (+18 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.iseries;
12
13
14
public interface IISeriesConnectionProfileConstants {
15
16
	public static final String DB2_ISERIES_CATEGORY_ID = "org.eclipse.datatools.enablement.ibm.db2.iseries.driverCategory"; //$NON-NLS-1$
17
18
}
(-)icons/jdbc_16.gif (+3 lines)
Added Link Here
1
GIF89a³€ŸŸŸ¿ÜÛÀ¿À­®­€€¿¿¿ßß¿ÿßßîîî`_`_`_öööÑÑÑÿÿÿ!ù,sÐIֈ½?I™l ‚ƒ•HD0€‚È!Fè²$0ê
2
Â
3
?P(x?ä±($ƒÁá…gÅÓpÅ¢ÉD*‰×aA?FÁi@vÛý†Ç³ròÌD­¡RTp2<_u`'‡G‘?”•–;
(-).settings/org.eclipse.jdt.core.prefs (+12 lines)
Added Link Here
1
#Fri Apr 13 14:14:14 PDT 2007
2
eclipse.preferences.version=1
3
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
4
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6
org.eclipse.jdt.core.compiler.compliance=1.4
7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
12
org.eclipse.jdt.core.compiler.source=1.4
(-)src/org/eclipse/datatools/enablement/ibm/db2/internal/iseries/ISeriesDBPropertiesPersistenceHook.java (+17 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.internal.iseries;
12
13
import org.eclipse.datatools.connectivity.db.generic.GenericDBPropertiesPersistenceHook;
14
15
public class ISeriesDBPropertiesPersistenceHook extends
16
		GenericDBPropertiesPersistenceHook {
17
}
(-)META-INF/MANIFEST.MF (-3 / +15 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: Ui Plug-in
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.luw.ui
4
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.luw.ui;singleton:=true
5
Bundle-Version: 1.0.0
5
Bundle-Version: 1.0.0.200710041
6
Bundle-Localization: plugin
7
Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0)",
8
 org.eclipse.datatools.connectivity;bundle-version="[1.0.1,2.0.0)",
9
 org.eclipse.datatools.connectivity.ui;bundle-version="[1.0.1,2.0.0)",
10
 org.eclipse.datatools.connectivity.db.generic;bundle-version="[1.0.0,2.0.0)",
11
 org.eclipse.datatools.connectivity.db.generic.ui;bundle-version="[1.0.1,2.0.0)",
12
 org.eclipse.datatools.connectivity.sqm.core;bundle-version="[1.0.1,2.0.0)",
13
 org.eclipse.datatools.enablement.ibm.db2.luw;bundle-version="[1.0.0,2.0.0)"
14
Eclipse-LazyStart: true
15
Export-Package: org.eclipse.datatools.enablement.ibm.db2.luw.internal.ui
16
Bundle-Vendor: %providerName
17
Bundle-RequiredExecutionEnvironment: J2SE-1.4
(-)build.properties (-1 / +5 lines)
Lines 1-4 Link Here
1
source.. = src/
1
source.. = src/
2
output.. = bin/
2
output.. = bin/
3
bin.includes = META-INF/,\
3
bin.includes = META-INF/,\
4
               .
4
               .,\
5
               plugin.xml,\
6
               plugin.properties,\
7
               icons/,\
8
               about.html
(-)src/org/eclipse/datatools/enablement/ibm/db2/luw/internal/ui/LUWDBProfileDetailsWizardPage.java (+23 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.luw.internal.ui;
12
13
import org.eclipse.datatools.connectivity.db.generic.ui.GenericDBProfileDetailsWizardPage;
14
import org.eclipse.datatools.enablement.ibm.db2.internal.luw.ILUWConnectionProfileConstants;
15
16
public class LUWDBProfileDetailsWizardPage 
17
	extends GenericDBProfileDetailsWizardPage{
18
19
	public LUWDBProfileDetailsWizardPage(String pageName) {
20
		super(pageName);
21
		setDriverCategory(ILUWConnectionProfileConstants.DB2_LUW_CATEGORY_ID);	
22
	}
23
}
(-)icons/new_db_element.gif (+4 lines)
Added Link Here
1
GIF89a÷ZcZcZc{„{„{„œœœ­­­µŒ9µ”9½½½½ÞÞÆ½ÆÖÖÖÞÞ½çΌÿÿÿÞÞÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ù,œt° €Áƒh?@‚‡$8A!C&ˆ8‘¢‹2näh „&
2
8 #LJJP¹rÀ–rPҀ?`D€€¢Ü
3
 ÀP	ˆàg͛-u²´i5èТG¥.]ÙôiTS«åš5çÖ±„"5Š”À€´$
4
Uª¼èeIpàÈ;
(-).settings/org.eclipse.jdt.core.prefs (+12 lines)
Added Link Here
1
#Fri Apr 13 14:14:14 PDT 2007
2
eclipse.preferences.version=1
3
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
4
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6
org.eclipse.jdt.core.compiler.compliance=1.4
7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
12
org.eclipse.jdt.core.compiler.source=1.4
(-)plugin.properties (+15 lines)
Added Link Here
1
###############################################################################
2
# Copyright (c) 2006, 2007 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
6
# http://www.eclipse.org/legal/epl-v10.html
7
# 
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
10
###############################################################################
11
pluginName=Eclipse Data Tools Platform IBM DB2 UDB LUW UI Plug-in
12
providerName=Eclipse.org
13
14
profile.db2.luw.wizard.title = DB2 for Linux, UNIX, and Windows
15
profile.db2.luw.properties = DB2 for Linux, UNIX, and Windows Connection Properties
(-)src/org/eclipse/datatools/enablement/ibm/db2/luw/internal/ui/LUWDBProfilePropertyPage.java (+24 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.luw.internal.ui;
12
13
import org.eclipse.datatools.connectivity.db.generic.ui.GenericDBProfilePropertyPage;
14
import org.eclipse.datatools.enablement.ibm.db2.internal.luw.ILUWConnectionProfileConstants;
15
16
public class LUWDBProfilePropertyPage extends GenericDBProfilePropertyPage {
17
18
	public LUWDBProfilePropertyPage() {
19
		super();
20
		noDefaultAndApplyButton();
21
		setDriverCategory(ILUWConnectionProfileConstants.DB2_LUW_CATEGORY_ID);	
22
	}
23
24
}
(-)src/org/eclipse/datatools/enablement/ibm/db2/luw/internal/ui/NewLUWConnectionProfileWizard.java (+59 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.datatools.enablement.ibm.db2.luw.internal.ui;
12
13
import java.util.Properties;
14
15
import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
16
import org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants;
17
import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
18
import org.eclipse.datatools.connectivity.db.generic.ui.NewConnectionProfileWizard;
19
20
public class NewLUWConnectionProfileWizard extends NewConnectionProfileWizard {
21
22
	protected LUWDBProfileDetailsWizardPage mPropPage;
23
24
	public NewLUWConnectionProfileWizard() {
25
		super();
26
	}
27
28
	public void addCustomPages() {
29
		mPropPage = new LUWDBProfileDetailsWizardPage("detailsPage"); //$NON-NLS-1$
30
		addPage(mPropPage);
31
	}
32
	
33
	public Properties getProfileProperties() {
34
		Properties props = new Properties();
35
		props.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID,
36
				this.mPropPage.getDriverID());
37
		props.setProperty(
38
				IDBConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID,
39
				this.mPropPage.getDBConnProps());
40
		props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID, this.mPropPage
41
				.getDriverClass());
42
		props.setProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID, this.mPropPage
43
				.getVendor());		
44
		props.setProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID, this.mPropPage
45
				.getVersion());			
46
		props.setProperty(IDBDriverDefinitionConstants.DATABASE_NAME_PROP_ID, this.mPropPage
47
				.getDatabaseName());
48
		props.setProperty(IDBDriverDefinitionConstants.PASSWORD_PROP_ID, this.mPropPage
49
				.getDBPWD());
50
		props.setProperty(
51
				IDBConnectionProfileConstants.SAVE_PASSWORD_PROP_ID, String
52
						.valueOf(this.mPropPage.getSaveDBPWD()));
53
		props.setProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID, this.mPropPage
54
				.getDBUID());
55
		props.setProperty(IDBDriverDefinitionConstants.URL_PROP_ID,
56
				this.mPropPage.getURL());
57
		return props;
58
	}
59
}
(-)plugin.xml (+26 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.0"?>
3
<plugin>
4
	<extension
5
         point="org.eclipse.datatools.connectivity.connectionProfile">
6
      <newWizard
7
            class="org.eclipse.datatools.enablement.ibm.db2.luw.internal.ui.NewLUWConnectionProfileWizard"
8
            icon="icons/new_db_element.gif"
9
            id="org.eclipse.datatools.enablement.ibm.db2.luw.NewLUWConnectionProfileWizard"
10
            name="%profile.db2.luw.wizard.title"
11
            profile="org.eclipse.datatools.enablement.ibm.db2.luw.connectionProfile"/>
12
   </extension>
13
   <extension
14
         point="org.eclipse.ui.propertyPages">
15
      <page
16
            class="org.eclipse.datatools.enablement.ibm.db2.luw.internal.ui.LUWDBProfilePropertyPage"
17
            id="org.eclipse.datatools.enablement.ibm.db2.luw.profileProperties"
18
            name="%profile.db2.luw.properties"
19
            objectClass="org.eclipse.datatools.connectivity.IConnectionProfile">
20
         <filter
21
               name="org.eclipse.datatools.profile.property.id"
22
               value="org.eclipse.datatools.enablement.ibm.db2.luw.connectionProfile"/>
23
      </page>
24
   </extension>
25
 
26
 </plugin>  

Return to bug 203158