public class

GeodatabaseStatusInfo

extends Object
java.lang.Object
   ↳ com.esri.core.tasks.geodatabase.GeodatabaseStatusInfo

Class Overview

Class providing information on the status of a geodatabase task. An instance of this class is typically obtained via a GeodatabaseStatusCallback when running a geodatabase task. Obtain the latest status of the task by calling getStatus() on the instance.

See also:

Summary

Nested Classes
enum GeodatabaseStatusInfo.Status This enum is used to indicate the current status of the geodatabase task. 
Public Constructors
GeodatabaseStatusInfo(Exception e)
For internal use only
Public Methods
static GeodatabaseStatusInfo fromJson(JsonParser parser, String jobId)
Creates an instance of this class from the given JSON parser.
static GeodatabaseStatusInfo fromJson(JsonParser parser)
Creates an instance of this class from the given JSON parser.
long getDownloadSize()
During geodatabase download, this method will return the total number of bytes to be downloaded.
ServerError getError()
Gets the error if this instance indicates that the process has failed.
String getGeodatabaseId()
Gets the server assigned geodatabase ID.
String getGeodatabaseName()
Gets the geodatabase name.
String getJobId()
long getLastUpdatedTime()
Gets the last status updated time.
String getResultUrl()
Gets the result URL.
GeodatabaseStatusInfo.Status getStatus()
Gets the current status of the geodatabase creation process.
long getSubmissionTime()
Gets the geodatabase creation request submission time.
long getTotalBytesDownloaded()
During geodatabase download, this method will return the number of bytes downloaded so far.
String getUpdateUrl()
Gets the update URL.
boolean hasNoEdits()
This property will return true if there are no server side edits resulting from a geodatabase sync operation.
boolean isDownloading()
This method can be used to determine whether or not this GeodatabaseStatusInfo instance is indicating download progress or not.
void setUpdateUrl(String updateUrl)
Sets the update URL.
String toJson()
Return a JSON representation of this class.
void updateFromResult(UserCredentials credentials)
Update from result.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GeodatabaseStatusInfo (Exception e)

For internal use only

Parameters
e Exception

Public Methods

public static GeodatabaseStatusInfo fromJson (JsonParser parser, String jobId)

Creates an instance of this class from the given JSON parser.

Parameters
parser JsonParser: the JSON parser
jobId String: optional job ID, provide if it's known
Returns
GeodatabaseStatusInfo the GeodatabaseStatusInfo instance
Throws
Exception any exception on parsing the JSON

public static GeodatabaseStatusInfo fromJson (JsonParser parser)

Creates an instance of this class from the given JSON parser.

Parameters
parser JsonParser: the JSON parser
Returns
GeodatabaseStatusInfo the GeodatabaseStatusInfo instance
Throws
Exception any exception on parsing the JSON

public long getDownloadSize ()

During geodatabase download, this method will return the total number of bytes to be downloaded.

The returned value is only valid if isDownloading() returns true.

Returns
long number of bytes expected

public ServerError getError ()

Gets the error if this instance indicates that the process has failed.

Returns
ServerError the error

public String getGeodatabaseId ()

Gets the server assigned geodatabase ID.

Returns
String geodatabase ID

public String getGeodatabaseName ()

Gets the geodatabase name. If a name was not provided when the geodatabase was requested from the server, it will be assigned by the server.

Returns
String the geodatabase name

public String getJobId ()

Returns
String

public long getLastUpdatedTime ()

Gets the last status updated time.

Returns
long the last updated time

public String getResultUrl ()

Gets the result URL. Once the geodatabase creation process has completed successfully this will return the download URL for the geodatabase.

Returns
String the result URL

public GeodatabaseStatusInfo.Status getStatus ()

Gets the current status of the geodatabase creation process.

Returns
GeodatabaseStatusInfo.Status the status

public long getSubmissionTime ()

Gets the geodatabase creation request submission time.

Returns
long the submission time

public long getTotalBytesDownloaded ()

During geodatabase download, this method will return the number of bytes downloaded so far. Note that if a previous incomplete download is resumed, this number will start from the number of bytes previously downloaded.

The returned value is only valid if isDownloading() returns true.

Returns
long number of bytes downloaded

public String getUpdateUrl ()

Gets the update URL.

Returns
String the update URL

public boolean hasNoEdits ()

This property will return true if there are no server side edits resulting from a geodatabase sync operation.

Returns
boolean true if there were no server changes, false otherwise

public boolean isDownloading ()

This method can be used to determine whether or not this GeodatabaseStatusInfo instance is indicating download progress or not. If this returns true, the getTotalBytesDownloaded() and getDownloadSize() methods will indicate bytes downloaded so far and total bytes expected respectively.

Returns
boolean true if this instance is indicating download progress.

public void setUpdateUrl (String updateUrl)

Sets the update URL.

Parameters
updateUrl String: the new update URL

public String toJson ()

Return a JSON representation of this class. This method can be used to save the current class instance to disk. This is intended to be used in a workflow where an initial status is saved to disk so that it can be restored during a user written recovery process after a crash. It can also be used as a means of saving sufficient information to allow resumption of status update querying at a later time. To recover this instance, a JsonParser should be created from the saved string and passed to fromJson(JsonParser, String).

Returns
String the JSON representation of this instance
Throws
IOException Signals that an I/O exception has occurred.

public void updateFromResult (UserCredentials credentials)

Update from result.

Parameters
credentials UserCredentials: the credentials
Throws
Exception the exception