org.openstreetmap.josm.gui.io
Class UploadStrategySpecification

java.lang.Object
  extended by org.openstreetmap.josm.gui.io.UploadStrategySpecification

public class UploadStrategySpecification
extends java.lang.Object

An UploadStrategySpecification consists of the parameter describing the strategy for uploading a collection of OsmPrimitive. This includes:


Field Summary
private  int chunkSize
           
private  boolean closeChangesetAfterUpload
           
private  MaxChangesetSizeExceededPolicy policy
           
private  UploadStrategy strategy
           
static int UNSPECIFIED_CHUNK_SIZE
          indicates that the chunk size isn't specified
 
Constructor Summary
UploadStrategySpecification()
          Creates a new upload strategy with default values.
UploadStrategySpecification(UploadStrategySpecification other)
          Clones another upload strategy.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getChunkSize()
           
 int getNumRequests(int numObjects)
           
 MaxChangesetSizeExceededPolicy getPolicy()
           
 UploadStrategy getStrategy()
          Replies the upload strategy
static int getUnspecifiedChunkSize()
           
 int hashCode()
           
 boolean isCloseChangesetAfterUpload()
           
 UploadStrategySpecification setChunkSize(int chunkSize)
           
 UploadStrategySpecification setCloseChangesetAfterUpload(boolean closeChangesetAfterUpload)
           
 UploadStrategySpecification setPolicy(MaxChangesetSizeExceededPolicy policy)
           
 UploadStrategySpecification setStrategy(UploadStrategy strategy)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNSPECIFIED_CHUNK_SIZE

public static final int UNSPECIFIED_CHUNK_SIZE
indicates that the chunk size isn't specified

See Also:
Constant Field Values

strategy

private UploadStrategy strategy

chunkSize

private int chunkSize

policy

private MaxChangesetSizeExceededPolicy policy

closeChangesetAfterUpload

private boolean closeChangesetAfterUpload
Constructor Detail

UploadStrategySpecification

public UploadStrategySpecification()
Creates a new upload strategy with default values.


UploadStrategySpecification

public UploadStrategySpecification(UploadStrategySpecification other)
Clones another upload strategy. If other is null,assumes default values.

Parameters:
other - the other upload strategy
Method Detail

getStrategy

public UploadStrategy getStrategy()
Replies the upload strategy

Returns:

getChunkSize

public int getChunkSize()

getUnspecifiedChunkSize

public static int getUnspecifiedChunkSize()

getPolicy

public MaxChangesetSizeExceededPolicy getPolicy()

setStrategy

public UploadStrategySpecification setStrategy(UploadStrategy strategy)

setChunkSize

public UploadStrategySpecification setChunkSize(int chunkSize)

setPolicy

public UploadStrategySpecification setPolicy(MaxChangesetSizeExceededPolicy policy)

setCloseChangesetAfterUpload

public UploadStrategySpecification setCloseChangesetAfterUpload(boolean closeChangesetAfterUpload)

isCloseChangesetAfterUpload

public boolean isCloseChangesetAfterUpload()

getNumRequests

public int getNumRequests(int numObjects)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


JOSM