Package de.mnl.osgi.bnd.maven
Class BoundRevision
- java.lang.Object
 - 
- de.mnl.osgi.bnd.maven.BoundRevision
 
 
- 
- All Implemented Interfaces:
 Comparable<BoundRevision>
public class BoundRevision extends Object implements Comparable<BoundRevision>
A revision with a reference to the maven repository in which it was found.This class resorts to a delegation pattern as second best solution, because
Revisionhas only an invisible constructor and can therefore not be extended. The drawback is that the information about the repository doesn't propagate, i.e. you cannot retrieve it from an ordinaryArchiverelated to thisBoundRevision. If you need the information, you have to use aBoundArchiveinstead.- See Also:
 - Related bnd issue
 
 
- 
- 
Constructor Summary
Constructors Constructor Description BoundRevision(aQute.maven.provider.MavenBackingRepository mavenBackingRepository, aQute.maven.api.Revision revision)Instantiates a new bound revision. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoundArchivearchive()Get the default archive (extension "jar", no classifier) for this revision.BoundArchivearchive(MavenVersion version, String extension, String classifier)Get an archive from this revision.BoundArchivearchive(String extension, String classifier)Get a bound archive from this revision.StringartifactId()Returns the artifact id.intcompareTo(aQute.maven.api.Revision other)Compare to other revision.intcompareTo(BoundRevision other)Compare to other revision.booleanequals(Object obj)Equals.aQute.maven.api.ArchivegetPomArchive()Gets the pom archive.StringgroupId()Returns the group id.inthashCode()Hash code.booleanisSnapshot()Checks if is snapshot.aQute.maven.provider.MavenBackingRepositorymavenBackingRepository()Gets the maven backing repository.Stringmetadata()Returns the Metadata.Stringmetadata(String id)Returns the metadata for the given id.aQute.maven.api.ArchivepomArchive()Return the pom archive.StringtoString()Returns the revision with the origin repository attached in square brackets.aQute.maven.api.Revisionunbound()Gets the revision.MavenVersionversion()Returns the version. 
 - 
 
- 
- 
Constructor Detail
- 
BoundRevision
public BoundRevision(aQute.maven.provider.MavenBackingRepository mavenBackingRepository, aQute.maven.api.Revision revision)
Instantiates a new bound revision.- Parameters:
 mavenBackingRepository- the maven backing repositoryrevision- the revision
 
 - 
 
- 
Method Detail
- 
mavenBackingRepository
public final aQute.maven.provider.MavenBackingRepository mavenBackingRepository()
Gets the maven backing repository.- Returns:
 - the mavenBackingRepository
 
 
- 
unbound
public aQute.maven.api.Revision unbound()
Gets the revision.- Returns:
 - the revision
 
 
- 
artifactId
public String artifactId()
Returns the artifact id.- Returns:
 - the id
 
 
- 
version
public MavenVersion version()
Returns the version.- Returns:
 - the version
 
 
- 
isSnapshot
public boolean isSnapshot()
Checks if is snapshot.- Returns:
 - true, if is snapshot
 - See Also:
 Revision.isSnapshot()
 
- 
archive
public BoundArchive archive(String extension, String classifier)
Get a bound archive from this revision.- Parameters:
 extension- the archive's extension (ornullfor "jar")classifier- the archive's classifier (ornullfor "")- Returns:
 - the archive
 - See Also:
 Revision.archive(java.lang.String, java.lang.String)
 
- 
archive
public BoundArchive archive()
Get the default archive (extension "jar", no classifier) for this revision.- Returns:
 - the archive
 - See Also:
 Revision.archive(java.lang.String, java.lang.String)
 
- 
archive
public BoundArchive archive(MavenVersion version, String extension, String classifier)
Get an archive from this revision.- Parameters:
 version- the versionextension- the archive's extension (ornullfor "jar")classifier- the archive's classifier (ornullfor "")- Returns:
 - the archive
 
 
- 
metadata
public String metadata()
Returns the Metadata.- Returns:
 - the string
 - See Also:
 Revision.metadata()
 
- 
metadata
public String metadata(String id)
Returns the metadata for the given id.- Parameters:
 id- the id- Returns:
 - the string
 - See Also:
 Revision.metadata(java.lang.String)
 
- 
toString
public String toString()
Returns the revision with the origin repository attached in square brackets. 
- 
pomArchive
public aQute.maven.api.Archive pomArchive()
Return the pom archive.- Returns:
 - the archive
 - See Also:
 Revision.pomArchive()
 
- 
getPomArchive
public aQute.maven.api.Archive getPomArchive()
Gets the pom archive.- Returns:
 - the pom archive
 - See Also:
 Revision.getPomArchive()
 
- 
compareTo
public int compareTo(aQute.maven.api.Revision other)
Compare to other revision. Ignores repository.- Parameters:
 other- the other- Returns:
 - the int
 - See Also:
 Revision.compareTo(aQute.maven.api.Revision)
 
- 
compareTo
public int compareTo(BoundRevision other)
Compare to other revision. Ignores repository.- Specified by:
 compareToin interfaceComparable<BoundRevision>- Parameters:
 other- the other- Returns:
 - the int
 - See Also:
 Revision.compareTo(aQute.maven.api.Revision)
 
- 
hashCode
public int hashCode()
Hash code. Ignores repository. 
 - 
 
 -