Package org.apache.maven.index

Examples of org.apache.maven.index.ArtifactInfoFilter


        // make length unknown (since it will be known only in the moment of actual content pull)
        item.setLength(-1);

        RepositoryData data = new RepositoryData(repository.getId(),
          ((DefaultIndexerManager)indexerManager).getRepositoryIndexContext(repository),
          new ArtifactInfoFilter()
          {
            @Override
        public boolean accepts(IndexingContext ctx, ArtifactInfo ai) {
              return indexArtifactFilter.filterArtifactInfo(ai);
            }
View Full Code Here


    IteratorSearchRequest req = new IteratorSearchRequest(bq);

    List<ArtifactInfoFilter> filters = new ArrayList<ArtifactInfoFilter>();

    // security filter
    filters.add(new ArtifactInfoFilter()
    {
      public boolean accepts(IndexingContext ctx, ArtifactInfo ai) {
        return indexArtifactFilter.filterArtifactInfo(ai);
      }
    });
View Full Code Here

    if (cTerm != null) {
      if (Field.NOT_PRESENT.equalsIgnoreCase(cTerm)) {
        // bq.add( createQuery( MAVEN.CLASSIFIER, Field.NOT_PRESENT, SearchType.KEYWORD ),
        // BooleanClause.Occur.MUST_NOT );
        // This above should work too! -- TODO: fixit!
        filters.add(0, new ArtifactInfoFilter()
        {
          public boolean accepts(IndexingContext ctx, ArtifactInfo ai) {
            return Strings.isNullOrEmpty(ai.classifier);
          }
        });
View Full Code Here

  @Override
  public ContentLocator generateContent(Repository repository, String path, StorageFileItem item)
      throws IllegalOperationException, ItemNotFoundException, LocalStorageException
  {
    ArtifactInfoFilter artifactInfoFilter = new ArtifactInfoFilter()
    {
      public boolean accepts(IndexingContext ctx, ArtifactInfo ai) {
        return indexArtifactFilter.filterArtifactInfo(ai);
      }
    };
View Full Code Here

TOP

Related Classes of org.apache.maven.index.ArtifactInfoFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.