Package org.openstreetmap.josm.gui.layer
Interface UploadToServer
-
- All Known Implementing Classes:
AbstractModifiableLayer
,AbstractOsmDataLayer
,AdvancedPreference.UnclearableOsmDataLayer
,CorrelationSupportLayer
,GeoImageLayer
,GpxLayer
,GpxRouteLayer
,NoteLayer
,OsmDataLayer
,WikimediaCommonsLayer
public interface UploadToServer
Interface for layers that can upload data.- Since:
- 9751
- See Also:
DownloadFromServer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AbstractIOTask
createUploadTask(ProgressMonitor monitor)
Creates a newAbstractIOTask
for uploading data.AbstractUploadDialog
getUploadDialog()
Returns the upload dialog for this layer.boolean
isUploadable()
Determines if the layer is able to upload data and implements theUploadToServer
interface.boolean
isUploadDiscouraged()
Determines if upload of data managed by this layer is discouraged.boolean
isUploadInProgress()
Determines if upload of data managed by this layer is currently in progress.void
onPostUploadToServer()
Initializes the layer after a successful upload to the server.boolean
requiresUploadToServer()
Determines if the data managed by this layer needs to be uploaded to the server because it contains modified data.
-
-
-
Method Detail
-
isUploadable
boolean isUploadable()
Determines if the layer is able to upload data and implements theUploadToServer
interface. A layer that implements theUploadToServer
interface must returntrue
.- Returns:
true
if the layer is able to upload data;false
, otherwise
-
requiresUploadToServer
boolean requiresUploadToServer()
Determines if the data managed by this layer needs to be uploaded to the server because it contains modified data.- Returns:
true
if the data managed by this layer needs to be uploaded to the server because it contains modified data;false
, otherwise
-
isUploadDiscouraged
boolean isUploadDiscouraged()
Determines if upload of data managed by this layer is discouraged. This feature allows to use "private" data layers.- Returns:
true
if upload is discouraged for this layer;false
, otherwise
-
isUploadInProgress
boolean isUploadInProgress()
Determines if upload of data managed by this layer is currently in progress.- Returns:
true
if upload is in progress- Since:
- 13434
-
onPostUploadToServer
void onPostUploadToServer()
Initializes the layer after a successful upload to the server.
-
createUploadTask
AbstractIOTask createUploadTask(ProgressMonitor monitor)
Creates a newAbstractIOTask
for uploading data.- Parameters:
monitor
- The progress monitor- Returns:
- a new
AbstractIOTask
for uploading data, ornull
if not applicable
-
getUploadDialog
AbstractUploadDialog getUploadDialog()
Returns the upload dialog for this layer.- Returns:
- the upload dialog for this layer, or
null
if not applicable
-
-