org.repoweb.model
Interface Repository

All Known Implementing Classes:
FailSafeRepository, FileRepository, JarRepository

public interface Repository

A Maven repository.


Method Summary
 Artifact buildPom(Project project)
          Build a new POM in the repository.
 ArtifactList findArtifactByClass(java.lang.String fullClassName)
          Search Artifacts that contains a class.
 ArtifactList findArtifacts(java.lang.String groupId, java.lang.String typeId, java.lang.String filename)
          Search for Artifacts.
 GroupList findGroups(java.lang.String pattern)
          Search groups that have a groupId that match pattern.
 GroupList getAllGroups()
          Get alll groups of this repository.
 Artifact getArtifact(java.lang.String groupId, java.lang.String typeId, java.lang.String filename)
          Get one Artifact.
 Group getGroup(java.lang.String groupId)
          Get a group from this repository.
 

Method Detail

getAllGroups

public GroupList getAllGroups()
Get alll groups of this repository.

Returns:
List of groups.

getGroup

public Group getGroup(java.lang.String groupId)
               throws UnknownGroupIdException
Get a group from this repository.

Parameters:
groupId - group Id.
Returns:
One group.
Throws:
UnknownGroupIdException - group Id does not exist in the repo.

getArtifact

public Artifact getArtifact(java.lang.String groupId,
                            java.lang.String typeId,
                            java.lang.String filename)
                     throws UnknownArtifactException
Get one Artifact.

Parameters:
groupId - Group Id of the artifact (e.g. 'junit')
typeId - Artifact type (e.g. 'jar')
filename - Artifact file name (e.g. 'junit-3.8.1.jar')
Returns:
an Artifact.
Throws:
UnknownArtifactException - artifact do not exist in the repo.

findGroups

public GroupList findGroups(java.lang.String pattern)
Search groups that have a groupId that match pattern.

Parameters:
pattern - pattern for search
Returns:
List of groups.

findArtifacts

public ArtifactList findArtifacts(java.lang.String groupId,
                                  java.lang.String typeId,
                                  java.lang.String filename)
Search for Artifacts.

Parameters:
groupId - Group Id of the artifact (e.g. 'junit')
typeId - Artifact type (e.g. 'jar')
filename - Artifact file name (e.g. 'junit-3.8.1.jar')
Returns:
an Artifact.

findArtifactByClass

public ArtifactList findArtifactByClass(java.lang.String fullClassName)
Search Artifacts that contains a class.

Parameters:
fullClassName - full qualified class name
Returns:
List of artifacts containing the searched class.

buildPom

public Artifact buildPom(Project project)
                  throws BuildFailureException
Build a new POM in the repository.

Parameters:
project - the bean of the POM.
Returns:
the Artifact that represent the POM.
Throws:
BuildFailureException - Failed to build the POM.


Copyright © 2003-2005 Repoweb. All Rights Reserved.