Package nl.knaw.dans.lib.util
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
ModifierConstructorDescriptionprotected
DefaultConfigConfiguredCommand
(String name, String description) Deprecated.Creates a new command.protected
DefaultConfigConfiguredCommand
(String name, String description, boolean configFileAsOption) Deprecated.Creates a new command. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
-
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 invocationdescription
- a description of the command's purposeconfigFileAsOption
- iftrue
, the configuration file is set via an option--config
, otherwise, as a positional argument
-
DefaultConfigConfiguredCommand
Deprecated.Creates a new command.- Parameters:
name
- the name of the command, used for command line invocationdescription
- 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 classio.dropwizard.core.cli.ConfiguredCommand<T extends io.dropwizard.core.Configuration>
-