11/*
22 * Copyright 2017 tinyauth.io
3- *
3+ *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
66 * You may obtain a copy of the License at
7- *
7+ *
88 * http://www.apache.org/licenses/LICENSE-2.0
99 *
1010 * Unless required by applicable law or agreed to in writing, software
1111 * distributed under the License is distributed on an "AS IS" BASIS,
1212 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
15- *
15+ *
1616 */
1717
18- package io .tinyauth .elasticsearch . actions ;
18+ package io .tinyauth .elasticsearch ;
1919
2020import java .util .Arrays ;
2121import java .util .List ;
4747import org .elasticsearch .common .logging .Loggers ;
4848
4949
50- public class ActionIndexesAdaptor {
51- private static final Logger logger = Loggers .getLogger (ActionIndexesAdaptor .class );
50+ public class ActionIndicesAdaptor {
51+ private static final Logger logger = Loggers .getLogger (ActionIndicesAdaptor .class );
5252 private ArrayList <Method > methods ;
5353
54- public ActionIndexesAdaptor () {
54+ public ActionIndicesAdaptor () {
5555 methods = new ArrayList <Method >();
5656
5757 for (Method m : this .getClass ().getMethods ()) {
@@ -70,15 +70,15 @@ public ActionIndexesAdaptor() {
7070 public Set <String > extractIndices (SearchRequest req ) {
7171 logger .error ("SearchRequest" );
7272 Set <String > idxs = new HashSet <String >();
73- Collections .addAll (idxs , req .indices ());
73+ Collections .addAll (idxs , req .indices ());
7474 return idxs ;
7575 }
7676
7777 public Set <String > extractIndices (ActionRequest req ) {
7878 logger .error ("ActionRequest" );
7979 return new HashSet <String >();
8080 }
81-
81+
8282 public Set <String > getIndices (ActionRequest req ) {
8383 for (Method m : methods ) {
8484 Class <?>[] c = m .getParameterTypes ();
@@ -102,7 +102,7 @@ public Set<String> getIndices(ActionRequest req) {
102102 }
103103 }
104104 }
105-
105+
106106 logger .error ("Unable to find adaptor for request" );
107107 return new HashSet <String >();
108108 }
0 commit comments