archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eshan Sudharaka <esudhar...@gmail.com>
Subject Re: design for sourceArtifactDetails class
Date Thu, 10 Jun 2010 19:24:42 GMT
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 <oching@apache.org> wrote:

> On Fri, Jun 4, 2010 at 8:49 AM, Eshan Sudharaka <esudharaka@gmail.com
> >wrote:
>
> >  get  info about  the source repo :
> >
> >    * can we have a implementation of following method in Metadata
> Resolver
> > class.
> >
>
> >            public Collection<ArtifactMetadata> 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<String> 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<String> getProjects( String
> repoId,
> > String namespace )
> >                   we can use impl of this method.
> >
> >
> >                3). available project versions list
> >
> >                     *   public Collection<String> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message