package com.eactive.eai.transformer.dao.excel;

import java.util.Map;

import com.eactive.eai.common.util.ApplicationContextProvider;
import com.eactive.eai.transformer.dao.jdbc.LayoutTypeJdbcDao;
import com.eactive.eai.transformer.layout.Layout;
import com.eactive.eai.transformer.layout.LayoutTypeManager;


public class Layout2ExcelLoadDao extends Layout2ExcelDao {
    //LayoutTypeManager layoutTypeManager = LayoutTypeManager.getInstance();

	public Layout2ExcelLoadDao() {
		super();
		layoutTypeManager = LayoutTypeManager.getInstance();
		layoutTypeManager.reload();
//		if (!layoutTypeManager.isStarted()) {
//			LayoutTypeJdbcDao layoutTypeJdbcDao = ApplicationContextProvider.getContext()
//					.getBean(LayoutTypeJdbcDao.class);
//			layoutTypeManager.init(layoutTypeJdbcDao.load());
//		}
	}
	
	public Map<String, Layout> load(Sheet[] sheets) throws Exception {
		return parse(sheets);
	}

	public Map<String, Layout> load(Sheet sheet) throws Exception {
		return parse(sheet);
	}
}
