/*
!=======================================================================
!
!  PROGRAM  PHASE-Viewer  (PHASE-Viewer 2014.01 ver.3.3.0)
!
!  Created on 2006/10/16, 17:10
!  AUTHOR(S): KOGA, Junichiro
!  File : InputChecker.java
!  
!  Contact address :  Phase System Consortium
!                     E-mail: phase_system@nims.go.jp URL https://azuma.nims.go.jp
!
!
!   Since 2002, this program set had been intensively developed as a part of the following 
!  national projects supported by the Ministry of Education, Culture, Sports, Science and
!  Technology (MEXT) of Japan; "Frontier Simulation Software for Industrial Science
!  (FSIS)" from 2002 to 2005, "Revolutionary Simulation Software (RSS21)" from 2006 to
!  2008. "Research and Development of Innovative Simulation Software (RISS)" from 2008
!  to 2013. These projects is lead by the Center for Research on Innovative Simulation 
!  Software (CISS), the Institute of Industrial Science (IIS), the University of Tokyo.
!   Since 2013, this program set has been further developed centering on PHASE System
!  Consortium. 
!   The activity of development of this program set has been supervised by Takahisa Ohno.
!
!=======================================================================
 */

package ciss.phase_viewer.input;

import ciss.phase_viewer.inputinterface.Input;

/**
 * 「入力検査」のインターフェース
 * 
 * @author
 */
public interface InputChecker {
    public static String STR_UN_CHECKED = "UNCHECKED";
    public static String STR_WARNING = " WARNING ";
    public static String STR_ERROR = "  ERROR  ";
    public static String STR_OK = "    OK   ";
    public static int UN_CHECKED = 1;
    public static int WARNING = -1;
    public static int ERROR = -2;
    public static int OK = 0;

    /**
     * 入力をチェックする. 戻り値は, WARNING, ERROR, OKなどにする.
     * 
     * @return チェックの結果
     */
    public int doCheck();

    /**
     * チェックの際のメッセージを返す.
     * 
     * @return チェック後のメッセージ
     */
    public String getMessage();

    /**
     * 入力が修正可能な場合trueを返すメソッド; 場合によっては修正のしようのない 入力項目も有り得るので.
     * 
     * @return 関連付けられた入力項目が修正可能な場合true.
     */
    public boolean isFixable();

    /**
     * 入力を修正するメソッド
     * 
     * @return 入力修正に成功した場合true.
     */
    public boolean fixInput();

    /**
     * 「修正候補」を返す
     * 
     * @return 修正候補
     */
    public String getCandidate();

    /**
     * この「入力チェッカー」の名前を取得する.
     * 
     * @return この「入力チェッカー」の名前
     */
    public String getName();

    /**
     * この「入力チェッカー」を説明する文字列を返す
     * 
     * @return 入力チェッカーの説明
     */
    public String getDescription();

    /**
     * 関連付けたい入力オブジェクトをセット.
     */
    public void setInput(Input input);

    /**
     * 現在の状態を取得
     * 
     * @return 現在の状態
     */
    public int getCurrentState();

}
