com.google.appengine.tools.info
Class UpdateCheck
- java.lang.Object
-
- com.google.appengine.tools.info.UpdateCheck
-
public class UpdateCheck extends java.lang.Object
UpdateCheck
is responsible for gathering version information about the local SDK, uploading this information to Google's servers in exchange for information about the latest version available, and making both sets of information available programmatically viaUpdateCheckResults
and for direct user consumption via a nag screen printed to a specifiedPrintStream
.
-
-
Constructor Summary
Constructors Constructor and Description UpdateCheck(java.lang.String server)
Create a newUpdateCheck
.UpdateCheck(java.lang.String server, java.io.File appDirectory, boolean secure)
Create a newUpdateCheck
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description boolean
allowedToCheckForUpdates()
Returns true if the user wants to check for updates even when we don't need to.UpdateCheckResults
checkForUpdates()
Deprecated.boolean
checkJavaVersion(java.io.PrintStream out)
boolean
maybePrintNagScreen(java.io.PrintStream out)
Check to see if there is a new version of the SDK available and, if sufficient time has passed since the last nag, print a nag screen toout
.
-
-
-
Constructor Detail
-
UpdateCheck
public UpdateCheck(java.lang.String server)
Create a newUpdateCheck
.- Parameters:
server
- The remote server to connect to when retrieving remote version information.
-
UpdateCheck
public UpdateCheck(java.lang.String server, java.io.File appDirectory, boolean secure)
Create a newUpdateCheck
.- Parameters:
server
- The remote server to connect to when retrieving remote version information.appDirectory
- The application directory that you plan to test or publish, ornull
if no application directory is available.secure
- iftrue
, use an https (instead of http) connection to the remote server.
-
-
Method Detail
-
allowedToCheckForUpdates
public boolean allowedToCheckForUpdates()
Returns true if the user wants to check for updates even when we don't need to. We assume that users will want this functionality, but they can opt out by creating an .appcfg_no_nag file in their home directory.
-
checkForUpdates
@Deprecated public UpdateCheckResults checkForUpdates()
Deprecated.Returns anUpdateCheckResults
for checking if a WAR directory or the local installation uses an out of date version of the SDK.Callers that do not already communicate with Google explicitly (e.g. the DevAppServer) should check
allowedToCheckForUpdates
before calling this method.
-
maybePrintNagScreen
public boolean maybePrintNagScreen(java.io.PrintStream out)
Check to see if there is a new version of the SDK available and, if sufficient time has passed since the last nag, print a nag screen toout
. This method always errs on the side of not nagging the user if errors are encountered.Callers that do not already communicate with Google explicitly (e.g. the DevAppServer) should check
allowedToCheckForUpdates
before calling this method.- Returns:
- true if a nag screen was printed, false otherwise
-
checkJavaVersion
public boolean checkJavaVersion(java.io.PrintStream out)
-
-