001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.util.StringPool;
018    import com.liferay.portal.security.permission.PermissionChecker;
019    
020    import java.util.Locale;
021    
022    import javax.portlet.PortletURL;
023    
024    /**
025     * @author Brian Wing Shun Chan
026     */
027    public class DummyIndexer implements Indexer {
028    
029            public void delete(long companyId, String uid) {
030            }
031    
032            public void delete(Object obj) {
033            }
034    
035            public String[] getClassNames() {
036                    return new String[0];
037            }
038    
039            public Document getDocument(Object obj) {
040                    return null;
041            }
042    
043            public BooleanQuery getFacetQuery(
044                    String className, SearchContext searchContext) {
045    
046                    return null;
047            }
048    
049            public BooleanQuery getFullQuery(SearchContext searchContext) {
050                    return null;
051            }
052    
053            public IndexerPostProcessor[] getIndexerPostProcessors() {
054                    return new IndexerPostProcessor[0];
055            }
056    
057            public String getPortletId() {
058                    return StringPool.BLANK;
059            }
060    
061            public String getSearchEngineId() {
062                    return StringPool.BLANK;
063            }
064    
065            public String getSortField(String orderByCol) {
066                    return StringPool.BLANK;
067            }
068    
069            public Summary getSummary(
070                    Document document, Locale locale, String snippet,
071                    PortletURL portletURL) {
072    
073                    return null;
074            }
075    
076            public boolean hasPermission(
077                    PermissionChecker permissionChecker, String entryClassName,
078                    long entryClassPK, String actionId) {
079    
080                    return false;
081            }
082    
083            public boolean isFilterSearch() {
084                    return false;
085            }
086    
087            public boolean isPermissionAware() {
088                    return false;
089            }
090    
091            public boolean isStagingAware() {
092                    return false;
093            }
094    
095            public void postProcessContextQuery(
096                    BooleanQuery contextQuery, SearchContext searchContext) {
097            }
098    
099            public void postProcessSearchQuery(
100                    BooleanQuery searchQuery, SearchContext searchContext) {
101            }
102    
103            public void registerIndexerPostProcessor(
104                    IndexerPostProcessor indexerPostProcessor) {
105            }
106    
107            public void reindex(Object obj) {
108            }
109    
110            public void reindex(String className, long classPK) {
111            }
112    
113            public void reindex(String[] ids) {
114            }
115    
116            public Hits search(SearchContext searchContext) {
117                    return null;
118            }
119    
120            public void unregisterIndexerPostProcessor(
121                    IndexerPostProcessor indexerPostProcessor) {
122            }
123    
124    }