Package com.google.api.server.spi.tools
Class GetClientLibAction
- java.lang.Object
-
- com.google.appengine.tools.util.Action
-
- com.google.api.server.spi.tools.EndpointsToolAction
-
- com.google.api.server.spi.tools.GetClientLibAction
-
public class GetClientLibAction extends EndpointsToolAction
Command that combines 3 other ones and generates client libraries from service classes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.server.spi.tools.EndpointsToolAction
EndpointsToolAction.EndpointsOption
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME-
Fields inherited from class com.google.api.server.spi.tools.EndpointsToolAction
OPTION_BASE_PATH_LONG, OPTION_BASE_PATH_SHORT, OPTION_BUILD_SYSTEM_LONG, OPTION_BUILD_SYSTEM_SHORT, OPTION_CLASS_PATH_LONG, OPTION_CLASS_PATH_SHORT, OPTION_DEBUG, OPTION_FORMAT_LONG, OPTION_FORMAT_SHORT, OPTION_HOSTNAME_LONG, OPTION_HOSTNAME_SHORT, OPTION_LANGUAGE_LONG, OPTION_LANGUAGE_SHORT, OPTION_OUTPUT_DIR_LONG, OPTION_OUTPUT_DIR_SHORT, OPTION_WAR_LONG, OPTION_WAR_SHORT
-
-
Constructor Summary
Constructors Constructor Description GetClientLibAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexecute()Executes the command with the given arguments.ObjectgetClientLib(URL[] classPath, String language, String outputDirPath, List<String> serviceClassNames, String buildSystem, String hostname, String basePath, boolean debug)Generates a Java client library for an API.StringgetUsageString()Returns a usage string for help output.-
Methods inherited from class com.google.api.server.spi.tools.EndpointsToolAction
apply, computeClassPath, getBasePath, getBuildSystem, getClassPath, getDebug, getExampleString, getFormat, getHelpLines, getHostname, getLanguage, getOpenApiOutputPath, getOptionOrDefault, getOutputPath, getServiceClassNames, getWarOutputPath, getWarPath, isHelpDisplayNeeded, makeBasePathOption, makeBuildSystemOption, makeClassPathOption, makeDebugOption, makeFormatOption, makeHostnameOption, makeLanguageOption, makeOpenApiOutputOption, makeOutputOption, makeWarOption, makeWarOutputOption, setExampleString, setHelpDisplayNeeded
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
public boolean execute() throws ClassNotFoundException, IOException, com.google.api.server.spi.config.ApiConfigExceptionDescription copied from class:EndpointsToolActionExecutes the command with the given arguments.- Specified by:
executein classEndpointsToolAction- Returns:
- whether or not all required arguments were provided
- Throws:
ClassNotFoundExceptionIOExceptioncom.google.api.server.spi.config.ApiConfigException
-
getClientLib
public Object getClientLib(URL[] classPath, String language, String outputDirPath, List<String> serviceClassNames, String buildSystem, String hostname, String basePath, boolean debug) throws ClassNotFoundException, IOException, com.google.api.server.spi.config.ApiConfigException
Generates a Java client library for an API. Combines the steps of generating API configuration, generating Discovery doc and generating client library into one.- Parameters:
classPath- Class path to load service classes and their dependencieslanguage- Language of the client library. Only "java" is supported right nowoutputDirPath- Directory to write output files intoserviceClassNames- Array of service class names of the APIbuildSystem- The build system to use for the client libraryhostname- The hostname to usebasePath- The base path to usedebug- Whether or not to output intermediate output files- Throws:
ClassNotFoundExceptionIOExceptioncom.google.api.server.spi.config.ApiConfigException
-
getUsageString
public String getUsageString()
Description copied from class:EndpointsToolActionReturns a usage string for help output.- Specified by:
getUsageStringin classEndpointsToolAction
-
-