package de.uka.ipd.consensus.foundation.rating;

import java.util.EventListener;

/**
 * The listener interface for receiving events when a rating was added to an element, changed or removed.
 * @author Thomas Much
 * @version 2006-06-14
 * @see RatingManager
 * @see RatingManager#addRatingListener(RatingListener)
 */
public interface RatingListener extends EventListener {

	/**
	 * Called by the RatingManager when a new rating was added to a concept.
	 * @param event the RatingEvent object containing the user, his rating and the rated concept
	 */
	public void conceptRatingSet(RatingEvent event);
	
	
	/**
	 * Called by the RatingManager when an existing concept's rating was changed.
	 * @param event the RatingEvent object containing the user, his rating and the rated concept
	 */
	public void conceptRatingChanged(RatingEvent event);
	
	
	/**
	 * Called by the RatingManager when a concept's rating was removed.
	 * @param event the RatingEvent object containing the user, the removed rating and the rated concept
	 */
	public void conceptRatingRemoved(RatingEvent event);
	
	
	/**
	 * Called by the RatingManager when a new rating was added to an user.
	 * @param event the RatingEvent object containing the rating user, his rating and the rated user
	 */
	public void userRatingSet(RatingEvent event);
	
	
	/**
	 * Called by the RatingManager when an existing user's rating was changed.
	 * @param event the RatingEvent object containing the rating user, his rating and the rated user
	 */
	public void userRatingChanged(RatingEvent event);
	
	
	/**
	 * Called by the RatingManager when a user's rating was removed.
	 * @param event the RatingEvent object containing the user, the removed rating and the rated user
	 */
	public void userRatingRemoved(RatingEvent event);

}
