Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.tools.admin
Class Application

    java.lang.Object
      com.google.appengine.tools.admin.Application

    public class Application

extends java.lang.Object

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
`static interface` | `Application.ErrorHandler`

Method Summary
`void` | `cleanStagingDirectory()` deletes the staging directory, if one was created.
`java.io.File` | `createStagingDirectory(com.google.appengine.tools.admin.AppAdminFactory.ApplicationProcessingOptions opts)` 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()`
`CronXml` | `getCronXml()` Returns the CronXml describing the applications' cron jobs.
`DosXml` | `getDosXml()` Returns the DosXml describing the applications' DoS entries.
`java.util.List<Application.ErrorHandler>` | `getErrorHandlers()`
`IndexesXml` | `getIndexesXml()` Returns the CronXml describing the applications' cron jobs.
`java.lang.String` | `getMimeTypeIfStatic(java.lang.String path)`
`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.
`boolean` | `isPrecompilationEnabled()`
`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

### readApplication

    public static Application readApplication(java.lang.String path)
                                       throws java.io.IOException

  Reads the App Engine application from `path`. The path may either be a WAR file or the root of an exploded WAR directory.

  Parameters:
    `path` - a not `null` path.
  Throws:
    `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.

### readApplication

    public static Application readApplication(java.lang.String path,
                                              java.lang.String appId,
                                              java.lang.String appVersion)
                                       throws java.io.IOException

  Reads the App Engine application from `path`. The path may either be a WAR file or the root of an exploded WAR directory.

  Parameters:
    `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.
  Throws:
    `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.

### getAppId

    public java.lang.String getAppId()

  Returns the application identifier, from the AppEngineWebXml config

  Returns:
    application identifier

### getVersion

    public java.lang.String getVersion()

  Returns the application version, from the AppEngineWebXml config

  Returns:
    application version

### isPrecompilationEnabled

    public boolean isPrecompilationEnabled()

### getErrorHandlers

    public java.util.List<Application.ErrorHandler> getErrorHandlers()

### getMimeTypeIfStatic

    public java.lang.String getMimeTypeIfStatic(java.lang.String path)

### getAppEngineWebXml

    public AppEngineWebXml getAppEngineWebXml()

  Returns the AppEngineWebXml describing the application.

  Returns:
    a not `null` deployment descriptor

### getCronXml

    public CronXml getCronXml()

  Returns the CronXml describing the applications' cron jobs.

  Returns:
    a cron descriptor, possibly empty or `null`

### getQueueXml

    public QueueXml getQueueXml()

  Returns the QueueXml describing the applications' task queues.

  Returns:
    a queue descriptor, possibly empty or `null`

### getDosXml

    public DosXml getDosXml()

  Returns the DosXml describing the applications' DoS entries.

  Returns:
    a dos descriptor, possibly empty or `null`

### getIndexesXml

    public IndexesXml getIndexesXml()

  Returns the CronXml describing the applications' cron jobs.

  Returns:
    a cron descriptor, possibly empty or `null`

### getWebXml

    public WebXml getWebXml()

  Returns the WebXml describing the applications' servlets and generic web application information.

  Returns:
    a WebXml descriptor, possibly empty but not `null`

### getBackendsXml

    public BackendsXml getBackendsXml()

### getApiVersion

    public java.lang.String getApiVersion()

  Returns the desired API version for the current application, or `"none"` if no API version was used.

  Throws:
    `java.lang.IllegalStateException` - if createStagingDirectory has not been called.

### getPath

    public java.lang.String getPath()

  Returns a path to an exploded WAR directory for the application. This may be a temporary directory.

  Returns:
    a not `null` path pointing to a directory

### getStagingDir

    public java.io.File getStagingDir()

  Returns the staging directory, or `null` if none has been created.

### resetProgress

    public void resetProgress()

### createStagingDirectory

    public java.io.File createStagingDirectory(com.google.appengine.tools.admin.AppAdminFactory.ApplicationProcessingOptions opts)
                                        throws java.io.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:
    `java.io.IOException`

### cleanStagingDirectory

    public void cleanStagingDirectory()

  deletes the staging directory, if one was created.

### recursiveDelete

    public static void recursiveDelete(java.io.File dead)

  Recursive directory deletion.

### setListener

    public void setListener(UpdateListener l)

### setDetailsWriter

    public void setDetailsWriter(java.io.PrintWriter detailsWriter)

### statusUpdate

    public void statusUpdate(java.lang.String message,
                             int amount)

### statusUpdate

    public void statusUpdate(java.lang.String message)

### getAppYaml

    public java.lang.String getAppYaml()

  Returns the app.yaml string.

  Throws:
    `java.lang.IllegalStateException` - if createStagingDirectory has not been called.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD