From: Brett Porter Date: Thu, 5 Jan 2012 07:52:48 +0000 (+0000) Subject: fix typo (filer -> filter) X-Git-Tag: archiva-1.4-M3~1643 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f48d71800f1a9e04977a710789b018f95a58d6be;p=archiva.git fix typo (filer -> filter) git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1227518 13f79535-47bb-0310-9956-ffa450edef68 --- 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 index e9f217faf..000000000 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFiler.java +++ /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 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 index 000000000..cecb8c8bf --- /dev/null +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/ArtifactInfoFilter.java @@ -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 currentResult ); +} diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java index 81b76ee5f..436e9df2e 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java @@ -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.emptyList(), + return search( limits, q, indexingContextIds, Collections.emptyList(), searchFields.getRepositories(), searchFields.isIncludePomArtifacts() ); } private SearchResults search( SearchResultLimits limits, BooleanQuery q, List indexingContextIds, - List filters, + List filters, List selectedRepos, boolean includePoms) throws RepositorySearchException { @@ -448,7 +448,7 @@ public class NexusRepositorySearch private SearchResults convertToSearchResults( FlatSearchResponse response, SearchResultLimits limits, - List artifactInfoFilers, + List artifactInfoFilters, ListselectedRepos, boolean includePoms) throws RepositoryAdminException { @@ -465,7 +465,7 @@ public class NexusRepositorySearch artifactInfo.packaging ); Map 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 artifactInfoFilers, + List artifactInfoFilters, Map 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 index 078970299..000000000 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFiler.java +++ /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 LIST = Arrays.asList( INSTANCE ); - - public boolean addArtifactInResult( ArtifactInfo artifact, Map 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 index 000000000..d34f0b7ad --- /dev/null +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFilter.java @@ -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 LIST = Arrays.asList( INSTANCE ); + + public boolean addArtifactInResult( ArtifactInfo artifact, Map currentResult ) + { + return StringUtils.isBlank( artifact.classifier ); + } +}