package com.eactive.eai.message.mapper;

import com.eactive.eai.message.StandardMessage;

public interface MessageMapper {
	public StandardMessage parseSub(String msgType, Object message) throws Exception;
	
	// Sub request inbound(100), Sub response outbound(300) 
	// parse sub -> mapping to standard
	public StandardMessage mapFromSub(StandardMessage subMessage, StandardMessage orgStandardMessage) throws Exception;
	
	public StandardMessage mapFromSub(String msgType, Object message, StandardMessage orgStandardMessage) throws Exception;
	
	// Sub response inbound(400), Sub request outbound(200) 
	public StandardMessage convertToSub(StandardMessage standardMessage) throws Exception;
	public StandardMessage convertToSub(StandardMessage standardMessage, StandardMessage subMessage) throws Exception;
	
	// Not used until now 
	public StandardMessage convertToStandard(StandardMessage subMessage, StandardMessage standardMessage) throws Exception;
  
	public void map(StandardMessage sourceMessage, String sourcePath, StandardMessage targetMessage,
			String targetPath);
}
