Revision created by MOE tool push_codebase.
[gae.git] / java / src / main / com / google / appengine / api / search / ISearchServiceFactory.java
blobd7c35453732dcdfef5cee4060cfa0f90baad440c
1 // Copyright 2012 Google Inc. All rights reserved.
3 package com.google.appengine.api.search;
5 /**
6 * A factory that creates default implementation of {@link SearchService}.
8 */
9 public interface ISearchServiceFactory {
11 /**
12 * Returns an instance of the {@link SearchService}. The instance
13 * will exist in the user provided namespace. The namespace must be
14 * valid, as per {@link NamespaceManager#validateNamespace(String)}
15 * method. Equivalent to
16 * <code>
17 * getSearchService(SearchServiceConfig.newBuilder().setNamespace(namespace).build())
18 * </code>
20 * @param namespace a namespace to be assigned to the returned
21 * search service.
22 * @return the default implementation of {@link SearchService}.
23 * @throws IllegalArgumentException if the namespace is invalid
24 * @deprecated Use {@link ISearchServiceFactory#getSearchService(SearchServiceConfig)}
26 @Deprecated
27 SearchService getSearchService(String namespace);
29 /**
30 * Returns an instance of the {@link SearchService} with the given config.
32 * @param config a {@link SearchServiceConfig} instance that describes the
33 * requested search service. If no namespace provided in config,
34 * NamespaceManager.get() will be used.
35 * will be used.
36 * @return the default implementation of {@link SearchService}.
38 SearchService getSearchService(SearchServiceConfig config);