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:
-
Method Summary
Modifier and TypeMethodDescriptioncreateUploadTask(ProgressMonitor monitor) Creates a newAbstractIOTaskfor uploading data.Returns the upload dialog for this layer.booleanDetermines if the layer is able to upload data and implements theUploadToServerinterface.booleanDetermines if upload of data managed by this layer is discouraged.booleanDetermines if upload of data managed by this layer is currently in progress.voidInitializes the layer after a successful upload to the server.booleanDetermines if the data managed by this layer needs to be uploaded to the server because it contains modified data.
-
Method Details
-
isUploadable
boolean isUploadable()Determines if the layer is able to upload data and implements theUploadToServerinterface. A layer that implements theUploadToServerinterface must returntrue.- Returns:
trueif 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:
trueif 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:
trueif 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:
trueif upload is in progress- Since:
- 13434
-
onPostUploadToServer
void onPostUploadToServer()Initializes the layer after a successful upload to the server. -
createUploadTask
Creates a newAbstractIOTaskfor uploading data.- Parameters:
monitor- The progress monitor- Returns:
- a new
AbstractIOTaskfor uploading data, ornullif not applicable
-
getUploadDialog
Returns the upload dialog for this layer.- Returns:
- the upload dialog for this layer, or
nullif not applicable
-