package eu.dnetlib.common.profile.blackboard;

import java.util.List;
import java.util.Map;

import eu.dnetlib.common.profile.blackboard.Parameter;

/**
 * The Interface IBlackboardMessage.
 * @author <a href="mailto:marek.imialek at uni-bielefeld.de">Marek Imialek</a
 * 
 */
public interface IBlackboardMessage {

	/**
 * The Enum Action.
 */
	public enum Action {
		CREATE, DELETE, UPDATE, MANAGE, RELEASE,
		CANCEL, INIT, HALT, FEED, STORE, TRANSFORM,
		LISTRECORDS, GETRECORD, LISTSETS, LISTMETADATAFORMATS,
		IDENTIFY, LISTIDENTIFIERS
	};

	/**
	 * The Enum ActionStatus.
	 */
	public enum ActionStatus {
		DONE,ONGOING, FAILED, WAITING, ASSIGNED
	};

	/**
	 * Gets the action.
	 * 
	 * @return the action
	 */
	public Action getAction();
	
	/**
	 * Sets the action.
	 * 
	 * @param action the new action
	 */
	public void setAction(Action action);
	
	/**
	 * Gets the action status.
	 * 
	 * @return the action status
	 */
	public ActionStatus getActionStatus();
	
	/**
	 * Sets the action status.
	 * 
	 * @param status the new action status
	 */
	public void setActionStatus(ActionStatus status);
	
	/**
	 * Gets the id.
	 * 
	 * @return the id
	 */
	public String getId();
	
	/**
	 * Sets the id.
	 * 
	 * @param msgId the new id
	 */
	public void setId(String msgId);
	
	/**
	 * Gets the param list.
	 * 
	 * @return the param list
	 */
	public List<Parameter> getParamList();
	
	/**
	 * Gets the param map.
	 * 
	 * @return the param map
	 */
	public Map<String, Parameter> getParamMap();
	
	/**
	 * Sets the param list.
	 * 
	 * @param paramList the new param list
	 */
	public void setParamList(List<Parameter> paramList);
	
	/**
	 * Sets the parameters.
	 * 
	 * @param parameters the parameters
	 */
	public void setParameters(Map<String, String> parameters);
	
	/**
	 * Overwrite parameter.
	 * 
	 * @param param the param
	 */
	public void overwriteParameter(Parameter param);
	
	/**
	 * Gets the parameter.
	 * 
	 * @param name the name
	 * 
	 * @return the parameter
	 */
	public String getParameter(String name);
	
	/**
	 * Contains parameter.
	 * 
	 * @param name the name
	 * 
	 * @return true, if successful
	 */
	public boolean containsParameter(String name);
	
	/**
	 * Gets the date.
	 * 
	 * @return the date
	 */
	public String getDate();
	
	/**
	 * Sets the date.
	 * 
	 * @param date the new date
	 */
	public void setDate(String date);

}
