package com.dbs.mplus.fatima.framework.processor.msg;

import com.dbs.mplus.fatima.framework.MPlusFrameworkConstants;

import java.util.Map;

/**
 * Created by aple on 2015. 7. 27..
 */
public class ErrorMessage implements Message {
    private final Map<String, String> valueMap;

    /**
     * 생성자
     * @param valueMap
     */
    public ErrorMessage(Map<String, String> valueMap) {
        // 처리할 값들
        this.valueMap = valueMap;
    }
    @Override
    public MPlusFrameworkConstants.MSG_TYPE getType() {
        // 에러 메시지
        return MPlusFrameworkConstants.MSG_TYPE.ERROR;
    }

    @Override
    public MPlusFrameworkConstants.MSG_FUNCTION_TYPE getFunction() {
        // 에러는 function이 없음
        return null;
    }

    @Override
    public Map<String, String> getValueMap() {
        // 에러처리용 값
        return this.valueMap;
    }

    @Override
    public String toString() {
        return "ErrorMessage {" +
                "value : " + valueMap +
                '}';
    }
}
