public abstract class AbstractModelCommand extends AbstractModletCommand
Model
based command implementation.AbstractModletCommand.CommandLineClassLoader
Command.Listener
STATUS_FAILURE, STATUS_SUCCESS
Constructor and Description |
---|
AbstractModelCommand()
Creates a new
AbstractModelCommand instance. |
Modifier and Type | Method and Description |
---|---|
protected ModelContext |
createModelContext(CommandLine commandLine,
ClassLoader classLoader)
Creates a new
ModelContext for a given CommandLine and ClassLoader . |
protected Model |
getModel(ModelContext context,
CommandLine commandLine)
Gets the model as specified by a given command line.
|
Options |
getOptions()
Gets the options of the command.
|
createTransformer, getDocumentFiles, getModel, log
execute, executeCommand, getDefaultLogLevel, getExecutorService, getListeners, getLogLevel, isLoggable, log, postExecuteCommand, preExecuteCommand, setDefaultLogLevel, setLogLevel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAbbreviatedName, getLongDescription, getName, getShortDescription
public AbstractModelCommand()
AbstractModelCommand
instance.public Options getOptions()
Command
getOptions
in interface Command
getOptions
in class AbstractModletCommand
protected ModelContext createModelContext(CommandLine commandLine, ClassLoader classLoader) throws CommandExecutionException
ModelContext
for a given CommandLine
and ClassLoader
.createModelContext
in class AbstractModletCommand
commandLine
- The CommandLine
to create a new ModelContext
with.classLoader
- The ClassLoader
to create a new ModelContext
with.ModelContext
for classLoader
setup using commandLine
.CommandExecutionException
- if creating an new ModelContext
fails.protected Model getModel(ModelContext context, CommandLine commandLine) throws CommandExecutionException
context
- The context to use for getting the model.commandLine
- The command line specifying the model to get.commandLine
.CommandExecutionException
- if getting the model fails.Copyright © 2005–2016 The JOMC Project. All rights reserved.