org.utgenome.shell
Class UTGBShellCommand

java.lang.Object
  extended by org.utgenome.shell.UTGBShellCommand
All Implemented Interfaces:
Comparable<UTGBShellCommand>
Direct Known Subclasses:
AddAction, Clean, Compile, Create, Deploy, Eclipse, FastqRename, FastqToFasta, FastqToSAM, GWT, GWTCompile, Illumina2Fastq, Import, Keyword, Maven, Pack, QSeqToFastq, Repair, Sam2Wig, SAMToFastq, ScreenShot, Sequence, Server, SVNAdd, Upgrade

public abstract class UTGBShellCommand
extends Object
implements Comparable<UTGBShellCommand>

A common implementation of the UTGBShell's sub commands

Author:
leo

Field Summary
static String APP_FOLDER
           
static String EXPLODED_WEBAPP_DIR
           
protected  UTGBShell.UTGBShellOption globalOption
           
static String SRC_FOLDER
           
static String WEBAPP_FOLDER
           
 
Constructor Summary
UTGBShellCommand()
           
 
Method Summary
 int compareTo(UTGBShellCommand o)
           
 void createContextXML(String contextPath, String projectRoot, boolean reloadable)
           
 void createFileFromTemplate(Class<?> baseClass, String templateFilePath, String relativePathOfTarget, Properties prop)
           
static void createFileFromTemplate(Class<?> baseClass, String templateFilePath, String projectFolder, String relativePathOfTarget, Properties prop, boolean overWrite)
           
abstract  void execute(String[] args)
           
 void execute(UTGBShell.UTGBShellOption globalOption, String[] args)
           
 File getConfigFile()
           
 File getObsolteConfigurationFile()
           
abstract  String getOneLinerDescription()
           
 Object getOptionHolder()
           
static String getPath(File f)
           
 File getProjectResourcePath(String relativePathFromTheProjectRoot)
           
 File getProjectRoot()
           
 boolean isInProjectRoot()
           
 UTGBConfig loadUTGBConfig()
           
 void maven(String commandLine)
           
abstract  String name()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP_FOLDER

public static final String APP_FOLDER
See Also:
Constant Field Values

SRC_FOLDER

public static final String SRC_FOLDER
See Also:
Constant Field Values

WEBAPP_FOLDER

public static final String WEBAPP_FOLDER
See Also:
Constant Field Values

EXPLODED_WEBAPP_DIR

public static final String EXPLODED_WEBAPP_DIR
See Also:
Constant Field Values

globalOption

protected UTGBShell.UTGBShellOption globalOption
Constructor Detail

UTGBShellCommand

public UTGBShellCommand()
Method Detail

name

public abstract String name()

execute

public void execute(UTGBShell.UTGBShellOption globalOption,
                    String[] args)
             throws Exception
Throws:
Exception

execute

public abstract void execute(String[] args)
                      throws Exception
Throws:
Exception

getOneLinerDescription

public abstract String getOneLinerDescription()

getOptionHolder

public Object getOptionHolder()

getProjectRoot

public File getProjectRoot()

isInProjectRoot

public boolean isInProjectRoot()

getProjectResourcePath

public File getProjectResourcePath(String relativePathFromTheProjectRoot)

getConfigFile

public File getConfigFile()

getObsolteConfigurationFile

public File getObsolteConfigurationFile()

maven

public void maven(String commandLine)
           throws UTGBShellException
Throws:
UTGBShellException

loadUTGBConfig

public UTGBConfig loadUTGBConfig()
                          throws UTGBShellException
Throws:
UTGBShellException

compareTo

public int compareTo(UTGBShellCommand o)
Specified by:
compareTo in interface Comparable<UTGBShellCommand>

getPath

public static String getPath(File f)

createContextXML

public void createContextXML(String contextPath,
                             String projectRoot,
                             boolean reloadable)
                      throws UTGBShellException
Throws:
UTGBShellException

createFileFromTemplate

public void createFileFromTemplate(Class<?> baseClass,
                                   String templateFilePath,
                                   String relativePathOfTarget,
                                   Properties prop)
                            throws UTGBShellException
Throws:
UTGBShellException

createFileFromTemplate

public static void createFileFromTemplate(Class<?> baseClass,
                                          String templateFilePath,
                                          String projectFolder,
                                          String relativePathOfTarget,
                                          Properties prop,
                                          boolean overWrite)
                                   throws UTGBShellException
Throws:
UTGBShellException


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.