package com.eactive.eai.rms.onl.loader.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;

import com.eactive.eai.agent.command.Command;
import com.eactive.eai.rms.common.datasource.DataSourceType;
import com.eactive.eai.rms.onl.loader.vo.RuleDeployJobVo;

public interface TransactionLoaderService{

    /**
     * layout loading
     */
    public void insertLayoutLoading(DataSourceType dt, String path,String fileName) throws Exception ;    
    /**
     * transform loading
     */
    public void insertTransformLoading(DataSourceType dt, String path,String fileName) throws Exception ;  
    /**
     * interface loading
     */
    public void insertInterfaceLoading(DataSourceType dt, String path,String fileName) throws Exception ;       
    /**
     * b2b loading
     */
    public void insertB2BLoading(DataSourceType dt, String path,String fileName) throws Exception ;       
    /**
     * C2R loading
     */
    public void insertC2RLoading(DataSourceType dt, String path,String fileName) throws Exception ;
    /**
     * B2B Ext loading
     */
    public void insertB2BExtLoading(DataSourceType dt, String path, String fileName) throws Exception;
    /**
     * adapter loading
     */
    public void insertAdapterLoading(DataSourceType dt, String path,String fileName) throws Exception ;
    
    /**
     * adapter loading Sync
     */
    public void insertAdapterLoadingSync(DataSourceType dt, String path,String fileName) throws Exception ;       

    /**
     * adapter loading
     */
    public void insertAdapterLoadingAll(DataSourceType dt, String path) throws Exception ;       
    
    /**
     * table loading
     */
    public void insertTableLoading(DataSourceType dt, String path, String fileName) throws Exception ;       
    
    /**
     * adapter loading
     */
    public void insertMessageKeyLoading(DataSourceType dt, String path,String fileName) throws Exception ;
    
    /**
     * layout downloading
     */
    public void layoutDownLoading(DataSourceType dt, String path,String serviceName) throws Exception ;    
    /**
     * transform downloading
     */
    public void transformDownLoading(DataSourceType dt, String path,String serviceName) throws Exception ;  
    /**
     * transform downloading
     */
    public LinkedHashMap<String,List> transformDownLoadingForData(DataSourceType dt, String path,String serviceName) throws Exception ;  
    /**
     * interface downloading
     */
    public void interfaceDownLoading(DataSourceType dt, String path,String serviceName) throws Exception ;           
    /**
     * b2b downloading
     */
    public void b2bDownLoading(DataSourceType dt, String path,String serviceName) throws Exception ;
    /**
     * c2r downloading
     */
    public void c2rDownLoading(DataSourceType dt, String path, String serviceName) throws Exception;
    /**
     * b2b ext downloading
     */
    public void b2bExtDownLoading(DataSourceType dt, String path, String serviceName) throws Exception;
    /**
     * adapter downloading
     */
    public void adapterDownLoading(DataSourceType dt, String path,String serviceName) throws Exception ;
    /**
     * 어댑터의 인스턴스명을 바꿔주기 위해서 prefix 추가
     */
    public void adapterDownLoading(DataSourceType dt, String path,String serviceName, String prefix) throws Exception ;

    /**
     * adapter downloadingAll
     */
    public void adapterDownLoadingAll(DataSourceType dt, String path, String like) throws Exception ;
    
    /**
     * layout downloadingAll
     */
    public void layoutDownLoadingAll(DataSourceType dt, String serviceName) throws Exception ;    
    /**
     * transform downloadingAll
     */
    public void transformDownLoadingAll(DataSourceType dt, String serviceName) throws Exception ;  
    /**
     * interface downloadingAll
     */
    public void interfaceDownLoadingAll(DataSourceType dt, String serviceName) throws Exception ;           
    
    /**
     * table downloading
     */
    public void tableDownLoading(DataSourceType dt, String path, String tableName) throws Exception ;           
    
    /**
     * messageKey downloading
     */
    public void messageKeyDownLoading(DataSourceType dt, String path,String serviceName) throws Exception ;
    
    /**
     * tran block 
     */
    public void tranBlock(DataSourceType dt, String cmd, String type, String value) throws Exception ;
    
    public HashMap parse(String filePath) throws Exception ;
    
    public HashSet<String> getFileInterfaceAdapterList(HashMap map) throws Exception;
    
    public List<LinkedHashMap> selectTableDataForListValue(DataSourceType dataSourceType, String tableName, String key1, List<String> param1) throws Exception;
    
    public void adptInstValid(DataSourceType dataSourceType, HashMap map) throws Exception ;
    
    public void adapterGroupValid(DataSourceType dt, HashMap map, String table) throws Exception ;
    
    public void makeDataFiles(DataSourceType dt, String downloadPath,
			HashMap<String, ArrayList<HashMap<String, String>>> listMap) throws Exception;
	
	public void deployDataToTargetSystem(String url, String downloadPath,
			HashMap<String, ArrayList<HashMap<String, String>>> listMap, String serviceType) throws Exception;
	
	public void uploadDeployFile(String url, String localFile, String cmd, String serviceType, String bzwkDstcd)
			throws Exception;
    
	public void scheduleDeployDataApply(String url, String userId, String userIp, String serviceKey, String cmTitle,
			String cmDate, String cmTime, String items) throws Exception;
	
	public boolean ruleDataSaveAndLoading(RuleDeployJobVo jobVo) throws Exception;
	
	public HashMap syncResult(Command command ,String fileName ) throws Exception;
	
    public void appendToListfile(String bizCode, String interfaceId) throws Exception ;  
}