public abstract class AbstractModletCommand extends AbstractCommand
ModelContext
based command implementation.Modifier and Type | Class and Description |
---|---|
class |
AbstractModletCommand.CommandLineClassLoader
Class loader backed by a command line.
|
Command.Listener
STATUS_FAILURE, STATUS_SUCCESS
Constructor and Description |
---|
AbstractModletCommand()
Creates a new
AbstractModletCommand 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 Transformer |
createTransformer(Source source)
Creates a new
Transformer from a given Source . |
protected Set<File> |
getDocumentFiles(CommandLine commandLine)
Gets the document files specified by a given command line.
|
protected String |
getModel(CommandLine commandLine)
Gets the identifier of the model to process.
|
Options |
getOptions()
Gets the options of the command.
|
protected void |
log(ModelValidationReport validationReport,
javax.xml.bind.Marshaller marshaller)
Logs a validation report.
|
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 AbstractModletCommand()
AbstractModletCommand
instance.public Options getOptions()
Command
getOptions
in interface Command
getOptions
in class AbstractCommand
protected Transformer createTransformer(Source source) throws CommandExecutionException
Transformer
from a given Source
.source
- The source to initialize the transformer with.Transformer
backed by source
.NullPointerException
- if source
is null
.CommandExecutionException
- if creating a transformer fails.protected ModelContext createModelContext(CommandLine commandLine, ClassLoader classLoader) throws CommandExecutionException
ModelContext
for a given CommandLine
and ClassLoader
.commandLine
- The CommandLine
to create a new ModelContext
with.classLoader
- The ClassLoader
to create a new ModelContext
with.ModelContext
for classLoader
setup using commandLine
.NullPointerException
- if commandLine
is null
.CommandExecutionException
- if creating an new ModelContext
fails.protected String getModel(CommandLine commandLine)
commandLine
- The command line to get the identifier of the model to process from.NullPointerException
- if commandLine
is null
.protected void log(ModelValidationReport validationReport, javax.xml.bind.Marshaller marshaller) throws CommandExecutionException
validationReport
- The report to log.marshaller
- The marshaller to use for logging the report.CommandExecutionException
- if logging a report detail element fails.protected Set<File> getDocumentFiles(CommandLine commandLine) throws CommandExecutionException
commandLine
- The command line specifying the document files to get.commandLine
.CommandExecutionException
- if getting the document files fails.Copyright © 2005–2016 The JOMC Project. All rights reserved.