public class ChangesetsApi
extends java.lang.Object
| Constructor and Description |
|---|
ChangesetsApi(de.westnordost.osmapi.OsmConnection osm) |
| Modifier and Type | Method and Description |
|---|---|
ChangesetInfo |
comment(long id,
java.lang.String text)
Add a comment to the given changeset.
|
void |
find(de.westnordost.osmapi.common.Handler<ChangesetInfo> handler,
QueryChangesetsFilters filters)
Get a number of changesets that match the given filters.
|
ChangesetInfo |
get(long id)
Get the changeset information with the given id.
|
void |
getData(long id,
de.westnordost.osmapi.map.changes.MapDataChangesHandler handler)
Get map data changes associated with the given changeset, using the default OsmMapDataFactory
|
void |
getData(long id,
de.westnordost.osmapi.map.changes.MapDataChangesHandler handler,
de.westnordost.osmapi.map.MapDataFactory factory)
Get map data changes associated with the given changeset.
|
ChangesetInfo |
subscribe(long id)
Subscribe the user to a changeset discussion.
|
ChangesetInfo |
unsubscribe(long id)
Unsubscribe the user from a changeset discussion.
|
public ChangesetInfo get(long id)
id - changeset idpublic void find(de.westnordost.osmapi.common.Handler<ChangesetInfo> handler, QueryChangesetsFilters filters)
handler - The handler which is fed the incoming changeset infosfilters - what to search for. I.e.
new QueryChangesetsFilters().byUser(123).onlyClosed()de.westnordost.osmapi.common.errors.OsmAuthorizationException - if not logged inpublic ChangesetInfo comment(long id, java.lang.String text)
id - id of the changesettext - text to add to the changeset. Must not be emptyde.westnordost.osmapi.common.errors.OsmAuthorizationException - if this application is not authorized to modify the map
(Permission.MODIFY_MAP)de.westnordost.osmapi.common.errors.OsmConflictException - if the changeset is not yet closed. (Only closed changesets can
be commentedpublic ChangesetInfo subscribe(long id)
id - id of the changesetde.westnordost.osmapi.common.errors.OsmAuthorizationException - if this application is not authorized to modify the map
(Permission.MODIFY_MAP)de.westnordost.osmapi.common.errors.OsmNotFoundException - if the given changeset does not existpublic ChangesetInfo unsubscribe(long id)
id - id of the changesetde.westnordost.osmapi.common.errors.OsmAuthorizationException - if this application is not authorized to modify the map
(Permission.MODIFY_MAP)de.westnordost.osmapi.common.errors.OsmNotFoundException - if the given changeset does not existpublic void getData(long id,
de.westnordost.osmapi.map.changes.MapDataChangesHandler handler)
public void getData(long id,
de.westnordost.osmapi.map.changes.MapDataChangesHandler handler,
de.westnordost.osmapi.map.MapDataFactory factory)
id - id of the changeset to get the data forhandler - handler to feed the map data changes tofactory - factory that creates the elementsde.westnordost.osmapi.common.errors.OsmNotFoundException - if changeset with the given id does not exist