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