Return-Path: Delivered-To: apmail-archiva-dev-archive@www.apache.org Received: (qmail 77346 invoked from network); 10 Jun 2010 19:25:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Jun 2010 19:25:12 -0000 Received: (qmail 91519 invoked by uid 500); 10 Jun 2010 19:25:12 -0000 Delivered-To: apmail-archiva-dev-archive@archiva.apache.org Received: (qmail 91377 invoked by uid 500); 10 Jun 2010 19:25:12 -0000 Mailing-List: contact dev-help@archiva.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@archiva.apache.org Delivered-To: mailing list dev@archiva.apache.org Received: (qmail 91358 invoked by uid 99); 10 Jun 2010 19:25:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jun 2010 19:25:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of esudharaka@gmail.com designates 209.85.212.42 as permitted sender) Received: from [209.85.212.42] (HELO mail-vw0-f42.google.com) (209.85.212.42) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jun 2010 19:25:03 +0000 Received: by vws13 with SMTP id 13so238122vws.15 for ; Thu, 10 Jun 2010 12:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=yVe5mQ11PN1Q1+wyLfZbU/NBmeVuDORr9Tcvzza1Yi8=; b=STOXz+WJ2gcfAOvDv3q1tm4apYXEA108MPdKepmqpwOA3LHuk+34r2PPrrJFu0OnDF 9lalQ0KyaJW8nVYwd0ykOqvSUsz4qwm69niBC3AMvAv5rNd+oPFFF8WdsxcTbEpzJZ5m VI+vJkHQphUkDPkcVcsnZyh4QneRugFrLD6nI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=LLdpyHARoz6g3B8oJKrO9y73SPVvZygz5KqQLA5eERY1hH4uVE9XDHscgx6sXz43LQ z6MOMla4Tj2xPxkbRUcFEanvB9cC2wEPmSiShZABlHAsys09GiDl2opZ/8ndEiA4HtM5 v4ycIPWT0oFAmf6jYBXWGPOXeFWvY6hnkuGJU= MIME-Version: 1.0 Received: by 10.224.73.79 with SMTP id p15mr611375qaj.21.1276197882507; Thu, 10 Jun 2010 12:24:42 -0700 (PDT) Received: by 10.229.229.133 with HTTP; Thu, 10 Jun 2010 12:24:42 -0700 (PDT) In-Reply-To: References: Date: Fri, 11 Jun 2010 00:54:42 +0530 Message-ID: Subject: Re: design for sourceArtifactDetails class From: Eshan Sudharaka To: dev@archiva.apache.org Content-Type: multipart/alternative; boundary=00c09f88cfc37334b90488b1f9aa X-Virus-Checked: Checked by ClamAV on apache.org --00c09f88cfc37334b90488b1f9aa Content-Type: text/plain; charset=ISO-8859-1 I tried to get some services from the DefaultMetaDataResolver class. Since i dont have following objects it is throwing nul pointer exceptions. * private MetadataRepository metadataRepository; * private StorageMetadataResolver storageResolver; stack trace : java.lang.NullPointerException at org.apache.archiva.metadata.repository.DefaultMetadataResolver.getRootNamespaces(DefaultMetadataResolver.java:122) As deng mentioned those objects are injected by plexes by the @plexus.requirement annotation. But here that annotation is commented. But in components.xml i saw those objects as reqiurements. Here actually I want to know how do we inject those objects when we are using that DefaultMetadataResolver class in another module.? thankz. On Thu, Jun 10, 2010 at 12:05 PM, Deng Ching wrote: > On Fri, Jun 4, 2010 at 8:49 AM, Eshan Sudharaka >wrote: > > > get info about the source repo : > > > > * can we have a implementation of following method in Metadata > Resolver > > class. > > > > > public Collection getArtifacts( String > repoId, > > String namespace, String projectId, > > String > projectVersion > > ) > > > Isn't this already part of the MetadataResolver? > > > > here we need to set the repoId and the list of > > > > 1).available namespaces > > > > * i had a look in to FileMetadataRepository class > > > > public Collection getNamespaces( String > > repoId, String baseNamespace ) > > so what is this baseNamespace ..? > > > > This is the same as the rootNamespace.. > > > > i think if we can pass this basename we can get the > > list of available namespaces > > > > 2). available list of projectId > > > > * public Collection getProjects( String > repoId, > > String namespace ) > > we can use impl of this method. > > > > > > 3). available project versions list > > > > * public Collection getProjectVersions( > > String repoId, String namespace, String projectId ) > > 4). repo id -this is our input to the system > > > > after getting details we can map repoId, namespace, > > projectId, projectVersion for a particular project. > > > > > > I had a problem regarding getArtifacts method mensioned in > above. > > We are passing parameters for a particula artifact. so how it returns a > > list > > of > > ArtifactMetadata ..? > > > > > Remember, the MetadataResolver is for the metadata repository that's why it > returns a list of ArtifactMetadata :) > > Thanks, > Deng > -- P.A.Eshan Sudharaka Dept of Computer Science and Engineering University of Moratuwa Sri Lanka --00c09f88cfc37334b90488b1f9aa--