fix typo (filer -> filter)

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1227518 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2012-01-05 07:52:48 +00:00
parent 25140af4f0
commit f48d71800f
3 changed files with 13 additions and 13 deletions

View File

@ -26,7 +26,7 @@ import java.util.Map;
* @author Olivier Lamy * @author Olivier Lamy
* @since 1.4-M1 * @since 1.4-M1
*/ */
public interface ArtifactInfoFiler public interface ArtifactInfoFilter
{ {
boolean addArtifactInResult( ArtifactInfo artifact, Map<String, SearchResultHit> currentResult ); boolean addArtifactInResult( ArtifactInfo artifact, Map<String, SearchResultHit> currentResult );
} }

View 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 // 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 !!! // 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." ); 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() ); searchFields.getRepositories(), searchFields.isIncludePomArtifacts() );
} }
private SearchResults search( SearchResultLimits limits, BooleanQuery q, List<String> indexingContextIds, private SearchResults search( SearchResultLimits limits, BooleanQuery q, List<String> indexingContextIds,
List<? extends ArtifactInfoFiler> filters, List<? extends ArtifactInfoFilter> filters,
List<String> selectedRepos, boolean includePoms) List<String> selectedRepos, boolean includePoms)
throws RepositorySearchException throws RepositorySearchException
{ {
@ -448,7 +448,7 @@ public class NexusRepositorySearch
private SearchResults convertToSearchResults( FlatSearchResponse response, SearchResultLimits limits, private SearchResults convertToSearchResults( FlatSearchResponse response, SearchResultLimits limits,
List<? extends ArtifactInfoFiler> artifactInfoFilers, List<? extends ArtifactInfoFilter> artifactInfoFilters,
List<String>selectedRepos, boolean includePoms) List<String>selectedRepos, boolean includePoms)
throws RepositoryAdminException throws RepositoryAdminException
{ {
@ -465,7 +465,7 @@ public class NexusRepositorySearch
artifactInfo.packaging ); artifactInfo.packaging );
Map<String, SearchResultHit> hitsMap = results.getHitsMap(); Map<String, SearchResultHit> hitsMap = results.getHitsMap();
if ( !applyArtifactInfoFilters( artifactInfo, artifactInfoFilers, hitsMap ) ) if ( !applyArtifactInfoFilters( artifactInfo, artifactInfoFilters, hitsMap ) )
{ {
continue; continue;
} }
@ -620,15 +620,15 @@ public class NexusRepositorySearch
} }
private boolean applyArtifactInfoFilters( ArtifactInfo artifactInfo, private boolean applyArtifactInfoFilters( ArtifactInfo artifactInfo,
List<? extends ArtifactInfoFiler> artifactInfoFilers, List<? extends ArtifactInfoFilter> artifactInfoFilters,
Map<String, SearchResultHit> currentResult ) Map<String, SearchResultHit> currentResult )
{ {
if ( artifactInfoFilers == null || artifactInfoFilers.isEmpty() ) if ( artifactInfoFilters == null || artifactInfoFilters.isEmpty() )
{ {
return true; return true;
} }
for ( ArtifactInfoFiler filter : artifactInfoFilers ) for ( ArtifactInfoFilter filter : artifactInfoFilters )
{ {
if ( !filter.addArtifactInResult( artifactInfo, currentResult ) ) if ( !filter.addArtifactInResult( artifactInfo, currentResult ) )
{ {

View File

@ -28,12 +28,12 @@ import java.util.Map;
/** /**
* @author Olivier Lamy * @author Olivier Lamy
*/ */
public class NoClassifierArtifactInfoFiler public class NoClassifierArtifactInfoFilter
implements ArtifactInfoFiler implements ArtifactInfoFilter
{ {
public static final NoClassifierArtifactInfoFiler INSTANCE = new NoClassifierArtifactInfoFiler(); public static final NoClassifierArtifactInfoFilter INSTANCE = new NoClassifierArtifactInfoFilter();
public static final List<? extends ArtifactInfoFiler> LIST = Arrays.asList( INSTANCE ); public static final List<? extends ArtifactInfoFilter> LIST = Arrays.asList( INSTANCE );
public boolean addArtifactInResult( ArtifactInfo artifact, Map<String, SearchResultHit> currentResult ) public boolean addArtifactInResult( ArtifactInfo artifact, Map<String, SearchResultHit> currentResult )
{ {