/*********************************************************************
*	All Rights reserved,Copyright (c) K-Opticom
**********************************************************************
*＜プログラム内容＞
*	システム名		：eo顧客基幹システム
*	モジュール名	：JFUFUSV035624SCReqChk
*	ソースファイル名：JFUFUSV035624SCReqChk.java
*	作成者			：富士通
*	日付			：2022年2月7日
*＜機能概要＞
*	実行条件判定クラスです。
*＜修正履歴＞
*	バージョン	修正日		修正者		修正内容
*	v58.00.00	2022/2/7	FJ			ANK-4217-00-00_一般Webサービス申込機能再構築に伴うAPI作成
**********************************************************************/

package com.fujitsu.futurity.bp.custom.reqchk;

import java.util.HashMap;

import com.fujitsu.futurity.bp.x21.bpm.common.AbstractCustomReqChk;
import com.fujitsu.futurity.bp.x21.bpm.common.IConditionValue;
import com.fujitsu.futurity.bp.x21.bpm.exception.RequestParameterException;
import com.fujitsu.futurity.bp.x21.bpm.parameter.IRequestParameterReadOnly;
import com.fujitsu.futurity.bp.x21.bpm.reqchk.exception.ReqChkException;

import eo.common.constant.JFUStrConst;

/**
 * FUSV035624SCの実行条件判定クラス
 * 
 * <br>
 * @author 富士通
 */
public class FUSV035624SCReqChk extends AbstractCustomReqChk
{
	
	/** FUSV015233SCの実行条件判定マップ */
	public static final String FUSV015233REQCHK = "FUSV015233ReqChk"; 
	
	/** 標準工事費お支払い方法 */
	public static final String STDARD_KOJIHI_PAYWAY = "stdard_kojihi_payway"; 
	
	/**
	 * サービスIFの実行判定を実施する。
	 * @param irp
	 * @param conditionvalue
	 * @return 判定結果(条件を満たすtrue/満たさないfalse)
	 * @throws ReqChkException
	 */
	@SuppressWarnings("unchecked")
	public boolean checkExecution(IRequestParameterReadOnly irp, IConditionValue conditionvalue) throws ReqChkException
	{
		String stdKojihiPayway = null; // 標準工事費お支払い方法
		
		try
		{
			HashMap inMap = (HashMap)irp.getData(FUSV015233REQCHK);
			stdKojihiPayway = (String)inMap.get(STDARD_KOJIHI_PAYWAY);
		}
		catch (RequestParameterException e)
		{
			throw new ReqChkException(e.getMessage(), e);
		}
			
		// 判定処理 標準工事費お支払い方法が"空白以外"の場合実行
		if (!JFUStrConst.EMPTY.equals(stdKojihiPayway))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}