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 com.liferay.portal.kernel.messaging.proxy.BaseMultiDestinationProxyBean;
018    import com.liferay.portal.kernel.messaging.proxy.ProxyRequest;
019    
020    import java.util.Collection;
021    
022    /**
023     * @author Bruno Farache
024     * @author Tina Tian
025     */
026    public class IndexWriterProxyBean
027            extends BaseMultiDestinationProxyBean implements IndexWriter {
028    
029            @Override
030            public void addDocument(SearchContext searchContext, Document document) {
031                    throw new UnsupportedOperationException();
032            }
033    
034            @Override
035            public void addDocuments(
036                    SearchContext searchContext, Collection<Document> documents) {
037    
038                    throw new UnsupportedOperationException();
039            }
040    
041            @Override
042            public void clearQuerySuggestionDictionaryIndexes(
043                    SearchContext searchContext) {
044    
045                    throw new UnsupportedOperationException();
046            }
047    
048            @Override
049            public void clearSpellCheckerDictionaryIndexes(
050                    SearchContext searchContext) {
051    
052                    throw new UnsupportedOperationException();
053            }
054    
055            @Override
056            public void commit(SearchContext searchContext) {
057                    throw new UnsupportedOperationException();
058            }
059    
060            @Override
061            public void deleteDocument(SearchContext searchContext, String uid) {
062                    throw new UnsupportedOperationException();
063            }
064    
065            @Override
066            public void deleteDocuments(
067                    SearchContext searchContext, Collection<String> uids) {
068    
069                    throw new UnsupportedOperationException();
070            }
071    
072            @Override
073            public void deleteEntityDocuments(
074                    SearchContext searchContext, String className) {
075    
076                    throw new UnsupportedOperationException();
077            }
078    
079            @Override
080            public String getDestinationName(ProxyRequest proxyRequest) {
081                    Object[] arguments = proxyRequest.getArguments();
082    
083                    SearchContext searchContext = (SearchContext)arguments[0];
084    
085                    String searchEngineId = searchContext.getSearchEngineId();
086    
087                    return SearchEngineHelperUtil.getSearchWriterDestinationName(
088                            searchEngineId);
089            }
090    
091            @Override
092            public void indexKeyword(
093                    SearchContext searchContext, float weight, String keywordType) {
094    
095                    throw new UnsupportedOperationException();
096            }
097    
098            @Override
099            public void indexQuerySuggestionDictionaries(SearchContext searchContext) {
100                    throw new UnsupportedOperationException();
101            }
102    
103            @Override
104            public void indexQuerySuggestionDictionary(SearchContext searchContext) {
105                    throw new UnsupportedOperationException();
106            }
107    
108            @Override
109            public void indexSpellCheckerDictionaries(SearchContext searchContext) {
110                    throw new UnsupportedOperationException();
111            }
112    
113            @Override
114            public void indexSpellCheckerDictionary(SearchContext searchContext) {
115                    throw new UnsupportedOperationException();
116            }
117    
118            @Override
119            public void partiallyUpdateDocument(
120                    SearchContext searchContext, Document document) {
121    
122                    throw new UnsupportedOperationException();
123            }
124    
125            @Override
126            public void partiallyUpdateDocuments(
127                    SearchContext searchContext, Collection<Document> documents) {
128            }
129    
130            @Override
131            public void updateDocument(SearchContext searchContext, Document document) {
132                    throw new UnsupportedOperationException();
133            }
134    
135            @Override
136            public void updateDocuments(
137                    SearchContext searchContext, Collection<Document> documents) {
138    
139                    throw new UnsupportedOperationException();
140            }
141    
142    }