001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.plugins.eventbus.data.osm.history;
003
004import org.openstreetmap.josm.data.osm.PrimitiveId;
005import org.openstreetmap.josm.data.osm.history.HistoryDataSet;
006
007/**
008 * Event fired when history is updated for an OSM primitive.
009 */
010public class HistoryUpdatedEvent extends AbstractHistoryEvent {
011
012    private static final long serialVersionUID = 1L;
013
014    private final PrimitiveId id;
015
016    /**
017     * Constructs a new {@code HistoryUpdatedEvent}.
018     * @param source object on which the Event initially occurred
019     * @param historyDataSet history data set for which the event is trigerred
020     * @param id the primitive id for which history has been updated
021     */
022    public HistoryUpdatedEvent(Object source, HistoryDataSet historyDataSet, PrimitiveId id) {
023        super(source, historyDataSet);
024        this.id = id;
025    }
026
027    /**
028     * Returns the primitive id for which history has been updated.
029     * @return primitive id for which history has been updated
030     */
031    public PrimitiveId getId() {
032        return id;
033    }
034}