Skip to content

Commit

Permalink
MID-9240 added back "-j" option removed by mistake (custom jdbc drive…
Browse files Browse the repository at this point in the history
…r support)

(cherry picked from commit a1cd173)
  • Loading branch information
1azyman committed Oct 23, 2023
1 parent de35b30 commit b88c49d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class BaseOptions {
public static final String P_VERSION_LONG = "--version";

public static final String P_BATCH_MODE = "-B";
public static final String P_BATCH_MODE_LONG= "--batch-mode";
public static final String P_BATCH_MODE_LONG = "--batch-mode";

@Parameter(names = { P_HELP, P_HELP_LONG }, help = true, descriptionKey = "base.help")
private boolean help = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/
package com.evolveum.midpoint.ninja.action;

import java.io.File;

import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;

Expand All @@ -32,6 +34,12 @@ public class ConnectionOptions {
public static final String P_MIDPOINT_HOME = "-m";
public static final String P_MIDPOINT_HOME_LONG = "--midpoint-home";

public static final String P_JDBC = "-j";
public static final String P_JDBC_LONG = "--jdbc";

@Parameter(names = { P_JDBC, P_JDBC_LONG }, descriptionKey = "connection.jdbc", hidden = true)
private File jdbc;

@Parameter(names = { P_URL, P_URL_LONG }, validateWith = URIConverter.class, descriptionKey = "connection.url")
private String url;

Expand Down Expand Up @@ -87,4 +95,12 @@ public void setAskPassword(String askPassword) {
public void setMidpointHome(String midpointHome) {
this.midpointHome = midpointHome;
}

public File jdbc() {
return jdbc;
}

public void setJdbc(File jdbc) {
this.jdbc = jdbc;
}
}
1 change: 1 addition & 0 deletions tools/ninja/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ connection.username=Username for JDBC connection
connection.password=Password for JDBC connection
connection.askPassword=Ninja will ask for JDBC connection password
connection.midpointHome=Path to MidPoint home folder. If relative path is specified, it will be translated to absolute path.
connection.jdbc=JDBC driver file
delete=Delete objects from MidPoint
delete.oid=Object OID
delete.raw=Raw option
Expand Down

0 comments on commit b88c49d

Please sign in to comment.