]> source.dussan.org Git - archiva.git/commitdiff
fix typo (filer -> filter)
authorBrett Porter <brett@apache.org>
Thu, 5 Jan 2012 07:52:48 +0000 (07:52 +0000)
committerBrett Porter <brett@apache.org>
Thu, 5 Jan 2012 07:52:48 +0000 (07:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1227518 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFiler.java [deleted file]
archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFilter.java [new file with mode: 0644]
archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java
archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFiler.java [deleted file]
archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFilter.java [new file with mode: 0644]

diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFiler.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFiler.java
deleted file mode 100644 (file)
index e9f217f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.apache.archiva.indexer.search;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.index.ArtifactInfo;
-
-import java.util.Map;
-
-/**
- * @author Olivier Lamy
- * @since 1.4-M1
- */
-public interface ArtifactInfoFiler
-{
-    boolean addArtifactInResult( ArtifactInfo artifact, Map<String, SearchResultHit> currentResult );
-}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFilter.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFilter.java
new file mode 100644 (file)
index 0000000..cecb8c8
--- /dev/null
@@ -0,0 +1,32 @@
+package org.apache.archiva.indexer.search;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.index.ArtifactInfo;
+
+import java.util.Map;
+
+/**
+ * @author Olivier Lamy
+ * @since 1.4-M1
+ */
+public interface ArtifactInfoFilter
+{
+    boolean addArtifactInResult( ArtifactInfo artifact, Map<String, SearchResultHit> currentResult );
+}
index 81b76ee5fc1d464d0e6efc6c76f865002500c19f..436e9df2ed03922e1c177fb875a56b708cab9df1 100644 (file)
@@ -124,7 +124,7 @@ public class NexusRepositorySearch
 
         // we retun only artifacts without classifier in quick search, olamy cannot find a way to say with this field empty
         // FIXME  cannot find a way currently to setup this in constructQuery !!!
-        return search( limits, q, indexingContextIds, NoClassifierArtifactInfoFiler.LIST, selectedRepos, false );
+        return search( limits, q, indexingContextIds, NoClassifierArtifactInfoFilter.LIST, selectedRepos, false );
 
     }
 
@@ -235,12 +235,12 @@ public class NexusRepositorySearch
             throw new RepositorySearchException( "No search fields set." );
         }
 
-        return search( limits, q, indexingContextIds, Collections.<ArtifactInfoFiler>emptyList(),
+        return search( limits, q, indexingContextIds, Collections.<ArtifactInfoFilter>emptyList(),
                        searchFields.getRepositories(), searchFields.isIncludePomArtifacts() );
     }
 
     private SearchResults search( SearchResultLimits limits, BooleanQuery q, List<String> indexingContextIds,
-                                  List<? extends ArtifactInfoFiler> filters,
+                                  List<? extends ArtifactInfoFilter> filters,
                                   List<String> selectedRepos, boolean includePoms)
         throws RepositorySearchException
     {
@@ -448,7 +448,7 @@ public class NexusRepositorySearch
 
 
     private SearchResults convertToSearchResults( FlatSearchResponse response, SearchResultLimits limits,
-                                                  List<? extends ArtifactInfoFiler> artifactInfoFilers,
+                                                  List<? extends ArtifactInfoFilter> artifactInfoFilters,
                                                   List<String>selectedRepos, boolean includePoms)
         throws RepositoryAdminException
     {
@@ -465,7 +465,7 @@ public class NexusRepositorySearch
                                              artifactInfo.packaging );
             Map<String, SearchResultHit> hitsMap = results.getHitsMap();
 
-            if ( !applyArtifactInfoFilters( artifactInfo, artifactInfoFilers, hitsMap ) )
+            if ( !applyArtifactInfoFilters( artifactInfo, artifactInfoFilters, hitsMap ) )
             {
                 continue;
             }
@@ -620,15 +620,15 @@ public class NexusRepositorySearch
     }
 
     private boolean applyArtifactInfoFilters( ArtifactInfo artifactInfo,
-                                              List<? extends ArtifactInfoFiler> artifactInfoFilers,
+                                              List<? extends ArtifactInfoFilter> artifactInfoFilters,
                                               Map<String, SearchResultHit> currentResult )
     {
-        if ( artifactInfoFilers == null || artifactInfoFilers.isEmpty() )
+        if ( artifactInfoFilters == null || artifactInfoFilters.isEmpty() )
         {
             return true;
         }
 
-        for ( ArtifactInfoFiler filter : artifactInfoFilers )
+        for ( ArtifactInfoFilter filter : artifactInfoFilters )
         {
             if ( !filter.addArtifactInResult( artifactInfo, currentResult ) )
             {
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFiler.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFiler.java
deleted file mode 100644 (file)
index 0789702..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.apache.archiva.indexer.search;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.maven.index.ArtifactInfo;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Olivier Lamy
- */
-public class NoClassifierArtifactInfoFiler
-    implements ArtifactInfoFiler
-{
-    public static final NoClassifierArtifactInfoFiler INSTANCE = new NoClassifierArtifactInfoFiler();
-
-    public static final List<? extends ArtifactInfoFiler> LIST = Arrays.asList( INSTANCE );
-
-    public boolean addArtifactInResult( ArtifactInfo artifact, Map<String, SearchResultHit> currentResult )
-    {
-        return StringUtils.isBlank( artifact.classifier );
-    }
-}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFilter.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFilter.java
new file mode 100644 (file)
index 0000000..d34f0b7
--- /dev/null
@@ -0,0 +1,42 @@
+package org.apache.archiva.indexer.search;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.index.ArtifactInfo;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Olivier Lamy
+ */
+public class NoClassifierArtifactInfoFilter
+    implements ArtifactInfoFilter
+{
+    public static final NoClassifierArtifactInfoFilter INSTANCE = new NoClassifierArtifactInfoFilter();
+
+    public static final List<? extends ArtifactInfoFilter> LIST = Arrays.asList( INSTANCE );
+
+    public boolean addArtifactInResult( ArtifactInfo artifact, Map<String, SearchResultHit> currentResult )
+    {
+        return StringUtils.isBlank( artifact.classifier );
+    }
+}