/**
 * Created on Jul 3, 2005
 * $id:  $
 */
package org.jvnet.lookout.core.adapter;

import java.util.List;

import org.jvnet.lookout.core.model.SearchQuery;
import org.jvnet.lookout.core.model.SearchResult;
import org.jvnet.lookout.core.model.SearchResultSource;

public interface SearchAdapter {
    
    /**
     * Should handle a search request defined in the provided 
     * <code>SearchQuery<code> and return a <code>List</code> of 
     * <code>SearchResult</code> instances. 
     * @param query
     * @return
     */
    public List<SearchResult> handleSearchRequest(SearchQuery query) throws CannotSearchException;    
    
    /**
     * Should return the SearchResultSource that this SearchAdapter is in 
     * charge of handling.
     * 
     * @return
     */
    public SearchResultSource getSearchResultSource();

}
