/**
 * 
 */
package com.ejie.ab61.exceptions;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 *  
 * 
 */
public class X43TareasTramitacionException extends RuntimeException implements Serializable {

	private static final long serialVersionUID = 1L;
	private Map<String, Boolean> messages = null;
	private Throwable exception;

	/**
	 * 
	 */
	public X43TareasTramitacionException() {

		if (null == this.messages) {

			this.messages = new LinkedHashMap<String, Boolean>();
		}

	}

	/**
	 * 
	 * @param message
	 *            String
	 * @param isUserMessage
	 *            Boolean
	 * @param exception
	 *            Throwable
	 */
	public X43TareasTramitacionException(String message, Boolean isUserMessage, Throwable exception) {

		if (null == this.messages) {

			this.messages = new LinkedHashMap<String, Boolean>();
		}

		this.messages.put(message, isUserMessage);
		this.exception = exception;

	}

	/**
	 * 
	 * @param message
	 *            String
	 * @param isUserMessage
	 *            Boolean
	 * @param exception
	 *            Throwable
	 */
	public void addException(String message, Boolean isUserMessage, Throwable exception) {

		this.messages.put(message, isUserMessage);
		this.exception = exception;

	}

	/**
	 * @return the messages
	 */
	public Map<String, Boolean> getMessages() {
		return this.messages;
	}

	/**
	 * @param messages
	 *            the messages to set
	 */
	public void setMessages(Map<String, Boolean> messages) {
		this.messages = messages;
	}

	/**
	 * @return the exception
	 */
	public Throwable getException() {
		return this.exception;
	}

	/**
	 * @param exception
	 *            the exception to set
	 */
	public void setException(Throwable exception) {
		this.exception = exception;
	}

}
