Class DownloadParams
- java.lang.Object
-
- org.openstreetmap.josm.actions.downloadtasks.DownloadParams
-
public class DownloadParams extends java.lang.Object
Download parameters affecting the behaviour ofDownloadTasks.- Since:
- 13927
-
-
Field Summary
Fields Modifier and Type Field Description private DownloadPolicydownloadPolicyprivate java.lang.StringlayerNameprivate booleanlockedprivate booleannewLayerprivate UploadPolicyuploadPolicy
-
Constructor Summary
Constructors Constructor Description DownloadParams()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DownloadPolicygetDownloadPolicy()Returns the download policy of new layer.java.lang.StringgetLayerName()Returns the new layer name (if a new layer is to be created).UploadPolicygetUploadPolicy()Returns the upload policy of new layer.booleanisLocked()Determines if the new layer must be locked.booleanisNewLayer()Determines if the data is to be downloaded into a new layer.DownloadParamswithDownloadPolicy(DownloadPolicy downloadPolicy)Sets the download policy of new layer.DownloadParamswithLayerName(java.lang.String layerName)Sets the new layer name (if a new layer is to be created).DownloadParamswithLocked(boolean locked)Sets whether the new layer must be locked.DownloadParamswithNewLayer(boolean newLayer)Sets whether the data is to be downloaded into a new layer.DownloadParamswithUploadPolicy(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:
trueif the new layer must be locked
-
withLocked
public final DownloadParams withLocked(boolean locked)
Sets whether the new layer must be locked.- Parameters:
locked-trueif 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
-
-