Package io.permazen.cli.config
Class PermazenCliConfig
java.lang.Object
io.permazen.cli.config.CliConfig
io.permazen.cli.config.KeyValueCliConfig
io.permazen.cli.config.CoreApiCliConfig
io.permazen.cli.config.PermazenCliConfig
Configuration for a CLI application supporting a Permazen database.
-
Field Summary
Modifier and TypeFieldDescriptionprotected joptsimple.OptionSpec<File>
protected joptsimple.OptionSpec<String>
protected joptsimple.OptionSpec<String>
protected Permazen
Fields inherited from class io.permazen.cli.config.CoreApiCliConfig
db, disableNewSchema, encodingRegistry, encodingRegistryOption, noNewSchemaOption, schemaFileOption, schemaModel, schemaRemoval, schemaRemovalOption, sessionMode, sessionModeOption
Fields inherited from class io.permazen.cli.config.KeyValueCliConfig
kvdb, kvdbDescription, kvi, kvis, nestedKVDatabase, nestedKVStore
Fields inherited from class io.permazen.cli.config.CliConfig
helpOption, loader, log, readOnlyOption, setReadOnly, setVerbose, verboseOption
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOptions
(joptsimple.OptionParser parser) Configure anOptionParser
with the comand line flags supported by this instance.protected void
addPermazenOptions
(joptsimple.OptionParser parser) AddPermazen
layer command line flags to the given option parser.protected void
configureSession
(Session session) Configure a newSession
.protected SessionMode
Get the defaultSessionMode
.protected void
processOptions
(joptsimple.OptionSet options) Review parsed options and do any preprocessing before starting database.void
Shutdown the database.void
startupDatabase
(joptsimple.OptionSet options) Configure and start up the database based on the parsed command line options.Methods inherited from class io.permazen.cli.config.CoreApiCliConfig
addCoreApiOptions, addSessionModeOption, getDatabase, getDefaultSchemaRemoval
Methods inherited from class io.permazen.cli.config.KeyValueCliConfig
addKeyValueImplementationOptions, getDatabaseDescription, getKVDatabase
Methods inherited from class io.permazen.cli.config.CliConfig
addGenericOptions, createOptionParser, instantiateClass, loadClass, newPermazenExec, newPermazenShell, showHelp, startup
-
Field Details
-
classPathOption
-
modelClassOption
-
modelPackageOption
-
pdb
-
modelClasses
-
-
Constructor Details
-
PermazenCliConfig
public PermazenCliConfig()
-
-
Method Details
-
addOptions
public void addOptions(joptsimple.OptionParser parser) Description copied from class:CoreApiCliConfig
Configure anOptionParser
with the comand line flags supported by this instance.- Overrides:
addOptions
in classCoreApiCliConfig
- Parameters:
parser
- command line flag parser
-
addPermazenOptions
protected void addPermazenOptions(joptsimple.OptionParser parser) AddPermazen
layer command line flags to the given option parser.- Parameters:
parser
- command line flag parser- Throws:
IllegalArgumentException
- ifparser
is nullIllegalStateException
- if an option being added has already been added
-
processOptions
protected void processOptions(joptsimple.OptionSet options) Description copied from class:CliConfig
Review parsed options and do any preprocessing before starting database.- Overrides:
processOptions
in classCoreApiCliConfig
- Parameters:
options
- parsed command line options
-
getDefaultSessionMode
Description copied from class:CoreApiCliConfig
Get the defaultSessionMode
.- Overrides:
getDefaultSessionMode
in classCoreApiCliConfig
-
startupDatabase
public void startupDatabase(joptsimple.OptionSet options) Description copied from class:CliConfig
Configure and start up the database based on the parsed command line options.- Overrides:
startupDatabase
in classCoreApiCliConfig
- Parameters:
options
- parsed command line options
-
shutdownDatabase
public void shutdownDatabase()Description copied from class:CliConfig
Shutdown the database.- Overrides:
shutdownDatabase
in classCoreApiCliConfig
-
getPermazen
- Overrides:
getPermazen
in classCliConfig
-
configureSession
Description copied from class:CliConfig
Configure a newSession
.- Overrides:
configureSession
in classCoreApiCliConfig
- Parameters:
session
- new session to configure
-