1 package com
.google
.appengine
.api
.search
;
3 import com
.google
.apphosting
.api
.AppEngineInternal
;
6 * Builds {@link SearchService} instances that are pinned to a specific application and namespace
7 * regardless of the "current" appId provided by {@code ApiProxy.getCurrentEnvironment().getAppId()}
8 * and the "current" namespace provided by {@code NamespaceManager.get()}.
10 * Note: users should not access this class directly.
13 public final class AdminSearchServiceFactory
{
16 * Returns a {@link SearchService} that is pinned to a specific application and namespace. This
17 * implementation ignores the "current" appId provided by
18 * {@code ApiProxy.getCurrentEnvironment().getAppId()} and the "current" namespace provided by
19 * {@code NamespaceManager.get()}.
21 public SearchService
getSearchService(final String appId
, SearchServiceConfig config
) {
23 throw new IllegalArgumentException();
25 if (config
.getNamespace() == null) {
26 throw new IllegalArgumentException();
28 SearchApiHelper helper
= new SearchApiHelper(appId
);
29 return new SearchServiceImpl(helper
, config
);