/*
 * $Id: InputParamConfig.java,v 1.2 2006/04/12 03:24:41 sugimotokenichi Exp $
 * Copyright (C) 2006 SUGIMOTO Ken-ichi
 * 作成日: 2006/02/20
 */
package feat2.config;

import feat2.FeatErrors;

/**
 * リクエストパラメータ入力の設定。
 * @author SUGIMOTO Ken-ichi
 */
public class InputParamConfig extends InputConfigBase {

    private String ref;

    public String getRef() {
        return ref;
    }
    public void setRef(String paramName) {
        this.ref = paramName;
    }

    // Configのメソッド -------------------------------------------------------

    public String getElementName() {
        return "input-param";
    }

    public boolean validate(FeatErrors errs) {

        boolean ret = super.validate(errs);

        if ( ref == null && getPropertyName() != null )
            ref = getPropertyName().getValue();

        return ret;
    }

}
