Class DownloadParams
- java.lang.Object
-
- org.openstreetmap.josm.actions.downloadtasks.DownloadParams
-
public class DownloadParams extends java.lang.Object
Download parameters affecting the behaviour ofDownloadTask
s.- Since:
- 13927
-
-
Field Summary
Fields Modifier and Type Field Description private DownloadPolicy
downloadPolicy
private java.lang.String
layerName
private boolean
locked
private boolean
newLayer
private UploadPolicy
uploadPolicy
-
Constructor Summary
Constructors Constructor Description DownloadParams()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DownloadPolicy
getDownloadPolicy()
Returns the download policy of new layer.java.lang.String
getLayerName()
Returns the new layer name (if a new layer is to be created).UploadPolicy
getUploadPolicy()
Returns the upload policy of new layer.boolean
isLocked()
Determines if the new layer must be locked.boolean
isNewLayer()
Determines if the data is to be downloaded into a new layer.DownloadParams
withDownloadPolicy(DownloadPolicy downloadPolicy)
Sets the download policy of new layer.DownloadParams
withLayerName(java.lang.String layerName)
Sets the new layer name (if a new layer is to be created).DownloadParams
withLocked(boolean locked)
Sets whether the new layer must be locked.DownloadParams
withNewLayer(boolean newLayer)
Sets whether the data is to be downloaded into a new layer.DownloadParams
withUploadPolicy(UploadPolicy uploadPolicy)
Sets the upload policy of new layer.
-
-
-
Field Detail
-
newLayer
private boolean newLayer
-
layerName
private java.lang.String layerName
-
locked
private boolean locked
-
downloadPolicy
private DownloadPolicy downloadPolicy
-
uploadPolicy
private UploadPolicy uploadPolicy
-
-
Constructor Detail
-
DownloadParams
public DownloadParams()
-
-
Method Detail
-
isNewLayer
public final boolean isNewLayer()
Determines if the data is to be downloaded into a new layer.- Returns:
- true, if the data is to be downloaded into a new layer. If false, the task selects one of the existing layers as download layer, preferably the active layer.
- See Also:
getLayerName()
-
withNewLayer
public final DownloadParams withNewLayer(boolean newLayer)
Sets whether the data is to be downloaded into a new layer.- Parameters:
newLayer
- true, if the data is to be downloaded into a new layer. If false, the task selects one of the existing layers as download layer, preferably the active layer.- Returns:
- this
- See Also:
withLayerName(java.lang.String)
-
getLayerName
public final java.lang.String getLayerName()
Returns the new layer name (if a new layer is to be created).- Returns:
- the new layer name, or null
- See Also:
isNewLayer()
-
withLayerName
public final DownloadParams withLayerName(java.lang.String layerName)
Sets the new layer name (if a new layer is to be created).- Parameters:
layerName
- the new layer name, or null- Returns:
- this
- See Also:
withNewLayer(boolean)
-
isLocked
public final boolean isLocked()
Determines if the new layer must be locked.- Returns:
true
if the new layer must be locked
-
withLocked
public final DownloadParams withLocked(boolean locked)
Sets whether the new layer must be locked.- Parameters:
locked
-true
if the new layer must be locked- Returns:
- this
-
getDownloadPolicy
public final DownloadPolicy getDownloadPolicy()
Returns the download policy of new layer.- Returns:
- the download policy of new layer
-
withDownloadPolicy
public final DownloadParams withDownloadPolicy(DownloadPolicy downloadPolicy)
Sets the download policy of new layer.- Parameters:
downloadPolicy
- the download policy of new layer- Returns:
- this
-
getUploadPolicy
public final UploadPolicy getUploadPolicy()
Returns the upload policy of new layer.- Returns:
- the upload policy of new layer
-
withUploadPolicy
public final DownloadParams withUploadPolicy(UploadPolicy uploadPolicy)
Sets the upload policy of new layer.- Parameters:
uploadPolicy
- the upload policy of new layer- Returns:
- this
-
-