Package nl.knaw.dans.lib.util
Class DefaultConfigEnvironmentCommand<T extends io.dropwizard.core.Configuration>
java.lang.Object
io.dropwizard.core.cli.Command
io.dropwizard.core.cli.ConfiguredCommand<T>
io.dropwizard.core.cli.EnvironmentCommand<T>
nl.knaw.dans.lib.util.DefaultConfigEnvironmentCommand<T>
- Type Parameters:
T
- the application's configuration class
@Deprecated
public abstract class DefaultConfigEnvironmentCommand<T extends io.dropwizard.core.Configuration>
extends io.dropwizard.core.cli.EnvironmentCommand<T>
Deprecated.
A DropWizard
EnvironmentCommand
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
DefaultConfigEnvironmentCommand
(io.dropwizard.core.Application<T> application, String name, String description) Deprecated.Creates a new environment command.protected
DefaultConfigEnvironmentCommand
(io.dropwizard.core.Application<T> application, String name, String description, boolean configFileAsOption) Deprecated.Creates a new environment 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.EnvironmentCommand
getEnvironment, run, run
Methods inherited from class io.dropwizard.core.cli.ConfiguredCommand
cleanup, cleanupAsynchronously, configure, getConfiguration, getConfigurationClass, run
Methods inherited from class io.dropwizard.core.cli.Command
getDescription, getName, onError
-
Constructor Details
-
DefaultConfigEnvironmentCommand
protected DefaultConfigEnvironmentCommand(io.dropwizard.core.Application<T> application, String name, String description, boolean configFileAsOption) Deprecated.Creates a new environment command.- Parameters:
application
- the application providing this commandname
- 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
-
DefaultConfigEnvironmentCommand
protected DefaultConfigEnvironmentCommand(io.dropwizard.core.Application<T> application, String name, String description) Deprecated.Creates a new environment command.- Parameters:
application
- the application providing this commandname
- 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>
-