public class ChangesetQueryTask extends PleaseWaitRunnable implements ChangesetDownloadTask
Modifier and Type | Field and Description |
---|---|
private boolean |
canceled
true if the task was canceled
|
private OsmServerChangesetReader |
changesetReader
the reader object used to submit the changeset query to the API
|
private Set<Changeset> |
downloadedChangesets
the set of downloaded changesets
|
private Exception |
lastException
the last exception remembered, if any
|
private ChangesetQuery |
query
the changeset query
|
private OsmServerUserInfoReader |
userInfoReader
the reader object used to read information about the current user from the API
|
progressMonitor
Constructor and Description |
---|
ChangesetQueryTask(ChangesetQuery query)
Creates the task.
|
ChangesetQueryTask(Component parent,
ChangesetQuery query)
Creates the task.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cancel()
User pressed cancel button.
|
protected void |
finish()
Finish up the data work.
|
protected void |
fullyIdentifyCurrentUser()
Tries to fully identify the current JOSM user
|
Set<Changeset> |
getDownloadedChangesets() |
boolean |
isCanceled() |
boolean |
isFailed() |
protected void |
realRun()
Called in the worker thread to do the actual work.
|
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
private ChangesetQuery query
private boolean canceled
private Set<Changeset> downloadedChangesets
private Exception lastException
private OsmServerUserInfoReader userInfoReader
private OsmServerChangesetReader changesetReader
public ChangesetQueryTask(ChangesetQuery query)
query
- the query to submit to the OSM server. Must not be null.IllegalArgumentException
- if query is null.public ChangesetQueryTask(Component parent, ChangesetQuery query)
parent
- the parent component relative to which the PleaseWaitDialog
is displayed.
Must not be null.query
- the query to submit to the OSM server. Must not be null.IllegalArgumentException
- if query is null.IllegalArgumentException
- if parent is nullprotected void cancel()
PleaseWaitRunnable
cancel
in class PleaseWaitRunnable
protected void finish()
PleaseWaitRunnable
finish
in class PleaseWaitRunnable
protected void fullyIdentifyCurrentUser() throws OsmTransferException
OsmTransferException
- if something went wrongprotected void realRun() throws SAXException, IOException, OsmTransferException
PleaseWaitRunnable
realRun
in class PleaseWaitRunnable
SAXException
- if a SAX error occursIOException
- if an I/O error occursOsmTransferException
- if a communication error with the OSM server occurspublic Set<Changeset> getDownloadedChangesets()
getDownloadedChangesets
in interface ChangesetDownloadTask
public boolean isCanceled()
isCanceled
in interface ChangesetDownloadTask
public boolean isFailed()
isFailed
in interface ChangesetDownloadTask