001/* 002 * (C) Copyright 2010-2013 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Olivier Grisel 016 */ 017package org.nuxeo.ecm.platform.suggestbox.service; 018 019import java.io.Serializable; 020import java.util.HashMap; 021import java.util.Map; 022 023/** 024 * Suggest to search for documents meeting some specific search criteria. 025 * 026 * @deprecated since 6.0. The redirection to the search tab is not handled by a Suggestion anymore. 027 */ 028@Deprecated 029public class SearchDocumentsSuggestion extends Suggestion { 030 031 private static final long serialVersionUID = 1L; 032 033 protected final Map<String, Serializable> searchCriteria = new HashMap<String, Serializable>(); 034 035 public SearchDocumentsSuggestion(String id, String label, String iconURL) { 036 super(id, CommonSuggestionTypes.SEARCH_DOCUMENTS, label, iconURL); 037 } 038 039 public SearchDocumentsSuggestion withSearchCriterion(String searchField, Serializable searchValue) { 040 searchCriteria.put(searchField, searchValue); 041 return this; 042 } 043 044 public Map<String, Serializable> getSearchCriteria() { 045 return searchCriteria; 046 } 047 048 @Override 049 public String getObjectUrl() { 050 // TODO Generate the url to access the search page 051 return null; 052 } 053 054}