Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opal-server/src/main/tools/shiro-hasher
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

java -jar hasher/lib/shiro-tools-hasher-${shiro.version}-cli.jar $@
java -jar "$(dirname "$0")/hasher/lib/shiro-tools-hasher-${shiro.version}-cli.jar" "$@"
2 changes: 1 addition & 1 deletion opal-server/src/main/tools/shiro-hasher.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java -jar hasher\lib\shiro-tools-hasher-${shiro.version}-cli.jar %*
java -jar "%~dp0hasher\lib\shiro-tools-hasher-${shiro.version}-cli.jar" %*
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.obiba.opal.shell.commands;


import org.obiba.opal.shell.commands.options.FileBundleCommandOptions;

@CommandUsage(description = "Prepare a file bundle.",
syntax = "Syntax: file-bundle --path PATH [--password PASSWORD]")
public class FileBundleCommand extends AbstractOpalRuntimeDependentCommand<FileBundleCommandOptions> {

@Override
public int execute() {
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.obiba.opal.shell.commands.options;

import uk.co.flamingpenguin.jewel.cli.CommandLineInterface;
import uk.co.flamingpenguin.jewel.cli.Option;

@CommandLineInterface(application = "file-bundle")
public interface FileBundleCommandOptions extends HelpOption {
@Option(shortName = "z", description = "The file or folder path to bundle to a zip archive.")
String getPath();
@Option(shortName = "p", description = "The password to use to encrypt the file bundle.")
String getPassword();
boolean isPassword();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package org.obiba.opal.shell.web;

import com.google.common.base.Strings;
import org.obiba.opal.shell.commands.options.FileBundleCommandOptions;

public class FileBundleCommandOptionsImpl implements FileBundleCommandOptions {

private final String path;

private final String password;

public FileBundleCommandOptionsImpl(String path, String password) {
this.path = path;
this.password = password;
}

@Override
public String getPath() {
return path;
}

@Override
public String getPassword() {
return password;
}

@Override
public boolean isPassword() {
return !Strings.isNullOrEmpty(password);
}

@Override
public boolean isHelp() {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
public class WebShellCommandRegistry extends AbstractCommandRegistry {

public WebShellCommandRegistry() {

addAvailableCommand(ImportCommand.class, ImportCommandOptions.class);
addAvailableCommand(CopyCommand.class, CopyCommandOptions.class);
addAvailableCommand("export", CopyCommand.class, CopyCommandOptions.class);
Expand All @@ -35,5 +34,6 @@ public WebShellCommandRegistry() {
addAvailableCommand(ExportVCFCommand.class, ExportVCFCommandOptions.class);
addAvailableCommand("r-packages", RPackagesCommand.class, RPackagesCommandOptions.class);
addAvailableCommand("r-package", RPackageCommand.class, RPackageCommandOptions.class);
addAvailableCommand("file-bundle", FileBundleCommand.class, FileBundleCommandOptions.class);
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<mysql-connector-j.version>8.4.0</mysql-connector-j.version>
<nimbus-jose-jwt.version>10.0.2</nimbus-jose-jwt.version>
<oauth-oidc-sdk.version>11.12</oauth-oidc-sdk.version>
<obiba-commons.version>5.1.1</obiba-commons.version>
<obiba-commons.version>5.1.2</obiba-commons.version>
<opal-oda.version>1.2.3</opal-oda.version>
<opencsv.version>2.3</opencsv.version>
<orientdb.version>3.2.45</orientdb.version>
Expand Down
Loading