aQute.bnd.service
Interface RepositoryPlugin


public interface RepositoryPlugin


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

Method Detail

get

java.io.File[] get(java.lang.String bsn,
                   java.lang.String range)
                   throws java.lang.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:
java.lang.Exception - when anything goes wrong

canWrite

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

Returns:
true if writable

put

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

Parameters:
jar -
Throws:
java.lang.Exception

list

java.util.List<java.lang.String> list(java.lang.String regex)
                                      throws java.lang.Exception
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
Throws:
java.lang.Exception

versions

java.util.List<Version> versions(java.lang.String bsn)
                                 throws java.lang.Exception
Return a list of versions.

Throws:
java.lang.Exception

getName

java.lang.String getName()
Returns:
The name of the repository