Package org.maproulette.client.batch
Class ProjectBatch
- java.lang.Object
-
- org.maproulette.client.batch.ProjectBatch
-
public class ProjectBatch extends java.lang.ObjectA class wrapping all theChallengeBatchs for a specific project. There can be multiple challenges per project.
-
-
Constructor Summary
Constructors Constructor Description ProjectBatch(long projectId, MapRouletteConfiguration configuration)ProjectBatch(Project project, MapRouletteConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longaddTask(Challenge challenge, Task task)Adds a task to a batch.voidflush()Flushes all the challenges to MapRoulettevoidflush(long challengeId)Flush a specific challenge found in the project to MapRoulette
-
-
-
Constructor Detail
-
ProjectBatch
public ProjectBatch(long projectId, MapRouletteConfiguration configuration)
-
ProjectBatch
public ProjectBatch(Project project, MapRouletteConfiguration configuration)
-
-
Method Detail
-
addTask
public long addTask(Challenge challenge, Task task) throws MapRouletteException
Adds a task to a batch.- Parameters:
challenge- The parent challenge of the task, if the challenge identifier is -1 it will attempt to create the Challenge. If the parent id of the challenge is -1 it will set the parent id to the default project identifier.task- The task to push to the MapRoulette server- Returns:
- The identifier of the challenge that the task was added too. The user may already have this information, however if they expect the challenge to be created automatically.
- Throws:
MapRouletteException- Any exceptions thrown while pushing the task data to MapRoulette
-
flush
public void flush(long challengeId) throws MapRouletteExceptionFlush a specific challenge found in the project to MapRoulette- Parameters:
challengeId- The identifier of the challenge to flush- Throws:
MapRouletteException- Any exceptions thrown while pushing the task data to MapRoulette
-
flush
public void flush() throws MapRouletteExceptionFlushes all the challenges to MapRoulette- Throws:
MapRouletteException- Any exceptions thrown while pushing the task data to MapRoulette
-
-