package wenrgise.workflow.utility;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import wenrgise.workflow.xml.vo.WflDocParam;
import wenrgise.workflow.xml.vo.WflDocParams;

public class WflDocParamsManager {
  private static WflDocParamsManager me = new WflDocParamsManager();
  
  private HashMap oWflDocMap = new HashMap();
  
  public Map getMap() {
    return this.oWflDocMap;
  }
  
  public static WflDocParamsManager getInstance() {
    return me;
  }
  
  public void init(WflDocParams wfls) {
    ArrayList wflList = wfls.get_WflDocParam();
    if (wflList == null)
      return; 
    Iterator oIt = wflList.iterator();
    while (oIt.hasNext()) {
      WflDocParam wflDocParam = oIt.next();
      System.out.println(String.valueOf("Document Type ").concat(String.valueOf(wflDocParam.get_DocType())));
      this.oWflDocMap.put(wflDocParam.get_DocType(), wflDocParam);
    } 
  }
}
