On Tue, Jun 8, 2010 at 5:15 PM, Eshan Sudharaka <[email protected]>wrote:

> On Tue, Jun 8, 2010 at 11:32 AM, Deng Ching <[email protected]> wrote:
>
> > On Tue, Jun 8, 2010 at 10:08 AM, Deng Ching <[email protected]> wrote:
> >
> > > On Tue, Jun 8, 2010 at 8:14 AM, Eshan Sudharaka <[email protected]
> > >wrote:
> > >
> > >> to gather the source artifacts details (actually source repo details)
> i
> > >> have planned to create a class named SourceAritfacts  and inside that
> > class
> > >> i am going to use the services of defaultmetadata data resolver class.
> > >>
> > >> structure
> > >>
> > >> List<Artifacts> SourceArtifactsList
> > >>
> > >> List<String> rootNameSpaces;  store values as org,com
> > >> List<String> groupIdList ;   >>>>>>   store values as org.apache,
> > >> org.codehaus
> > >> List<String> artifactsList;  >>>>>>   store values as
> > org.apache.archiva,
> > >> org.codehaus.redback
> > >> List<String> artifactsVersionList;  >>>>> here we store values as
> > >> org.apache.archiva-1.0 , org.apache.archiva-1.1
> > >>
> > >> void setRootNameSpaces(String repoId);
> > >> void setGruopIdList(List<String> rootNameSpaces);
> > >> void setArtifactsList(List<String> gruopIdList);
> > >> void setArtifactsVersionList(List<String> artifactsList)
> > >>
> > >
> > Hmm, I don't think you need the above setter methods and the
> corresponding
> > lists. It might be good to just maintain one list of artifact objects for
> > the artifacts in the repo..
> >
>
> >>>>  we need to get the list of available artifacts by calling
> DefaultMetaData Resolver;s methods iteratively. first we need to get the
>  root name spaces. then the  group id list and then artifact id list and
> finally the version list. then we can assign those details to the artifacts
> objects. some how we need to store those intermediate values. so what is
> the preferred data structure to store those intermediate data.?
>

OK, makes sense now. I don't think the variables should be declared globally
though and the set methods exposed publicly. Maybe you can just get the root
namespaces and have a method that recurses through the list to get the
nodes?

Anyway, these are class implementation details.. I suggest you start writing
the class (plus the unit tests) based on what we have discussed then we can
review it :)


> >
> >
> > > void setSourceArtifactList(List<String> artifactsVersionList )   >>>>>>
> > >> here retirieve values from the artifactsVersionList and create new
> > objects
> > >> of Artifacts and set the parameters and add objects to the
> > >> SourceArtifactsList
> > >>
> > >
> > Should this be getSourceArtifactList(..) instead?
> >
> >
>     ya. i think caller has to just pass repo id and then he should able to
> get the source artifact list. so we can have a method
> call getSourceArtifactList().  it will call other methods and produce the
> artifacts list.
>

+1

Thanks,
Deng

Reply via email to