/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package usda.weru.weps.location;

import usda.weru.weps.RunFileBean;
import usda.weru.weps.location.chooser.StationChooser;

/**
 * Encapsulates logic for a given station selection mode.
 * @author Joseph Levin <joelevin@weru.ksu.edu>
 */
public interface StationModeController {

	/**
	 *
	 * @param bean
	 * @param type
	 */
	public void installModel(RunFileBean bean, usda.weru.weps.RunFileBean.StationType type);

	/**
	 *
	 * @param bean
	 * @param type
	 */
	public void uninstallModel(RunFileBean bean, usda.weru.weps.RunFileBean.StationType type);



    /**
     * Called when the station mode is to be used on the chooser.  Typical
     * implementations will call chooser.setView(view).
     * @param chooser
     */
    public void installView(StationChooser chooser);

    /**
     * Called when this station mode is no longer used by the StationChooser.
     * It is likely this is not needed, but is in place for possible clean up actions.
     * @param chooser
     */
    public void uninstallView(StationChooser chooser);

    /**
     * The id is used in the RunFileData for backwards compatibility.
     * @return
     * @deprecated 
     */
    @Deprecated
    public int getId();

	/**
	 *
	 * @return
	 */
	public String getDisplayName();

    /**
     * The name will be used by config options to store the allowed modes.  This
     * name should never change or else files will fail to be backwards compatible.
     * @return the name used in config files.
     */
    public String getName();

}
