/**
 * Copyright (c) 2003-2004 System Integrator Corporation.
 *                 All Rights Reserved.
 */
package jp.co.sint.beans.mallmgr;

import java.util.HashMap;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import jp.co.sint.basic.SIBasic;
import jp.co.sint.config.SIConfig;
import jp.co.sint.tools.SIUtil;
import jp.co.sint.tools.SIURLParameter;//7.1.1 ST0236 追加

import org.apache.log4j.Category;

/**
 * @version $Id: UICmdtyUploadImgList.java,v 1.0 2004/02/10 Exp $
 * @author  yamauchi
 * <br>Description:
 * <p>History</p>
 * <p>Author&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reason</p>
 *  ============&nbsp;&nbsp;&nbsp;==========&nbsp;&nbsp;===========================<br>
 * yamauchi       2004/02/10 12:22:27  Original
 */
public class UICmdtyUploadImgList extends SIBasic {
  //ログ用のインスタンスの生成
  private static Category log = Category.getInstance(SIConfig.SILOG4J_WEBSHOP_CATEGORY_NAME);
  
  private String shopCode = "";
  private String destPath = "";
  
  private HashMap paraMap = new HashMap();
  
  /**画像種類
   * @param string
   */
  public void setDestPath(String lDestPath) {
    if (SIUtil.isNull(lDestPath)) lDestPath = "";//7.2.0 ST0275 修正
    this.destPath = SIUtil.changeTo(lDestPath.trim(), getEncode());
  }
  
  /**ショップコード
   * @param string
   */
  public void setShopCode(String lShopCode) {
    if (SIUtil.isNull(lShopCode)) lShopCode = "";//7.2.0 ST0275 修正
    this.shopCode = SIUtil.changeTo(lShopCode.trim(), getEncode());
  }
  
  public void setParaMap(HashMap lParaMap){
    this.paraMap = lParaMap;
  }
  
  /**画像種類
   * @return
   */
  public String getDestPath() {
    return destPath;
  }
  
  /**ショップコード
   * @return
   */
  public String getShopCode() {
    return shopCode;
  }
  
  public HashMap getParaMap(){
    return this.paraMap;
  }
  
  /**validate
   *メニューから表示された場合に古いセッション情報を消します。
  * @return
  */
  public static void initRequest(HttpServletRequest request,String lSessionName,SIURLParameter lUrlParam){//7.1.1 ST0236 修正 //7.2.0 ST0271 修正
    String action = (String)lUrlParam.getParam("actionNameTxt");//7.1.1 ST0236 修正
    HttpSession lSession=null;
    if(SIUtil.isNotNull(action)&&action.equals(SIConfig.SIACTION_CLEAR)){
      lSession=request.getSession(true);
      lSession.removeAttribute(lSessionName);
    }
  }
}