A Swiss Army Knife for OSGi

aQute.bnd.service
Interface RepositoryPlugin

All Known Subinterfaces:
RemoteRepositoryPlugin

public interface RepositoryPlugin


Nested Class Summary
static class RepositoryPlugin.Strategy
           
 
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)
          Deprecated. 
 java.io.File get(java.lang.String bsn, java.lang.String range, RepositoryPlugin.Strategy strategy, java.util.Map<java.lang.String,java.lang.String> properties)
          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

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

get

java.io.File get(java.lang.String bsn,
                 java.lang.String range,
                 RepositoryPlugin.Strategy strategy,
                 java.util.Map<java.lang.String,java.lang.String> properties)
                 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.
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:
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

Licensed under Apache Software License 2.0

Copyright å© aQute SARL (2000, 2011). All Rights Reserved.