public interface TaskLoader
| Modifier and Type | Method and Description |
|---|---|
long |
createChallenge(Project project,
Challenge challenge)
Creates a new challenge with the given
Challenge, if already exists then will attempt
to update |
long |
createProject(Project project)
Creates a new project with the
Project, if already exists then will attempt to update |
java.lang.String |
getConnectionInfo()
Retrieve the connection info for this connection
|
boolean |
uploadBatchTasks(long challengeId,
java.util.Set<Task> tasks)
Uploads tasks as a batch, instead of one at a time
|
boolean |
uploadTask(long challengeId,
Task task)
Uploads a task to MapRoulette
|
java.lang.String getConnectionInfo()
boolean uploadBatchTasks(long challengeId,
java.util.Set<Task> tasks)
throws java.io.UnsupportedEncodingException,
java.net.URISyntaxException
challengeId - The id of the parent challengetasks - The list of tasks that should be uploaded for the challengejava.io.UnsupportedEncodingException - Exception could be thrown when you try and upload the batch.java.net.URISyntaxException - if the URI cannot be built correctlyboolean uploadTask(long challengeId,
Task task)
throws java.io.UnsupportedEncodingException,
java.net.URISyntaxException
challengeId - The id of the parent challengetask - The JSON payload used to upload the taskjava.io.UnsupportedEncodingException - If the JSON is invalid, which it never should bejava.net.URISyntaxException - if the URI cannot be built correctlylong createProject(Project project) throws java.io.UnsupportedEncodingException, java.net.URISyntaxException
Project, if already exists then will attempt to updateproject - The project object containing name and descriptionjava.io.UnsupportedEncodingException - if json data for API payload cannot be encoded correctlyjava.net.URISyntaxException - if the URI for getting/creating/updating project is incorrectly generatedlong createChallenge(Project project, Challenge challenge) throws java.io.UnsupportedEncodingException, java.net.URISyntaxException
Challenge, if already exists then will attempt
to updateproject - The parent project object of the challengechallenge - The challenge to create or updatejava.io.UnsupportedEncodingException - if json data for API payload cannot be encoded correctlyjava.net.URISyntaxException - if the URI for getting/creating/updating project is incorrectly generated