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.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 extends BaseMultiDestinationProxyBean
027            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 deleteDocument(SearchContext searchContext, String uid) {
057                    throw new UnsupportedOperationException();
058            }
059    
060            @Override
061            public void deleteDocuments(
062                    SearchContext searchContext, Collection<String> uids) {
063    
064                    throw new UnsupportedOperationException();
065            }
066    
067            @Override
068            public void deletePortletDocuments(
069                    SearchContext searchContext, String portletId) {
070    
071                    throw new UnsupportedOperationException();
072            }
073    
074            @Override
075            public String getDestinationName(ProxyRequest proxyRequest) {
076                    Object[] arguments = proxyRequest.getArguments();
077    
078                    SearchContext searchContext = (SearchContext)arguments[0];
079    
080                    String searchEngineId = searchContext.getSearchEngineId();
081    
082                    return SearchEngineUtil.getSearchWriterDestinationName(searchEngineId);
083            }
084    
085            @Override
086            public void indexKeyword(
087                    SearchContext searchContext, float weight, String keywordType) {
088    
089                    throw new UnsupportedOperationException();
090            }
091    
092            @Override
093            public void indexQuerySuggestionDictionaries(SearchContext searchContext) {
094                    throw new UnsupportedOperationException();
095            }
096    
097            @Override
098            public void indexQuerySuggestionDictionary(SearchContext searchContext) {
099                    throw new UnsupportedOperationException();
100            }
101    
102            @Override
103            public void indexSpellCheckerDictionaries(SearchContext searchContext) {
104                    throw new UnsupportedOperationException();
105            }
106    
107            @Override
108            public void indexSpellCheckerDictionary(SearchContext searchContext) {
109                    throw new UnsupportedOperationException();
110            }
111    
112            @Override
113            public void updateDocument(SearchContext searchContext, Document document) {
114                    throw new UnsupportedOperationException();
115            }
116    
117            @Override
118            public void updateDocuments(
119                    SearchContext searchContext, Collection<Document> documents) {
120    
121                    throw new UnsupportedOperationException();
122            }
123    
124    }