001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.gui.history;
003
004import java.util.List;
005
006import org.openstreetmap.josm.data.osm.PrimitiveId;
007
008/**
009 * Change, or block, history requests.
010 *
011 * The HistoryHook may modify the requested primitive ids silently, it may display a
012 * warning message to the user or prevent the request altogether.
013 * @since 13947
014 */
015public interface HistoryHook {
016
017    /**
018     * Modify the requested primitive ids before history request.
019     * The request is cancelled if the collection is cleared.
020     * Default implementation is to do no changes.
021     * @param ids The current ids to change
022     * @since 13948
023     */
024    default void modifyRequestedIds(List<PrimitiveId> ids) {
025    }
026}