package chat;

import java.util.Vector;
/**
 * \interface TopicsManager
 * Provides a model for the management of topics.
 */
public interface TopicsManager {
	/**
	 * \return the list of the topics
	 */
	public Vector<String> listTopics();
	
	/**
	 * create a chatroom with a subject about topic
	 * \param topic topic of the chatroom
	 * \return new chatroom which subject is topic
	 */
	public Chatroom joinTopic(String topic);
	
	/**
	 * create a new topic
	 * \param topic topic of the new subject ; if the topic already exists, we don't do nothing
	 * \todo may be a good idea to throw an exception in case the topic already exists
	 */
	public void createTopic(String topic) throws ChatroomExistsException;
}
