org.jomc.cli.commands
Class AbstractModelCommand

Package class diagram package AbstractModelCommand
java.lang.Object
  extended by org.jomc.cli.commands.AbstractCommand
      extended by org.jomc.cli.commands.AbstractModletCommand
          extended by org.jomc.cli.commands.AbstractModelCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
AbstractJomcToolCommand, MergeModulesCommand, ShowModelCommand, ValidateModelCommand

@Generated(value="org.jomc.tools.SourceFileProcessor 1.2.2",
           comments="See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2")
public abstract class AbstractModelCommand
extends AbstractModletCommand

JOMC CLI model based command implementation.

Identifier:
JOMC CLI Model Command
Name:
JOMC CLI Model Command
Specifications:
JOMC CLI Command @ 1.0
Abstract:
Yes
Final:
No
Stateless:
No

Version:
1.2.5
Author:
Christian Schulte 1.0

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jomc.cli.commands.AbstractModletCommand
AbstractModletCommand.CommandLineClassLoader
 
Nested classes/interfaces inherited from interface org.jomc.cli.Command
Command.Listener
 
Field Summary
 
Fields inherited from interface org.jomc.cli.Command
STATUS_FAILURE, STATUS_SUCCESS
 
Constructor Summary
AbstractModelCommand()
          Creates a new AbstractModelCommand instance.
 
Method Summary
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.
 
Methods inherited from class org.jomc.cli.commands.AbstractModletCommand
createTransformer, getDocumentFiles, getModel, log
 
Methods inherited from class org.jomc.cli.commands.AbstractCommand
execute, executeCommand, getAbbreviatedName, getDefaultLogLevel, getExceptionMessage, getListeners, getLogLevel, getLongDescription, getName, getShortDescription, isLoggable, log, postExecuteCommand, preExecuteCommand, setDefaultLogLevel, setLogLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractModelCommand

@Generated(value="org.jomc.tools.SourceFileProcessor 1.2.2",
           comments="See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2")
public AbstractModelCommand()
Creates a new AbstractModelCommand instance.

Method Detail

createModelContext

protected ModelContext createModelContext(CommandLine commandLine,
                                          ClassLoader classLoader)
                                   throws CommandExecutionException
Creates a new ModelContext for a given CommandLine and ClassLoader.

Overrides:
createModelContext in class AbstractModletCommand
Parameters:
commandLine - The CommandLine to create a new ModelContext with.
classLoader - The ClassLoader to create a new ModelContext with.
Returns:
A new ModelContext for classLoader setup using commandLine.
Throws:
CommandExecutionException - if creating an new ModelContext fails.

getModel

protected Model getModel(ModelContext context,
                         CommandLine commandLine)
                  throws CommandExecutionException
Gets the model as specified by a given command line.

Parameters:
context - The context to use for getting the model.
commandLine - The command line specifying the model to get.
Returns:
The model as specified by commandLine.
Throws:
CommandExecutionException - if getting the model fails.

getOptions

@Generated(value="org.jomc.tools.SourceFileProcessor 1.2.2",
           comments="See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2")
public Options getOptions()
Gets the options of the command.

Options:

Specification Implementation
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI Classpath Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI Documents Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI ModelContextFactory Class Name Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI Model Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI Modlet Location Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI Modlet Schema System Id Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI Module Location Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI No Classpath Resolution Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI No Model Processing Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI No Model Resource Validation Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI No Modlet Resource Validation Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI Platform Provider Location Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI Provider Location Option
JOMC CLI Command Option (org.apache.commons.cli.Option) @ 1.2 JOMC CLI Transformer Location Option

Specified by:
getOptions in interface Command
Overrides:
getOptions in class AbstractModletCommand
Returns:
The options of the command.


Copyright © 2005-2012 The JOMC Project. All Rights Reserved.Get JOMC at SourceForge.net. Fast, secure and Free Open Source software downloads
Please note that this documentation is maintained by non-native english speaking authors. As such, you may encounter phrases or wordings which seem imprecise or may even have a totally different meaning to native english speaking readers than what the individual author was trying to express. If you are a native english speaking reader and find any such phrases or wordings we kindly ask you to send an email to the corresponding author and help us improve this documentation in order to avoid misunderstandings. You will find the authors' email addresses at the top of each class. Please accept our apologies for any inconvenience caused.