001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.search;
016    
017    import java.util.Collection;
018    import java.util.Set;
019    
020    /**
021     * @author Michael C. Han
022     */
023    public interface SearchEngineHelper {
024    
025            public static final String GENERIC_ENGINE_ID = "GENERIC_ENGINE";
026    
027            public static final String SYSTEM_ENGINE_ID = "SYSTEM_ENGINE";
028    
029            public void flushQueuedSearchEngine();
030    
031            public void flushQueuedSearchEngine(String searchEngineId);
032    
033            public Collection<Long> getCompanyIds();
034    
035            public String getDefaultSearchEngineId();
036    
037            public String[] getEntryClassNames();
038    
039            public SearchEngine getSearchEngine(String searchEngineId);
040    
041            public String getSearchEngineId(Collection<Document> documents);
042    
043            public String getSearchEngineId(Document document);
044    
045            public Set<String> getSearchEngineIds();
046    
047            public Collection<SearchEngine> getSearchEngines();
048    
049            public SearchEngine getSearchEngineSilent(String searchEngineId);
050    
051            public String getSearchReaderDestinationName(String searchEngineId);
052    
053            public String getSearchWriterDestinationName(String searchEngineId);
054    
055            public void initialize(long companyId);
056    
057            public void removeCompany(long companyId);
058    
059            public SearchEngine removeSearchEngine(String searchEngineId);
060    
061            public void setDefaultSearchEngineId(String defaultSearchEngineId);
062    
063            public void setQueueCapacity(int queueCapacity);
064    
065            public void setSearchEngine(
066                    String searchEngineId, SearchEngine searchEngine);
067    
068    }