package lu.tudor.santec.gecamed.core.ejb.session.interfaces;

import java.util.Collection;
import java.util.List;

import lu.tudor.santec.gecamed.core.ejb.entity.beans.Autocompletion;

public interface AutocompletionInterface
{
	public Autocompletion updateCompletion (Autocompletion autocompletion);
	
	public void removeDuplicateEntries ();
	
	public Collection<Autocompletion> updateCompletions (Collection<Autocompletion> autocompletions);
	
	public Autocompletion addCompletion (String context, String shortCut, String replacementText, Integer userId);
	
	public Autocompletion addCompletion (String context, String replacementText, Integer userId);
	
	public boolean removeCompletion (Integer id);
	
	public boolean removeCompletion (Autocompletion autocompletion);
	
	public List<Autocompletion> getCompletions (String context, Integer userId);
	
	public List<Autocompletion> getCompletions (String context);

	public Autocompletion getCompletion (String inputText, String replacementText, String context, Integer userId);
	
	public List<Autocompletion> searchCompletions (String searchText, String context, Integer userId);
	
	public List<String> getContexts ();
}
