| 334 | } |
| 335 | |
| 336 | public Api lookup(String path, String httpMethod, Map<String, String> parts) { |
| 337 | if (httpMethod == null) { |
| 338 | for (PathTrie<Api> trie : apis.values()) { |
| 339 | Api api = trie.lookup(path, parts); |
| 340 | if (api != null) return api; |
| 341 | } |
| 342 | return null; |
| 343 | } else { |
| 344 | PathTrie<Api> registry = apis.get(httpMethod); |
| 345 | if (registry == null) return null; |
| 346 | return registry.lookup(path, parts); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | public static class ReqHandlerToApi extends Api implements PermissionNameProvider { |
| 351 | SolrRequestHandler rh; |