Skip to content

Commit

Permalink
v4.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
herve91 committed Jun 21, 2023
1 parent 046efde commit eb5101a
Show file tree
Hide file tree
Showing 25 changed files with 672 additions and 221 deletions.
1 change: 1 addition & 0 deletions MS SQL sqljdbc_auth.dll/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The mssql-jdbc_auth DLL file is necessary to enable the Active Directory integrated authentication of MS SQL Server.It must be copied in Archi's JRE/bin folder. You may use the one provided here or download it from Microsoft.Please pick up the DLL file corresponding to the version of the Archi plugin you're using (version 8.2.2 for plugin up to 4.9.5, version 11.2.0 for plugin 4.9.6 and newer), and to your computer architecture (x86 or x64).
Expand Down
Binary file not shown.
Binary file not shown.
3 changes: 1 addition & 2 deletions sources/.classpath
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/neo4j-jdbc-driver-4.0.5.jar"/>
<classpathentry exported="true" kind="lib" path="lib/reload4j-1.2.25.jar"/>
<classpathentry exported="true" kind="lib" path="lib/sqlite-jdbc-3.39.3.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/postgresql-42.5.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/orai18n-21.7.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ojdbc11.jar"/>
<classpathentry exported="true" kind="lib" path="lib/mysql-connector-j-8.0.31.jar"/>
<classpathentry exported="true" kind="lib" path="lib/mssql-jdbc-11.2.0.jre11.jar"/>
<classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
Expand Down
8 changes: 4 additions & 4 deletions sources/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Database export / import plugin for Archimate Tool
Bundle-SymbolicName: org.archicontribs.database;singleton:=true
Bundle-Version: 4.9.6
Bundle-Version: 4.9.7
Bundle-Vendor: Herve Jouin
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .,
lib/neo4j-jdbc-driver-4.0.5.jar,
lib/json-simple-1.1.1.jar,
lib/log4j-1.2.17.jar,
lib/lombok.jar,
lib/mssql-jdbc-11.2.0.jre11.jar,
lib/mysql-connector-j-8.0.31.jar,
lib/ojdbc11.jar,
lib/orai18n-21.7.0.0.jar,
lib/postgresql-42.5.0.jar,
lib/sqlite-jdbc-3.39.3.0.jar
lib/sqlite-jdbc-3.39.3.0.jar,
lib/neo4j-jdbc-driver-4.0.9.jar,
lib/reload4j-1.2.25.jar
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.archicontribs.database.DBPlugin
Require-Bundle: org.eclipse.core.runtime,
Expand Down
4 changes: 3 additions & 1 deletion sources/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ bin.includes = META-INF/,\
help_contexts.xml,\
bin/,\
.,\
lib/
lib/,\
lib/neo4j-jdbc-driver-4.0.9.jar,\
lib/reload4j-1.2.25.jar
src.includes = src/
source.. = src/
Binary file removed sources/lib/log4j-1.2.17.jar
Binary file not shown.
Binary file not shown.
Binary file added sources/lib/reload4j-1.2.25.jar
Binary file not shown.
8 changes: 7 additions & 1 deletion sources/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,13 @@
class="org.archicontribs.database.commandline.DBImportModelProvider"
description="Import an Archi Model from a SQL database"
id="org.archicontribs.database.commandlineImportModel"
name="Import an Archi Model from a SQL database">
name="Import from database">
</commandlineProvider>
<commandlineProvider
class="org.archicontribs.database.commandline.DBExportModelProvider"
description="Export an Archi Model to a database"
id="org.archicontribs.database.commandlineExportModel"
name="Export to database">
</commandlineProvider>
</extension>
</plugin>
28 changes: 18 additions & 10 deletions sources/src/org/archicontribs/database/DBDatabaseEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ public boolean shouldEmptyNeo4jDB() {
*/
@Getter @Setter private boolean neo4jTypedRelationship = false;

/**
* Should we use SSL Encryption in Neo4j databases
*/
@Getter @Setter private boolean neo4jSSLEncrypted = false;

/**
* @param driver
Expand Down Expand Up @@ -284,7 +288,7 @@ public String getJdbcConnectionString() {
this.jdbcConnectionString = "jdbc:mysql://" + this.getServer() + ":" + this.getPort() + "/" + this.getDatabase();
break;
case "neo4j":
this.jdbcConnectionString = "jdbc:neo4j:bolt://" + this.getServer() + ":" + this.getPort();
this.jdbcConnectionString = "jdbc:neo4j:bolt"+(this.isNeo4jSSLEncrypted()?"+s":"")+"://" + this.getServer() + ":" + this.getPort();
break;
case "oracle":
this.jdbcConnectionString = "jdbc:oracle:thin:@" + this.getServer() + ":" + this.getPort() + ":" + this.getDatabase();
Expand All @@ -301,16 +305,17 @@ public String getJdbcConnectionString() {

/**
* Calculates a JDBC connection string
* @param driverName
* @param serverName
* @param port
* @param databaseName
* @param username
* @param password
* @param driverName
* @param serverName
* @param port
* @param databaseName
* @param username
* @param password
* @param ssl
* @return the JDBC connection string
* @throws SQLException if the JDBC driver is unknown
*/
static public String getJdbcConnectionString(String driverName, String serverName, int port, String databaseName, String username, String password) throws SQLException {
static public String getJdbcConnectionString(String driverName, String serverName, int port, String databaseName, String username, String password, boolean ssl) throws SQLException {
String jdbcString = "";

switch (driverName) {
Expand All @@ -326,7 +331,7 @@ static public String getJdbcConnectionString(String driverName, String serverNam
jdbcString = "jdbc:mysql://" + serverName + ":" + port + "/" + databaseName;
break;
case "neo4j":
jdbcString = "jdbc:neo4j:bolt://" + serverName + ":" + port;
jdbcString = "jdbc:neo4j:bolt"+(ssl?"+s":"")+"://" + serverName + ":" + port;
break;
case "oracle":
jdbcString = "jdbc:oracle:thin:@" + serverName + ":" + port + ":" + databaseName;
Expand Down Expand Up @@ -378,7 +383,8 @@ public static List<DBDatabaseEntry> getAllDatabasesFromPreferenceStore() {
databaseEntry.setNeo4jNativeMode(store.getBoolean(preferenceName+"_neo4j-native-mode_"+String.valueOf(line)));
databaseEntry.setShouldEmptyNeo4jDB(store.getBoolean(preferenceName+"_neo4j-empty-database_"+String.valueOf(line)));
databaseEntry.setNeo4jTypedRelationship(store.getBoolean(preferenceName+"_neo4j-typed-relationships_"+String.valueOf(line)));

databaseEntry.setNeo4jSSLEncrypted(store.getBoolean(preferenceName+"_neo4j-ssl-encrypted_"+String.valueOf(line)));

databaseEntry.setSchema(store.getString(preferenceName+"_schema_"+String.valueOf(line)));

databaseEntry.setViewSnapshotRequired(store.getBoolean(preferenceName+"_export-views-images_"+String.valueOf(line)));
Expand Down Expand Up @@ -445,6 +451,7 @@ private static void cleanupDatabaseEntriesFromPreferenceStore() {
store.setValue(DBDatabaseEntry.preferenceName + "_neo4j-native-mode_" + indexString, false);
store.setValue(DBDatabaseEntry.preferenceName + "_neo4j-empty-database_" + indexString, false);
store.setValue(DBDatabaseEntry.preferenceName + "_neo4j-typed-relationships_" + indexString, false);
store.setValue(DBDatabaseEntry.preferenceName + "_neo4j-ssl-encrypted_" + indexString, false);
store.setValue(DBDatabaseEntry.preferenceName + "_isExpertMode_" + indexString, false);
store.setValue(DBDatabaseEntry.preferenceName + "_jdbcConnectionString_" + indexString, "");
}
Expand Down Expand Up @@ -482,6 +489,7 @@ public void persistIntoPreferenceStore() {
store.setValue(DBDatabaseEntry.preferenceName + "_neo4j-native-mode_" + indexString, isNeo4j ? isNeo4jNativeMode() : false);
store.setValue(DBDatabaseEntry.preferenceName + "_neo4j-empty-database_" + indexString, isNeo4j ? shouldEmptyNeo4jDB() : false);
store.setValue(DBDatabaseEntry.preferenceName + "_neo4j-typed-relationships_" + indexString, isNeo4j ? isNeo4jTypedRelationship() : false);
store.setValue(DBDatabaseEntry.preferenceName + "_neo4j-ssl-encrypted_" + indexString, isNeo4j ? isNeo4jSSLEncrypted() : false);

store.setValue(DBDatabaseEntry.preferenceName + "_schema_" + indexString, isNeo4j ? "" : getSchema());
store.setValue(DBDatabaseEntry.preferenceName + "_export-views-images_" + indexString, isNeo4j ? false : isViewSnapshotRequired());
Expand Down
20 changes: 14 additions & 6 deletions sources/src/org/archicontribs/database/DBPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,19 @@
* Few other GUI improvements
* Remove ID conversion from former size to new one as it is not needed anymore
*
* v4.9.4 04/01/2022
* Fix initial version of components which was incorrectly set to zero on some occasions
* v4.9.4 04/01/2022 Fix initial version of components which was incorrectly set to zero on some occasions
* Fix missing Value Stream icon on import components window
* Fix preferences apply button is greyed on new plugin installations
* Hide export/import buttons on get history window when selected component is a model
* Draw color border around log filename in preferences to indicate if it is a valid filename or not
* Add model specializations comparison when checking model history from database
* Effort done to update the plugin documentation
*
* v4.9.5 23/07/2022
* Fix specialization SQL failures when using PostGreSQL database
* v4.9.5 23/07/2022 Fix specialization SQL failures when using PostGreSQL database
* Fix canvas import as single component
* Fix count images during import model check process
*
* v4.9.6 25/10/2022
* Update databases drivers
* v4.9.6 25/10/2022 Update databases drivers
* MySQL: from 5.1.8.4 to 8.0.30
* PostGreSQL: from 42.2.12 to 42.5.0
* SQLite: from 3.3.0.1 to 3.39.3.0
Expand All @@ -96,6 +93,16 @@
* Update plugin windows position to center them from Archi main window
* Add stacktrace in error popup in case of exception
*
* v4.9.7 04/06/2023 Adapt to version 4.26 of Eclipse
* Update SQL Server auth DLL file
* Add specializations during Neo4J databases exports
* Fix Oracle database initialization
* Add SSL option to Neo4J preference page. This activates the bolt+s protocol to support AuraDB databases
* Replace Log4J library by reload4J library
* update libraries dependencies
* Improve import and export from command line
* Add option to show real time numbers in import and export screens
*
* -----------------------------------------------------------------------------------------
*
* TO-DO list:
Expand Down Expand Up @@ -197,6 +204,7 @@ public DBPlugin() {
preferenceStore.setDefault("traceSQL", true);
preferenceStore.setDefault("checkMaxMemory", true);
preferenceStore.setDefault("checkNotNullConstraints", true);
preferenceStore.setDefault("showRealTimeNumbers", true);
preferenceStore.setDefault("copySuffix", " (copy)");
preferenceStore.setDefault("defaultImportMode", "template");
preferenceStore.setDefault("loggerMode", "disabled");
Expand Down
13 changes: 7 additions & 6 deletions sources/src/org/archicontribs/database/DropinsPluginHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;

import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IStatus;
Expand Down Expand Up @@ -64,7 +65,7 @@ public DropinsPluginHandler() {
* @return
* @throws IOException
*/
public List<Bundle> getInstalledPlugins() throws IOException {
public List<Bundle> getInstalledPlugins() throws IOException, NoSuchElementException {
List<Bundle> list = new ArrayList<Bundle>();

for(Bundle bundle : ArchiPlugin.INSTANCE.getBundle().getBundleContext().getBundles()) {
Expand Down Expand Up @@ -194,9 +195,9 @@ public IStatus installFile(File zipFile) throws IOException {
* @param shell
* @param selected
* @return
* @throws IOException
* @throws IOException,NoSuchElementException
*/
public int uninstall(Shell shell, List<Bundle> selected) throws IOException {
public int uninstall(Shell shell, List<Bundle> selected) throws IOException, NoSuchElementException {
if(selected.isEmpty()) {
return status();
}
Expand Down Expand Up @@ -401,10 +402,10 @@ static String substituteVariables(String path) {
* If the bundle is in one of the "dropins" folders return its file (jar or folder), else return null
* @param bundle
* @return
* @throws IOException
* @throws IOException, NoSuchElementException.
*/
File getDropinsBundleFile(Bundle bundle) throws IOException {
File bundleFile = FileLocator.getBundleFile(bundle);
File getDropinsBundleFile(Bundle bundle) throws IOException, NoSuchElementException {
File bundleFile = FileLocator.getBundleFileLocation(bundle).get();
File parentFolder = bundleFile.getParentFile();
return (parentFolder.equals(getUserDropinsFolder())
|| parentFolder.equals(getInstanceDropinsFolder())
Expand Down
19 changes: 15 additions & 4 deletions sources/src/org/archicontribs/database/GUI/DBGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ public void run() {
* @param defaultDatabaseName Indicated the name of the default database (the first database will be selected, if the database is not found or if null) - if both ID and name are provided, the ID has got higher priority
* @throws Exception
*/
protected void getDatabases(boolean mustIncludeNeo4j, String defaultDatabaseId, String defaultDatabaseName) throws Exception {
public void getDatabases(boolean mustIncludeNeo4j, String defaultDatabaseId, String defaultDatabaseName) throws Exception {
refreshDisplay();

this.databaseEntries = DBDatabaseEntry.getAllDatabasesFromPreferenceStore();
Expand Down Expand Up @@ -1046,8 +1046,15 @@ public void resetProgressBar() {
* Increases the progressBar selection in the SWT thread (thread safe method)
*/
public void increaseProgressBar() {
increaseProgressBar(1);
}

/**
* Increases the progressBar selection in the SWT thread (thread safe method)
*/
public void increaseProgressBar(int nb) {
if ( this.lblProgressBar != null )
this.progressBar.setSelection(this.progressBar.getSelection()+1);
this.progressBar.setSelection(this.progressBar.getSelection()+nb);
refreshDisplay();
}

Expand Down Expand Up @@ -1386,7 +1393,7 @@ protected Boolean fillInCompareTable(Tree tree, TreeItem treeItem, EObject memor
profilesTreeItem = new TreeItem(tree, SWT.NONE);
else
profilesTreeItem = new TreeItem(treeItem, SWT.NONE);
profilesTreeItem.setText("Spécializations");
profilesTreeItem.setText("Sp�cializations");
profilesTreeItem.setExpanded(true);

// we get a sorted list of model profiles
Expand Down Expand Up @@ -1587,9 +1594,13 @@ public static void refreshDisplay() {
}

public static void incrementText(Text txt) {
incrementText(txt, 1);
}

public static void incrementText(Text txt, int increment) {
if ( txt != null ) {
try {
txt.setText(toString(toInt(txt.getText())+1));
txt.setText(toString(toInt(txt.getText())+increment));
} catch (@SuppressWarnings("unused") Exception ign) {
// ignore
}
Expand Down
Loading

0 comments on commit eb5101a

Please sign in to comment.