org.repoweb.model.jar
Class JarRepository

java.lang.Object
  extended byorg.repoweb.model.jar.JarRepository
All Implemented Interfaces:
Repository

public class JarRepository
extends java.lang.Object
implements Repository

Represent a maven repository located in the same jar file of this class. Use ClassLoader mechanism.


Constructor Summary
JarRepository(java.lang.String rootPath)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarRepository

public JarRepository(java.lang.String rootPath)
Method Detail

getAllGroups

public GroupList getAllGroups()
Description copied from interface: Repository
Get alll groups of this repository.

Specified by:
getAllGroups in interface Repository
Returns:
List of groups.

getGroup

public Group getGroup(java.lang.String groupId)
Description copied from interface: Repository
Get a group from this repository.

Specified by:
getGroup in interface Repository
Parameters:
groupId - group Id.
Returns:
One group.

getArtifact

public Artifact getArtifact(java.lang.String groupId,
                            java.lang.String typeId,
                            java.lang.String filename)
                     throws UnknownArtifactException
Description copied from interface: Repository
Get one Artifact.

Specified by:
getArtifact in interface Repository
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)
Description copied from interface: Repository
Search groups that have a groupId that match pattern.

Specified by:
findGroups in interface Repository
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)
Description copied from interface: Repository
Search for Artifacts.

Specified by:
findArtifacts in interface Repository
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)
Description copied from interface: Repository
Search Artifacts that contains a class.

Specified by:
findArtifactByClass in interface Repository
Parameters:
fullClassName - full qualified class name
Returns:
List of artifacts containing the searched class.

buildPom

public Artifact buildPom(Project project)
                  throws BuildFailureException
Description copied from interface: Repository
Build a new POM in the repository.

Specified by:
buildPom in interface 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.