aQute.bnd.service
Interface RepositoryPlugin

All Known Implementing Classes:
FileRepo, MavenRepository

public interface RepositoryPlugin


Method Summary
 boolean canWrite()
          Answer if this repository can be used to store files.
 File[] get(String bsn, String range)
          Return a URL to a matching version of the given bundle.
 String getName()
           
 List<String> list(String regex)
          Return a list of bsns that are present in the repository.
 File put(Jar jar)
          Put a JAR file in the repository.
 List<Version> versions(String bsn)
          Return a list of versions.
 

Method Detail

get

File[] get(String bsn,
           String range)
           throws Exception
Return a URL to a matching version of the given bundle.

Parameters:
bsn - Bundle-SymbolicName of the searched bundle
range - Version range for this bundle,"latest" if you only want the latest, or null when you want all.
Returns:
A list of URLs sorted on version, lowest version is at index 0. null is returned when no files with the given bsn ould be found.
Throws:
Exception - when anything goes wrong

canWrite

boolean canWrite()
Answer if this repository can be used to store files.

Returns:
true if writable

put

File put(Jar jar)
         throws Exception
Put a JAR file in the repository.

Parameters:
jar -
Throws:
Exception

list

List<String> list(String regex)
Return a list of bsns that are present in the repository.

Parameters:
regex - if not null, match against the bsn and if matches, return otherwise skip
Returns:
A list of bsns that match the regex parameter or all if regex is null

versions

List<Version> versions(String bsn)
Return a list of versions.


getName

String getName()
Returns:
The name of the repository


Copyright © 2010 aQute SARL. All Rights Reserved.