public class NewProjectBuilder extends Object implements StallionRunAction<CommandOptionsBase>
Constructor and Description |
---|
NewProjectBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
copyFile(String resourcePath,
String relativePath) |
void |
execute(CommandOptionsBase options)
Actually do the action.
|
String |
getActionName()
The name of the action, will be used on the command line to run the action.
|
String |
getHelp()
A friendly description of what the action does, will be printed on the command-line
when help is asked for.
|
protected CommandOptionsBase |
getOptions() |
Scanner |
getScanner() |
protected String |
getTargetFolder() |
protected JinjaTemplating |
getTemplating() |
protected void |
init(CommandOptionsBase options) |
void |
loadApp(CommandOptionsBase options)
Load the application context.
|
protected void |
makeAssets() |
protected void |
makeBareBonesSite(String folder) |
protected void |
makeBasicScaffold(String folder) |
protected void |
makeJavaApplication(String folder) |
protected void |
makeJavascriptSite(String folder) |
void |
makeJs() |
protected void |
makePages() |
protected void |
makePosts() |
protected void |
makeSimpleTextSite(String folder) |
protected void |
makeStandardConf() |
protected void |
makeTemplates() |
protected void |
makeUser() |
CommandOptionsBase |
newCommandOptions()
Each action might have its own command-line arguments.
|
protected void |
removeFile(String relativePath) |
protected void |
replaceString(String relativePath,
String old,
String newString) |
boolean |
requireDatabase() |
protected NewProjectBuilder |
setOptions(CommandOptionsBase options) |
NewProjectBuilder |
setScanner(Scanner scanner) |
protected NewProjectBuilder |
setTargetFolder(String targetFolder) |
protected NewProjectBuilder |
setTemplating(JinjaTemplating templating) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSubActionName
public NewProjectBuilder()
public String getActionName()
StallionRunAction
getActionName
in interface StallionRunAction<CommandOptionsBase>
public String getHelp()
StallionRunAction
getHelp
in interface StallionRunAction<CommandOptionsBase>
public void loadApp(CommandOptionsBase options)
StallionRunAction
loadApp
in interface StallionRunAction<CommandOptionsBase>
public boolean requireDatabase()
public CommandOptionsBase newCommandOptions()
StallionRunAction
newCommandOptions
in interface StallionRunAction<CommandOptionsBase>
protected void init(CommandOptionsBase options)
public void execute(CommandOptionsBase options) throws Exception
StallionRunAction
execute
in interface StallionRunAction<CommandOptionsBase>
Exception
protected void makeBasicScaffold(String folder) throws Exception
Exception
protected void makeBareBonesSite(String folder) throws Exception
Exception
protected void makeSimpleTextSite(String folder) throws Exception
Exception
protected void makeJavascriptSite(String folder) throws Exception
Exception
protected void makeJavaApplication(String folder) throws Exception
Exception
protected void makeStandardConf() throws IOException
IOException
protected void makePages() throws IOException
IOException
protected void makePosts() throws IOException
IOException
protected void makeTemplates() throws IOException
IOException
protected void removeFile(String relativePath) throws IOException
IOException
protected void makeAssets() throws IOException
IOException
public void copyFile(String resourcePath, String relativePath) throws IOException
IOException
protected void replaceString(String relativePath, String old, String newString)
public Scanner getScanner()
public NewProjectBuilder setScanner(Scanner scanner)
protected String getTargetFolder()
protected NewProjectBuilder setTargetFolder(String targetFolder)
protected CommandOptionsBase getOptions()
protected NewProjectBuilder setOptions(CommandOptionsBase options)
protected JinjaTemplating getTemplating()
protected NewProjectBuilder setTemplating(JinjaTemplating templating)
Copyright © 2016. All rights reserved.