001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.gui.dialogs.relation; 003 004import org.openstreetmap.josm.data.osm.Relation; 005 006/** 007 * Super interface of relation editors. 008 * @since 9659 009 */ 010public interface IRelationEditor { 011 012 /** 013 * Replies the currently edited relation 014 * 015 * @return the currently edited relation 016 */ 017 Relation getRelation(); 018 019 /** 020 * Sets the currently edited relation. Creates a snapshot of the current 021 * state of the relation. See {@link #getRelationSnapshot()} 022 * 023 * @param relation the relation 024 */ 025 void setRelation(Relation relation); 026 027 /** 028 * Replies the state of the edited relation when the editor has been launched. 029 * @return the state of the edited relation when the editor has been launched 030 */ 031 Relation getRelationSnapshot(); 032 033 /** 034 * Replies true if the currently edited relation has been changed elsewhere. 035 * 036 * In this case a relation editor can't apply updates to the relation directly. Rather, 037 * it has to create a conflict. 038 * 039 * @return true if the currently edited relation has been changed elsewhere. 040 */ 041 boolean isDirtyRelation(); 042 043 /** 044 * Reloads data from relation. 045 */ 046 void reloadDataFromRelation(); 047}