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