On Mon, Jun 7, 2010 at 6:59 AM, Eshan Sudharaka <[email protected]>wrote:
> In order to copy artifacts from one repository to another i need to get a > list of available list of artifacts in the source repository. So i need to > have a list of ArtifactMetadata objects so i can have more information > about source artifacts. > > here i am going to use following method in the DefaultMetadataResolver > class to get that list. > > public Collection<ArtifactMetadata> getArtifacts( String repoId, String > namespace, String projectId, String projectVersion ) > > but my problem is i have only one input data to get that list which is > repoId. > > may be i can generate other required parameters for the particular artifact > by using other methods in that defaultMetadataResolver class. > > so i need to know what are the thing return from following methods. > > 1). public Collection<String> getRootNamespaces( String repoId ) > for the internal repo what could be that list ..? > This returns a list of the root of the groupIds of the artifacts in the repository. For example, if the groupIds are org.apache.archiva and org.codehaus.redback, the root namespace is "org". > > 2). public Collection<String> getNamespaces( String repoId, String > namespace ) > >> what is returning here > This returns a list of the node of the specified namespace (or a chunk of the groupId) of the artifacts in the repository. Using the same example, if you have org.apache.archiva & org.codehaus.redback as the groupIds of the artifacts in the repo then you called the method getNamespaces( "internal", "org"), you'd get "apache" and "codehaus" in the list. If you passed "org.apache" as the namespace param (e.g. getNamespaces( "internal", "org.apache"), the list will only contain "archiva"), and so on.. > > 3). public Collection<String> getProjects( String repoId, String namespace > ) > >>> this will return a list of available projects in that particular > repo. eg : log4j,Junit, (list of griop id's) > here what is the namespace parameter ..? > This returns a list of the artifactIds under the specified namespace/groupId. > > 4). public Collection<String> getProjectVersions( String repoId, String > namespace, String projectId ) > >>> here we can get the list of available projects in a particular > group. > This returns a list of the versions of the specific artifact/project. > > 5). public Collection<ArtifactMetadata> getArtifacts( String repoId, > String namespace, String projectId, String projectVersion ) > > /// actually i need to get this list so i can proceed with more details. > Thanks, Deng
