Package com.google.api.server.spi.tools
Class AppEngineUtil
- java.lang.Object
-
- com.google.api.server.spi.tools.AppEngineUtil
-
public class AppEngineUtil extends Object
App Engine related utilities.
-
-
Constructor Summary
Constructors Constructor Description AppEngineUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetApplicationDefaultHostname(String appDir)Given the directory of an App Engine Application, returns its default hostname by checking app.yaml or appengine-web.xml.static StringgetApplicationId(String appDir)Given the directory of an App Engine application, returns its application id by checking WEB-INF/app.yaml first and then WEB-INF/appengine-web.xml.static StringgetApplicationVersion(String appDir)Given the directory of an App Engine application, returns its version by checking war/WEB-INF/app.yaml first and then war/WEB-INF/appengine-web.xml.static StringgetDefaultHostnameFromAppId(String appId)Returns the default hostname for an app id.
-
-
-
Method Detail
-
getApplicationId
public static String getApplicationId(String appDir)
Given the directory of an App Engine application, returns its application id by checking WEB-INF/app.yaml first and then WEB-INF/appengine-web.xml.
-
getApplicationVersion
public static String getApplicationVersion(String appDir)
Given the directory of an App Engine application, returns its version by checking war/WEB-INF/app.yaml first and then war/WEB-INF/appengine-web.xml.
-
getApplicationDefaultHostname
public static String getApplicationDefaultHostname(String appDir)
Given the directory of an App Engine Application, returns its default hostname by checking app.yaml or appengine-web.xml.- Returns:
- the default hostname if the app id is set, otherwise null
-
getDefaultHostnameFromAppId
public static String getDefaultHostnameFromAppId(String appId)
Returns the default hostname for an app id. Only supports appspot.com and googleplex.com.- Throws:
IllegalArgumentException- if a domain app that's not google.com or appId is null.
-
-