Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This type of connection initialises repository layer of midpoint and operates on top of DB as new midPoint node. Mostly only one option is needed and that's specification of midpoint.home directory using -m option. This is not sufficient if config.xml uses datasource definition. Ninja then doesn't know how to connect to DB. For this case one have to use options to specify url ( -U ), username ( -u ) and password ( -p or -P ). These options can also be used to override JDBC url, username and password specified in config.xml.

REST connection

Note

Not yet implemented.

Supported operations

Currently supports three operations:

  • import
  • export
  • keys
  • count
  • delete

Ninja can be started using standart java -jar or via bundles shell/bat script. Bundled scripts will automatically fill in path to for midPoint home option -m. There's also a difference between usage when pointing ninja to correct JDBC drivers. Example use with java -jar option:

Code Block
bash
bash
java -Dloader.path=<jdbc_driver_jar_path> -jar ninja.jar [general options] [command] [command options]

Example use with bundled shell script:

Code Block
block
block
<MIDPOINT_INSTALLATION_PATH>/bin/ninja.sh -j <JDBC_DRIVER_JAR> [general options] [command] [command options]

Import

Import command allow users to import objects from SYSOUT or file (either plain XML or compressed ZIP, which may contain multiple files). One can define oid, multiple types or filter to filter imported objects. Example of import from XML file using 4 threads with raw and overwrite option using explicit midpoint.home folder path:

Code Block
languagebash
titleExample
java -jar ninja.jar -m ~/Desktop/midpoint/var import -O -i midpoint/samples/objects/user-ceresnickova.xml -l 4 -r

Import using shell script

 

Code Block
languagebash
titleExample
./bin/ninja.sh import -O -i midpoint/samples/objects/user-ceresnickova.xml -l 4 -r

Export

...

Export

Export command allows users to export objects to SYSOUT or file (either plain XML or compressed ZIP). One can define oid, multiple types or filter to filter exported objects. Export objects to compressed zip file using 4 threads:

Code Block
languagebash
titleExample
java -jar ninja.jar -m ~/Desktop/midpoint/var export -O export.zip -z -l 4

...