Package io.dropwizard.migrations
Class AbstractLiquibaseCommand<T extends Configuration>
- java.lang.Object
-
- io.dropwizard.core.cli.Command
-
- io.dropwizard.core.cli.ConfiguredCommand<T>
-
- io.dropwizard.migrations.AbstractLiquibaseCommand<T>
-
- Direct Known Subclasses:
DbCalculateChecksumCommand,DbClearChecksumsCommand,DbCommand,DbDropAllCommand,DbDumpCommand,DbFastForwardCommand,DbGenerateDocsCommand,DbLocksCommand,DbMigrateCommand,DbPrepareRollbackCommand,DbRollbackCommand,DbStatusCommand,DbTagCommand,DbTestCommand
public abstract class AbstractLiquibaseCommand<T extends Configuration> extends ConfiguredCommand<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractLiquibaseCommand(String name, String description, DatabaseConfiguration<T> strategy, Class<T> configurationClass, String migrationsFileName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidconfigure(net.sourceforge.argparse4j.inf.Subparser subparser)Configure the command'sSubparser.protected Class<T>getConfigurationClass()Returns theClassof the configuration type.protected voidrun(@Nullable Bootstrap<T> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, T configuration)Runs the command with the givenBootstrapandConfiguration.protected abstract voidrun(net.sourceforge.argparse4j.inf.Namespace namespace, liquibase.Liquibase liquibase)-
Methods inherited from class io.dropwizard.core.cli.ConfiguredCommand
addFileArgument, cleanup, cleanupAsynchronously, getConfiguration, run
-
Methods inherited from class io.dropwizard.core.cli.Command
getDescription, getName, onError
-
-
-
-
Method Detail
-
getConfigurationClass
protected Class<T> getConfigurationClass()
Description copied from class:ConfiguredCommandReturns theClassof the configuration type.- Overrides:
getConfigurationClassin classConfiguredCommand<T extends Configuration>- Returns:
- the
Classof the configuration type
-
configure
public void configure(net.sourceforge.argparse4j.inf.Subparser subparser)
Description copied from class:ConfiguredCommandConfigure the command'sSubparser.N.B.: if you override this method, you must call
super.override(subparser)in order to preserve the configuration file parameter in the subparser.- Overrides:
configurein classConfiguredCommand<T extends Configuration>- Parameters:
subparser- theSubparserspecific to the command
-
run
protected void run(@Nullable Bootstrap<T> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, T configuration) throws Exception
Description copied from class:ConfiguredCommandRuns the command with the givenBootstrapandConfiguration.- Specified by:
runin classConfiguredCommand<T extends Configuration>- Parameters:
bootstrap- the bootstrapnamespace- the parsed command line namespaceconfiguration- the configuration object- Throws:
Exception- if something goes wrong
-
-