|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.appengine.tools.admin.Application
public class Application
An App Engine application. You can read
an
Application
from a path, and
create
an AppAdmin
to upload, create
indexes, or otherwise manage it.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.google.appengine.tools.admin.GenericApplication |
---|
com.google.appengine.tools.admin.GenericApplication.ErrorHandler |
Method Summary | |
---|---|
void |
cleanStagingDirectory()
deletes the staging directory, if one was created. |
java.io.File |
createStagingDirectory(AppAdminFactory.ApplicationProcessingOptions opts,
com.google.appengine.tools.admin.ResourceLimits resourceLimits)
Creates a new staging directory, if needed, or returns the existing one if already created. |
java.lang.String |
getApiVersion()
Returns the desired API version for the current application, or "none" if no API version was used. |
AppEngineWebXml |
getAppEngineWebXml()
Returns the AppEngineWebXml describing the application. |
java.lang.String |
getAppId()
Returns the application identifier, from the AppEngineWebXml config |
java.lang.String |
getAppYaml()
Returns the app.yaml string. |
BackendsXml |
getBackendsXml()
Returns the BackendsXml describing the applications' backends. |
CronXml |
getCronXml()
Returns the CronXml describing the applications' cron jobs. |
DosXml |
getDosXml()
Returns the DosXml describing the applications' DoS entries. |
java.util.List<com.google.appengine.tools.admin.GenericApplication.ErrorHandler> |
getErrorHandlers()
Returns the list of error handlers for this application |
IndexesXml |
getIndexesXml()
Returns the CronXml describing the applications' cron jobs. |
java.lang.String |
getMimeTypeIfStatic(java.lang.String path)
Returns the mime-type if path corresponds to static content, null otherwise. |
java.lang.String |
getPath()
Returns a path to an exploded WAR directory for the application. |
QueueXml |
getQueueXml()
Returns the QueueXml describing the applications' task queues. |
java.io.File |
getStagingDir()
Returns the staging directory, or null if none has been created. |
java.lang.String |
getVersion()
Returns the application version, from the AppEngineWebXml config |
WebXml |
getWebXml()
Returns the WebXml describing the applications' servlets and generic web application information. |
static java.lang.String |
guessContentTypeFromName(java.lang.String fileName)
|
boolean |
isPrecompilationEnabled()
Returns whether precompilation is enabled for this application |
static Application |
readApplication(java.lang.String path)
Reads the App Engine application from path . |
static Application |
readApplication(java.lang.String path,
java.lang.String appId,
java.lang.String appVersion)
Reads the App Engine application from path . |
static void |
recursiveDelete(java.io.File dead)
Recursive directory deletion. |
void |
resetProgress()
|
void |
setDetailsWriter(java.io.PrintWriter detailsWriter)
|
void |
setListener(UpdateListener l)
|
void |
statusUpdate(java.lang.String message)
|
void |
statusUpdate(java.lang.String message,
int amount)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Application readApplication(java.lang.String path) throws java.io.IOException
path
. The path may either
be a WAR file or the root of an exploded WAR directory.
path
- a not null
path.
java.io.IOException
- if an error occurs while trying to read the
Application
.
com.google.apphosting.utils.config.AppEngineConfigException
- if the
Application's
appengine-web.xml file is malformed.public static Application readApplication(java.lang.String path, java.lang.String appId, java.lang.String appVersion) throws java.io.IOException
path
. The path may either
be a WAR file or the root of an exploded WAR directory.
path
- a not null
path.appId
- if non-null, use this as an application id override.appVersion
- if non-null, use this as an application version override.
java.io.IOException
- if an error occurs while trying to read the
Application
.
com.google.apphosting.utils.config.AppEngineConfigException
- if the
Application's
appengine-web.xml file is malformed.public java.lang.String getAppId()
getAppId
in interface com.google.appengine.tools.admin.GenericApplication
public java.lang.String getVersion()
getVersion
in interface com.google.appengine.tools.admin.GenericApplication
public boolean isPrecompilationEnabled()
com.google.appengine.tools.admin.GenericApplication
isPrecompilationEnabled
in interface com.google.appengine.tools.admin.GenericApplication
public java.util.List<com.google.appengine.tools.admin.GenericApplication.ErrorHandler> getErrorHandlers()
com.google.appengine.tools.admin.GenericApplication
getErrorHandlers
in interface com.google.appengine.tools.admin.GenericApplication
public java.lang.String getMimeTypeIfStatic(java.lang.String path)
com.google.appengine.tools.admin.GenericApplication
null
otherwise.
getMimeTypeIfStatic
in interface com.google.appengine.tools.admin.GenericApplication
null
public static java.lang.String guessContentTypeFromName(java.lang.String fileName)
fileName
- path of a file with extension
public AppEngineWebXml getAppEngineWebXml()
null
deployment descriptorpublic CronXml getCronXml()
getCronXml
in interface com.google.appengine.tools.admin.GenericApplication
null
public QueueXml getQueueXml()
getQueueXml
in interface com.google.appengine.tools.admin.GenericApplication
null
public DosXml getDosXml()
getDosXml
in interface com.google.appengine.tools.admin.GenericApplication
null
public IndexesXml getIndexesXml()
getIndexesXml
in interface com.google.appengine.tools.admin.GenericApplication
null
public WebXml getWebXml()
null
public BackendsXml getBackendsXml()
com.google.appengine.tools.admin.GenericApplication
getBackendsXml
in interface com.google.appengine.tools.admin.GenericApplication
null
public java.lang.String getApiVersion()
"none"
if no API version was used.
getApiVersion
in interface com.google.appengine.tools.admin.GenericApplication
java.lang.IllegalStateException
- if createStagingDirectory has not been called.public java.lang.String getPath()
getPath
in interface com.google.appengine.tools.admin.GenericApplication
null
path pointing to a directorypublic java.io.File getStagingDir()
null
if none has been created.
getStagingDir
in interface com.google.appengine.tools.admin.GenericApplication
public void resetProgress()
resetProgress
in interface com.google.appengine.tools.admin.GenericApplication
public java.io.File createStagingDirectory(AppAdminFactory.ApplicationProcessingOptions opts, com.google.appengine.tools.admin.ResourceLimits resourceLimits) throws java.io.IOException
createStagingDirectory
in interface com.google.appengine.tools.admin.GenericApplication
opts
- User-specified options for processing the application.resourceLimits
- Various resource limits provided by the cloud.
java.io.IOException
public void cleanStagingDirectory()
cleanStagingDirectory
in interface com.google.appengine.tools.admin.GenericApplication
public static void recursiveDelete(java.io.File dead)
public void setListener(UpdateListener l)
setListener
in interface com.google.appengine.tools.admin.GenericApplication
public void setDetailsWriter(java.io.PrintWriter detailsWriter)
setDetailsWriter
in interface com.google.appengine.tools.admin.GenericApplication
public void statusUpdate(java.lang.String message, int amount)
statusUpdate
in interface com.google.appengine.tools.admin.GenericApplication
public void statusUpdate(java.lang.String message)
statusUpdate
in interface com.google.appengine.tools.admin.GenericApplication
public java.lang.String getAppYaml()
getAppYaml
in interface com.google.appengine.tools.admin.GenericApplication
java.lang.IllegalStateException
- if createStagingDirectory has not been called.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |