public abstract class EndpointsToolAction
extends com.google.appengine.tools.util.Action
Actions used by the Cloud Endpoints command line tool. Users can use
Endpoints command line tool to generate client library bundles and discovery docs.| Modifier and Type | Class and Description |
|---|---|
protected static class |
EndpointsToolAction.EndpointsOption
Base class for
Options used by the Cloud Endpoints tool. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OPTION_BASE_PATH_LONG |
static java.lang.String |
OPTION_BASE_PATH_SHORT |
static java.lang.String |
OPTION_BUILD_SYSTEM_LONG |
static java.lang.String |
OPTION_BUILD_SYSTEM_SHORT |
static java.lang.String |
OPTION_CLASS_PATH_LONG |
static java.lang.String |
OPTION_CLASS_PATH_SHORT |
static java.lang.String |
OPTION_DEBUG |
static java.lang.String |
OPTION_FORMAT_LONG |
static java.lang.String |
OPTION_FORMAT_SHORT |
static java.lang.String |
OPTION_HOSTNAME_LONG |
static java.lang.String |
OPTION_HOSTNAME_SHORT |
static java.lang.String |
OPTION_LANGUAGE_LONG |
static java.lang.String |
OPTION_LANGUAGE_SHORT |
static java.lang.String |
OPTION_OUTPUT_DIR_LONG |
static java.lang.String |
OPTION_OUTPUT_DIR_SHORT |
static java.lang.String |
OPTION_WAR_LONG |
static java.lang.String |
OPTION_WAR_SHORT |
| Constructor and Description |
|---|
EndpointsToolAction(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply() |
protected java.net.URL[] |
computeClassPath(java.lang.String warPath,
java.lang.String classPath)
Computes an array of URLs representing a classpath for a WAR directory.
|
abstract boolean |
execute()
Executes the command with the given arguments.
|
protected java.lang.String |
getBasePath(com.google.appengine.tools.util.Option basePathOption) |
protected java.lang.String |
getBuildSystem(com.google.appengine.tools.util.Option buildSystemOption) |
protected java.lang.String |
getClassPath(com.google.appengine.tools.util.Option classPathOption) |
protected boolean |
getDebug(com.google.appengine.tools.util.Option debugOption) |
java.lang.String |
getExampleString()
Return the example string which will be displayed in the usage.
|
protected java.lang.String |
getFormat(com.google.appengine.tools.util.Option formatOption) |
protected java.util.List<java.lang.String> |
getHelpLines() |
protected java.lang.String |
getHostname(com.google.appengine.tools.util.Option hostnameOption,
java.lang.String warPath) |
protected java.lang.String |
getLanguage(com.google.appengine.tools.util.Option languageOption) |
protected java.lang.String |
getOpenApiOutputPath(com.google.appengine.tools.util.Option outputOption) |
protected java.lang.String |
getOptionOrDefault(com.google.appengine.tools.util.Option option,
java.lang.String defaultValue) |
protected java.lang.String |
getOutputPath(com.google.appengine.tools.util.Option outputOption) |
protected java.util.List<java.lang.String> |
getServiceClassNames(java.lang.String warPath) |
abstract java.lang.String |
getUsageString()
Returns a usage string for help output.
|
protected java.lang.String |
getWarOutputPath(com.google.appengine.tools.util.Option outputOption,
java.lang.String warPath) |
protected java.lang.String |
getWarPath(com.google.appengine.tools.util.Option warOption) |
boolean |
isHelpDisplayNeeded()
Tells whether help lines of this action needs to be displayed in the usage.
|
protected com.google.appengine.tools.util.Option |
makeBasePathOption() |
protected com.google.appengine.tools.util.Option |
makeBuildSystemOption() |
protected com.google.appengine.tools.util.Option |
makeClassPathOption() |
protected com.google.appengine.tools.util.Option |
makeDebugOption() |
protected com.google.appengine.tools.util.Option |
makeFormatOption() |
protected com.google.appengine.tools.util.Option |
makeHostnameOption() |
protected com.google.appengine.tools.util.Option |
makeLanguageOption() |
protected com.google.appengine.tools.util.Option |
makeOpenApiOutputOption() |
protected com.google.appengine.tools.util.Option |
makeOutputOption() |
protected com.google.appengine.tools.util.Option |
makeWarOption() |
protected com.google.appengine.tools.util.Option |
makeWarOutputOption() |
void |
setExampleString(java.lang.String exampleString)
Set the example string which will be displayed in the usage.
|
void |
setHelpDisplayNeeded(boolean helpDisplayNeeded)
Controls whether the help lines of the action need to be displayed in the usage.
|
public static final java.lang.String OPTION_CLASS_PATH_SHORT
public static final java.lang.String OPTION_CLASS_PATH_LONG
public static final java.lang.String OPTION_OUTPUT_DIR_SHORT
public static final java.lang.String OPTION_OUTPUT_DIR_LONG
public static final java.lang.String OPTION_WAR_SHORT
public static final java.lang.String OPTION_WAR_LONG
public static final java.lang.String OPTION_LANGUAGE_SHORT
public static final java.lang.String OPTION_LANGUAGE_LONG
public static final java.lang.String OPTION_BUILD_SYSTEM_SHORT
public static final java.lang.String OPTION_BUILD_SYSTEM_LONG
public static final java.lang.String OPTION_FORMAT_SHORT
public static final java.lang.String OPTION_FORMAT_LONG
public static final java.lang.String OPTION_DEBUG
public static final java.lang.String OPTION_HOSTNAME_SHORT
public static final java.lang.String OPTION_HOSTNAME_LONG
public static final java.lang.String OPTION_BASE_PATH_SHORT
public static final java.lang.String OPTION_BASE_PATH_LONG
public abstract java.lang.String getUsageString()
public abstract boolean execute()
throws java.lang.ClassNotFoundException,
java.io.IOException,
com.google.api.server.spi.config.ApiConfigException
java.lang.ClassNotFoundExceptionjava.io.IOExceptioncom.google.api.server.spi.config.ApiConfigExceptionpublic void apply()
apply in class com.google.appengine.tools.util.Actionprotected java.util.List<java.lang.String> getHelpLines()
getHelpLines in class com.google.appengine.tools.util.Actionprotected java.lang.String getWarPath(com.google.appengine.tools.util.Option warOption)
protected java.lang.String getOutputPath(com.google.appengine.tools.util.Option outputOption)
protected java.lang.String getWarOutputPath(com.google.appengine.tools.util.Option outputOption,
java.lang.String warPath)
protected java.lang.String getOpenApiOutputPath(com.google.appengine.tools.util.Option outputOption)
protected java.lang.String getClassPath(com.google.appengine.tools.util.Option classPathOption)
protected java.lang.String getLanguage(com.google.appengine.tools.util.Option languageOption)
protected java.lang.String getBuildSystem(com.google.appengine.tools.util.Option buildSystemOption)
protected java.lang.String getFormat(com.google.appengine.tools.util.Option formatOption)
protected boolean getDebug(com.google.appengine.tools.util.Option debugOption)
protected java.lang.String getHostname(com.google.appengine.tools.util.Option hostnameOption,
java.lang.String warPath)
protected java.lang.String getBasePath(com.google.appengine.tools.util.Option basePathOption)
protected java.lang.String getOptionOrDefault(com.google.appengine.tools.util.Option option,
java.lang.String defaultValue)
protected com.google.appengine.tools.util.Option makeWarOption()
protected com.google.appengine.tools.util.Option makeOutputOption()
protected com.google.appengine.tools.util.Option makeWarOutputOption()
protected com.google.appengine.tools.util.Option makeOpenApiOutputOption()
protected com.google.appengine.tools.util.Option makeClassPathOption()
protected com.google.appengine.tools.util.Option makeLanguageOption()
protected com.google.appengine.tools.util.Option makeBuildSystemOption()
protected com.google.appengine.tools.util.Option makeFormatOption()
protected com.google.appengine.tools.util.Option makeDebugOption()
protected com.google.appengine.tools.util.Option makeHostnameOption()
protected com.google.appengine.tools.util.Option makeBasePathOption()
protected java.net.URL[] computeClassPath(java.lang.String warPath,
java.lang.String classPath)
throws java.net.MalformedURLException
warPath - a path to a directory with a WAR structureclassPath - a list of class path entries separated by File.pathSeparator.java.net.MalformedURLExceptionprotected java.util.List<java.lang.String> getServiceClassNames(java.lang.String warPath)
public boolean isHelpDisplayNeeded()
public void setHelpDisplayNeeded(boolean helpDisplayNeeded)
public java.lang.String getExampleString()
public void setExampleString(java.lang.String exampleString)