Package com.google.appengine.tools.admin
Interface GenericApplication
-
- All Known Implementing Classes:
Application
public interface GenericApplicationAn App Engine application (may be Java/Python).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceGenericApplication.ErrorHandlerInterface describing the application's error handlers.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcleanStagingDirectory()deletes the staging directory, if one was created.FilecreateStagingDirectory(ApplicationProcessingOptions opts)Creates a new staging directory, if needed, or returns the existing one if already created.FilecreateStagingDirectory(ApplicationProcessingOptions opts, File stagingDir)Creates (if necessary) and populates a user specified staging directoryvoidexportRepoInfoFile()Generates source context file in the staging directory.StringgetApiVersion()Returns the desired API version for the current application, or"none"if no API version was used.StringgetAppId()Returns the application identifierStringgetAppYaml()Returns the yaml string describing this application's configuration.com.google.apphosting.utils.config.BackendsXmlgetBackendsXml()Returns the BackendsXml describing the applications' backends.com.google.apphosting.utils.config.CronXmlgetCronXml()Returns the CronXml describing the applications' cron jobs.com.google.apphosting.utils.config.DispatchXmlgetDispatchXml()Returns the possibly emptyDispatchXmldescriptor for this application or null if none is configured.com.google.apphosting.utils.config.DosXmlgetDosXml()Returns the DosXml describing the applications' DoS entries.List<GenericApplication.ErrorHandler>getErrorHandlers()Returns the list of error handlers for this applicationcom.google.apphosting.utils.config.IndexesXmlgetIndexesXml()Returns the IndexesXml describing the applications' indexes.StringgetInstanceClass()Returns the application instance class name or null if not specified.StringgetMimeTypeIfStatic(String path)Returns the mime-type if path corresponds to static content,nullotherwise.StringgetModule()Returns the application module name or null if not specified.StringgetPath()Returns a path to an exploded WAR directory for the application.com.google.apphosting.utils.config.QueueXmlgetQueueXml()Returns the QueueXml describing the applications' task queues.StringgetRuntime()Returns the runtime this application uses.FilegetStagingDir()Returns the staging directory, ornullif none has been created.StringgetVersion()Returns the application versionbooleanisPrecompilationEnabled()Returns whether precompilation is enabled for this applicationvoidresetProgress()voidsetDetailsWriter(PrintWriter detailsWriter)voidsetListener(UpdateListener l)voidstatusUpdate(String message)voidstatusUpdate(String message, int amount)
-
-
-
Method Detail
-
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
String getMimeTypeIfStatic(String path)
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
File createStagingDirectory(ApplicationProcessingOptions opts) throws IOException
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
File createStagingDirectory(ApplicationProcessingOptions opts, File stagingDir) throws IOException
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
void setListener(UpdateListener l)
-
setDetailsWriter
void setDetailsWriter(PrintWriter detailsWriter)
-
statusUpdate
void statusUpdate(String message, int amount)
-
statusUpdate
void statusUpdate(String message)
-
getAppYaml
String getAppYaml()
Returns the yaml string describing this application's configuration.- Returns:
- application configuration yaml string
-
-