public class ChangesetsDao
extends java.lang.Object
| Constructor and Description |
|---|
ChangesetsDao(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(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,
MapDataChangesHandler handler)
Get map data changes associated with the given changeset, using the default OsmMapDataFactory
|
void |
getData(long id,
MapDataChangesHandler handler,
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 ChangesetsDao(OsmConnection osm)
public ChangesetInfo get(long id)
id - changeset idOsmAuthorizationException - if not logged inpublic void find(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()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 emptyOsmAuthorizationException - if this application is not authorized to modify the map
(Permission.MODIFY_MAP)OsmConflictException - if the changeset is not yet closed. (Only closed changesets can
be commentedpublic ChangesetInfo subscribe(long id)
id - id of the changesetOsmAuthorizationException - if this application is not authorized to modify the map
(Permission.MODIFY_MAP)OsmNotFoundException - if the given changeset does not existpublic ChangesetInfo unsubscribe(long id)
id - id of the changesetOsmAuthorizationException - if this application is not authorized to modify the map
(Permission.MODIFY_MAP)OsmNotFoundException - if the given changeset does not existpublic void getData(long id,
MapDataChangesHandler handler)
public void getData(long id,
MapDataChangesHandler handler,
MapDataFactory factory)
OsmAuthorizationException - if not logged inOsmNotFoundException - if changeset with the given id does not exist