001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.gui.tagging.presets;
003
004import java.util.Collection;
005import java.util.List;
006
007import org.openstreetmap.josm.data.osm.OsmPrimitive;
008import org.openstreetmap.josm.data.osm.Tag;
009
010/**
011 * This interface needs to be implemented in order to display a tagging preset. It allows the preset dialog to query the primitives it should
012 * be displayed for and modify them.
013 */
014public interface TaggingPresetHandler {
015    /**
016     * Gets the selection the preset should be applied to.
017     * @return A collection of primitives.
018     */
019    Collection<OsmPrimitive> getSelection();
020
021    /**
022     * Update the given tags on the selection.
023     * @param tags The tags to update.
024     */
025    void updateTags(List<Tag> tags);
026}