Package com.google.appengine.tools.admin
Interface GenericApplication
- All Known Implementing Classes:
Application
public interface GenericApplication
An App Engine application (may be Java/Python).
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface describing the application's error handlers. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeletes the staging directory, if one was created.Creates a new staging directory, if needed, or returns the existing one if already created.createStagingDirectory(ApplicationProcessingOptions opts, File stagingDir) Creates (if necessary) and populates a user specified staging directoryvoidGenerates source context file in the staging directory.Returns the desired API version for the current application, or"none"if no API version was used.getAppId()Returns the application identifierReturns the yaml string describing this application's configuration.com.google.apphosting.utils.config.BackendsXmlReturns the BackendsXml describing the applications' backends.com.google.apphosting.utils.config.CronXmlReturns the CronXml describing the applications' cron jobs.com.google.apphosting.utils.config.DispatchXmlReturns the possibly emptyDispatchXmldescriptor for this application or null if none is configured.com.google.apphosting.utils.config.DosXmlReturns the DosXml describing the applications' DoS entries.Returns the list of error handlers for this applicationcom.google.apphosting.utils.config.IndexesXmlReturns the IndexesXml describing the applications' indexes.Returns the application instance class name or null if not specified.getMimeTypeIfStatic(String path) Returns the mime-type if path corresponds to static content,nullotherwise.Returns the application module name or null if not specified.getPath()Returns a path to an exploded WAR directory for the application.com.google.apphosting.utils.config.QueueXmlReturns the QueueXml describing the applications' task queues.Returns the runtime this application uses.Returns the staging directory, ornullif none has been created.Returns the application versionbooleanReturns whether precompilation is enabled for this applicationvoidvoidsetDetailsWriter(PrintWriter detailsWriter) voidvoidstatusUpdate(String message) voidstatusUpdate(String message, int amount)
-
Method Details
-
getAppId
String getAppId()Returns the application identifier- Returns:
- application identifier
-
getVersion
String getVersion()Returns the application version- Returns:
- application version
-
getRuntime
String getRuntime()Returns the runtime this application uses. -
getModule
String getModule()Returns the application module name or null if not specified. -
getInstanceClass
String getInstanceClass()Returns the application instance class name or null if not specified. -
isPrecompilationEnabled
boolean isPrecompilationEnabled()Returns whether precompilation is enabled for this application- Returns:
- precompilation setting
-
getErrorHandlers
List<GenericApplication.ErrorHandler> getErrorHandlers()Returns the list of error handlers for this application- Returns:
- error handlers
-
getMimeTypeIfStatic
Returns the mime-type if path corresponds to static content,nullotherwise.- Returns:
- mime-type, possibly
null
-
getCronXml
com.google.apphosting.utils.config.CronXml getCronXml()Returns the CronXml describing the applications' cron jobs.- Returns:
- a cron descriptor, possibly empty or
null
-
getQueueXml
com.google.apphosting.utils.config.QueueXml getQueueXml()Returns the QueueXml describing the applications' task queues.- Returns:
- a queue descriptor, possibly empty or
null
-
getDispatchXml
com.google.apphosting.utils.config.DispatchXml getDispatchXml()Returns the possibly emptyDispatchXmldescriptor for this application or null if none is configured. -
getDosXml
com.google.apphosting.utils.config.DosXml getDosXml()Returns the DosXml describing the applications' DoS entries.- Returns:
- a dos descriptor, possibly empty or
null
-
getIndexesXml
com.google.apphosting.utils.config.IndexesXml getIndexesXml()Returns the IndexesXml describing the applications' indexes.- Returns:
- an indexes descriptor, possibly empty or
null
-
getBackendsXml
com.google.apphosting.utils.config.BackendsXml getBackendsXml()Returns the BackendsXml describing the applications' backends.- Returns:
- a backends descriptor, possibly empty or
null
-
getApiVersion
String getApiVersion()Returns the desired API version for the current application, or"none"if no API version was used.- Throws:
IllegalStateException- if createStagingDirectory has not been called.
-
getPath
String getPath()Returns a path to an exploded WAR directory for the application. This may be a temporary directory.- Returns:
- a not
nullpath pointing to a directory
-
getStagingDir
File getStagingDir()Returns the staging directory, ornullif none has been created. -
resetProgress
void resetProgress() -
createStagingDirectory
Creates a new staging directory, if needed, or returns the existing one if already created.- Parameters:
opts- User-specified options for processing the application.- Returns:
- staging directory
- Throws:
IOException
-
createStagingDirectory
Creates (if necessary) and populates a user specified staging directory- Parameters:
opts- User-specified options for processing the application.stagingDir- User-specified staging directory (must be empty or not exist)- Returns:
- staging directory
- Throws:
IOException- if an error occurs trying to create or populate the staging directory
-
exportRepoInfoFile
void exportRepoInfoFile()Generates source context file in the staging directory.Does nothing if the source directory is not in a Git repo or if the source context file already exists. If the operation fails, this function logs and continues. The deployment is never blocked if we can't generate the source context file.
-
cleanStagingDirectory
void cleanStagingDirectory()deletes the staging directory, if one was created. -
setListener
-
setDetailsWriter
-
statusUpdate
-
statusUpdate
-
getAppYaml
String getAppYaml()Returns the yaml string describing this application's configuration.- Returns:
- application configuration yaml string
-