Skip to content

Commit bd7829b

Browse files
committed
Version 3.2.3
Update for API changes
1 parent f51c2b0 commit bd7829b

8 files changed

Lines changed: 11 additions & 42 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ test/*
2525
test2/*
2626
test/widgets/*
2727
bin/main/*
28+
log4j.xml.old

log4j.xml

Lines changed: 0 additions & 33 deletions
This file was deleted.

out/MendixBackupRestoreTool.exe

7 Bytes
Binary file not shown.

out/MendixBackupRestoreTool.jar

7 Bytes
Binary file not shown.

src/main/java/com/ccdg/app/MendixUtil.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
*
6969
*/
7070
public class MendixUtil {
71-
private static final String MXBACKUPAPIV1 = "https://deploy.mendix.com/api/1/apps/";
71+
private static final String MXBACKUPAPIV1 = "https://deploy.mendix.com/api/1/apps";
7272
// json fields in api response
7373
private static final String CREATED_ON = "CreatedOn";
7474
private static final String SNAPSHOT_ID = "SnapshotID";
@@ -472,7 +472,7 @@ public void GetAppList(List list, String filter) {
472472
if (response.code() == 401) {
473473
consoleWrite("Unauthorized, Check your username and api-key ");
474474
} else {
475-
consoleWrite("Error getting apps:" + response.code());
475+
consoleWrite("Error getting apps: " + response.code());
476476
}
477477
}
478478
} catch (Exception e) {
@@ -493,7 +493,7 @@ public void getEnvironmentList(int selectionCount, List environmentlist){
493493
String appid = apps.getJSONObject(AppIndexByListIndex(selectionCount)).getString(APP_ID);
494494

495495
Request request = new Request.Builder()
496-
.url(MXBACKUPAPIV1 + appid +"/environments")
496+
.url(MXBACKUPAPIV1 + "/" + appid +"/environments")
497497
.get()
498498
.addHeader(MENDIX_USER_NAME, apiuser)
499499
.addHeader(MENDIX_API_KEY, apikey)
@@ -614,7 +614,7 @@ public boolean GetBackupList(int selectionCount, String environment ) {
614614
OkHttpClient client = getClient(60);
615615

616616
Request request = new Request.Builder()
617-
.url(MXBACKUPAPIV1+appid+"/environments/"+environment+"/snapshots")
617+
.url(MXBACKUPAPIV1+"/"+appid+"/environments/"+environment+"/snapshots")
618618
.get()
619619
.addHeader(MENDIX_USER_NAME, apiuser)
620620
.addHeader(MENDIX_API_KEY, apikey)
@@ -692,7 +692,7 @@ public void run()
692692
OkHttpClient client = getClient(60);
693693

694694
Request request = new Request.Builder()
695-
.url(MXBACKUPAPIV1+appid+"/environments/"+environment+"/snapshots/"+backupid)
695+
.url(MXBACKUPAPIV1+"/"+appid+"/environments/"+environment+"/snapshots/"+backupid)
696696
.get()
697697
.addHeader(MENDIX_USER_NAME, apiuser)
698698
.addHeader(MENDIX_API_KEY, apikey)
@@ -814,7 +814,7 @@ public void run()
814814
MediaType JSON = MediaType.parse("application/json; charset=utf-8");
815815
RequestBody requestBody = RequestBody.create(JSON, "{\"comment\":\"Backup tool " + apiuser + "\"}");
816816
Request request = new Request.Builder()
817-
.url(MXBACKUPAPIV1+appid+"/environments/"+environment+"/snapshots/")
817+
.url(MXBACKUPAPIV1+"/"+appid+"/environments/"+environment+"/snapshots/")
818818
.post(requestBody)
819819
.addHeader(MENDIX_USER_NAME, apiuser)
820820
.addHeader(MENDIX_API_KEY, apikey)
@@ -877,7 +877,7 @@ public void run()
877877
OkHttpClient client = getClient(60);
878878

879879
Request request = new Request.Builder()
880-
.url(MXBACKUPAPIV1+appid+"/environments/"+environment+"/snapshots/"+backupid)
880+
.url(MXBACKUPAPIV1+"/"+appid+"/environments/"+environment+"/snapshots/"+backupid)
881881
.get()
882882
.addHeader(MENDIX_USER_NAME, apiuser)
883883
.addHeader(MENDIX_API_KEY, apikey)

src/main/java/com/ccdg/app/SettingsDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void widgetSelected(SelectionEvent e) {
142142
Label lblCopyrightChrisDe = new Label(shlSettings, SWT.NONE);
143143
lblCopyrightChrisDe.setToolTipText("");
144144
lblCopyrightChrisDe.setBounds(18, 341, 221, 23);
145-
lblCopyrightChrisDe.setText("V 3.2.1 - Chris de Gelder");
145+
lblCopyrightChrisDe.setText("V 3.2.3 - Chris de Gelder");
146146

147147
lblPostgresDirectory = new Label(shlSettings, SWT.NONE);
148148
lblPostgresDirectory.setText("Postgres directory (no bin)");

target/classes/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/META-INF/
2+
/main/

target/classes/META-INF/maven/com.ccdg.app/MendixBackupRestoreTool/pom.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Generated by Maven Integration for Eclipse
2-
#Sat Mar 06 18:46:22 CET 2021
2+
#Tue Mar 23 12:48:23 CET 2021
33
m2e.projectLocation=C\:\\Users\\Chris de Gelder\\Documents\\GitHub\\BackupRestoreTool\\MendixBackupRestore
44
m2e.projectName=MendixBackupRestoreTool
55
groupId=com.ccdg.app

0 commit comments

Comments
 (0)