Class DefaultConfigConfiguredCommand<T extends io.dropwizard.core.Configuration>

java.lang.Object
io.dropwizard.core.cli.Command
io.dropwizard.core.cli.ConfiguredCommand<T>
nl.knaw.dans.lib.util.DefaultConfigConfiguredCommand<T>
Type Parameters:
T - the application's configuration class

@Deprecated public abstract class DefaultConfigConfiguredCommand<T extends io.dropwizard.core.Configuration> extends io.dropwizard.core.cli.ConfiguredCommand<T>
Deprecated.
A DropWizard ConfiguredCommand that configures the value of system property `dans.default.config` as the default for the `file` parameter. This can be used to create a start-up script for the application that does not require the user to explicitly provide the `config.yml` location with every invocation, .e.g.,

```bash ARGS=$@

java -Ddans.config.default=/etc/opt/dans.knaw.nl/my-app/config.yml my-app.jar $ARGS ```

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Deprecated.
    Creates a new command.
    protected
    DefaultConfigConfiguredCommand(String name, String description, boolean configFileAsOption)
    Deprecated.
    Creates a new command.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected net.sourceforge.argparse4j.inf.Argument
    addFileArgument(net.sourceforge.argparse4j.inf.Subparser subparser)
    Deprecated.
     

    Methods inherited from class io.dropwizard.core.cli.ConfiguredCommand

    cleanup, cleanupAsynchronously, configure, getConfiguration, getConfigurationClass, run, run

    Methods inherited from class io.dropwizard.core.cli.Command

    getDescription, getName, onError

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultConfigConfiguredCommand

      protected DefaultConfigConfiguredCommand(String name, String description, boolean configFileAsOption)
      Deprecated.
      Creates a new command.
      Parameters:
      name - the name of the command, used for command line invocation
      description - a description of the command's purpose
      configFileAsOption - if true, the configuration file is set via an option --config, otherwise, as a positional argument
    • DefaultConfigConfiguredCommand

      protected DefaultConfigConfiguredCommand(String name, String description)
      Deprecated.
      Creates a new command.
      Parameters:
      name - the name of the command, used for command line invocation
      description - a description of the command's purpose
  • Method Details

    • addFileArgument

      protected net.sourceforge.argparse4j.inf.Argument addFileArgument(net.sourceforge.argparse4j.inf.Subparser subparser)
      Deprecated.
      Overrides:
      addFileArgument in class io.dropwizard.core.cli.ConfiguredCommand<T extends io.dropwizard.core.Configuration>