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