001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.gui.io;
003
004import org.openstreetmap.josm.gui.util.ChangeNotifier;
005
006/**
007 * ChangesetReviewModel is an observable model for the changeset review requested
008 * in the {@link UploadDialog}.
009 * @since 12719
010 */
011public class ChangesetReviewModel extends ChangeNotifier {
012    private boolean review;
013
014    /**
015     * Sets the current changeset review request state and notifies observers if it has changed.
016     *
017     * @param review the new review request state
018     */
019    public void setReviewRequested(boolean review) {
020        boolean oldValue = this.review;
021        this.review = review;
022        if (oldValue != this.review) {
023            fireStateChanged();
024        }
025    }
026
027    /**
028     * Determines if a changeset review has been requested.
029     *
030     * @return {@code true} if a changeset review has been requested
031     */
032    public boolean isReviewRequested() {
033        return review;
034    }
035}