Package aQute.bnd.osgi.repository
Class BridgeRepository
- java.lang.Object
-
- aQute.bnd.osgi.repository.BridgeRepository
-
public class BridgeRepository extends java.lang.Object
Bridge an OSGi repository (requirements) and a bnd repository (bsn/version) by creating an index and providing suitable methods.This class ignores duplicate bsn/version entries
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
BridgeRepository.InfoCapability
static class
BridgeRepository.ResourceInfo
-
Field Summary
Fields Modifier and Type Field Description private static org.osgi.resource.Requirement
allRq
private static java.util.SortedSet<Version>
EMPTY_VERSIONS
private java.util.Map<java.lang.String,java.util.Map<Version,BridgeRepository.ResourceInfo>>
index
private org.osgi.service.repository.Repository
repository
-
Constructor Summary
Constructors Constructor Description BridgeRepository(org.osgi.service.repository.Repository repository)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addInformationCapability(ResourceBuilder rb, java.lang.String name, java.lang.String from, java.lang.Throwable error)
org.osgi.resource.Resource
get(java.lang.String bsn, Version version)
BridgeRepository.ResourceInfo
getInfo(java.lang.String bsn, Version version)
org.osgi.service.repository.Repository
getRepository()
private void
index()
private void
index(org.osgi.resource.Resource r)
java.util.List<java.lang.String>
list(java.lang.String pattern)
java.lang.String
title(java.lang.Object... target)
java.lang.String
tooltip(java.lang.Object... target)
java.util.SortedSet<Version>
versions(java.lang.String bsn)
-
-
-
Field Detail
-
allRq
private static final org.osgi.resource.Requirement allRq
-
EMPTY_VERSIONS
private static final java.util.SortedSet<Version> EMPTY_VERSIONS
-
repository
private final org.osgi.service.repository.Repository repository
-
index
private final java.util.Map<java.lang.String,java.util.Map<Version,BridgeRepository.ResourceInfo>> index
-
-
Method Detail
-
index
private void index() throws java.lang.Exception
- Throws:
java.lang.Exception
-
index
private void index(org.osgi.resource.Resource r) throws java.lang.Exception
- Throws:
java.lang.Exception
-
get
public org.osgi.resource.Resource get(java.lang.String bsn, Version version) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getInfo
public BridgeRepository.ResourceInfo getInfo(java.lang.String bsn, Version version) throws java.lang.Exception
- Throws:
java.lang.Exception
-
list
public java.util.List<java.lang.String> list(java.lang.String pattern) throws java.lang.Exception
- Throws:
java.lang.Exception
-
versions
public java.util.SortedSet<Version> versions(java.lang.String bsn) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getRepository
public org.osgi.service.repository.Repository getRepository()
-
addInformationCapability
public static void addInformationCapability(ResourceBuilder rb, java.lang.String name, java.lang.String from, java.lang.Throwable error)
-
tooltip
public java.lang.String tooltip(java.lang.Object... target) throws java.lang.Exception
- Throws:
java.lang.Exception
-
title
public java.lang.String title(java.lang.Object... target) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-