aQute.bnd.service
Interface RepositoryPlugin

All Known Subinterfaces:
RemoteRepositoryPlugin
All Known Implementing Classes:
AbstractBaseOBR, EclipseRepo, FileInstallRepo, FileRepo, LocalOBR, MavenRemoteRepository, MavenRepository, OBR

public interface RepositoryPlugin


Nested Class Summary
static class RepositoryPlugin.Strategy
           
 
Method Summary
 boolean canWrite()
          Answer if this repository can be used to store files.
 File[] get(String bsn, String range)
          Deprecated. 
 File get(String bsn, String range, RepositoryPlugin.Strategy strategy, Map<String,String> properties)
          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

@Deprecated
File[] get(String bsn,
                      String range)
           throws Exception
Deprecated. 

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

get

File get(String bsn,
         String range,
         RepositoryPlugin.Strategy strategy,
         Map<String,String> properties)
         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.
strategy - Get the highest or the lowest
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)
                  throws 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:
Exception

versions

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

Throws:
Exception

getName

String getName()
Returns:
The name of the repository


Copyright © 2012 aQute SARL. All Rights Reserved.