public abstract class AbstractRepository extends Object implements XRepository
XRepository that does nothing.PROPERTY_MAVEN_REPOSITORY_BASE_URLS, PROPERTY_REPOSITORY_STORAGE_DIR, PROPERTY_REPOSITORY_STORAGE_FILEURL| Constructor and Description |
|---|
AbstractRepository() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
adapt(Class<T> type)
Adapt this repository tor the given type
|
Map<org.osgi.resource.Requirement,Collection<org.osgi.resource.Capability>> |
findProviders(Collection<? extends org.osgi.resource.Requirement> reqs)
Find the capabilities that match the specified requirements.
|
abstract Collection<org.osgi.resource.Capability> |
findProviders(org.osgi.resource.Requirement req)
Find the capabilities that match the specified requirement.
|
Promise<Collection<org.osgi.resource.Resource>> |
findProviders(RequirementExpression re)
Find the resources that match the specified requirement expression.
|
ExpressionCombiner |
getExpressionCombiner()
Return an expression combiner.
|
String |
getName()
Get the name for this repository
|
protected OSGiMetaData |
getOSGiMetaData(XResource resource) |
protected OSGiMetaData |
getOSGiMetaDataFromManifest(XResource resource) |
protected XResourceBuilder<XResource> |
getResourceBuilder(XResource resource) |
protected Manifest |
getResourceManifest(XResource resource) |
protected XResource |
getTargetResource(XResource resource)
Convert the given resource into the target resource type.
|
RequirementBuilder |
newRequirementBuilder(String namespace)
Return a new
RequirementBuilder which provides a convenient way
to create a requirement. |
public String getName()
XRepositorygetName in interface XRepositorypublic <T> T adapt(Class<T> type)
XRepositoryadapt in interface XRepositorypublic Map<org.osgi.resource.Requirement,Collection<org.osgi.resource.Capability>> findProviders(Collection<? extends org.osgi.resource.Requirement> reqs)
RepositoryfindProviders in interface Repositoryreqs - The requirements for which matching capabilities
should be returned. Must not be null.size() may result in a long
running operation.public abstract Collection<org.osgi.resource.Capability> findProviders(org.osgi.resource.Requirement req)
XRepositoryfindProviders in interface XRepositoryreq - The requirements for which matching capabilities
should be returned. Must not be null.public Promise<Collection<org.osgi.resource.Resource>> findProviders(RequirementExpression re)
RepositoryfindProviders in interface Repositoryre - The RequirementExpression for which matching
capabilities should be returned. Must not be null.Resources. If there
are no matching resources, an empty collection is returned. The
returned collection is the property of the caller and can be
modified by the caller. The returned collection may be lazily
populated, so calling size() may result in a long running
operation.public ExpressionCombiner getExpressionCombiner()
Repositoryand, or and
not operators.getExpressionCombiner in interface RepositoryExpressionCombiner.public RequirementBuilder newRequirementBuilder(String namespace)
RepositoryRequirementBuilder which provides a convenient way
to create a requirement.
For example:
Requirement myReq = repository.newRequirementBuilder("org.foo.ns1").
addDirective("filter", "(org.foo.ns1=val1)").
addDirective("cardinality", "multiple").build();
newRequirementBuilder in interface Repositorynamespace - The namespace for the requirement to be created.protected XResource getTargetResource(XResource resource) throws Exception
Exceptionprotected XResourceBuilder<XResource> getResourceBuilder(XResource resource)
protected OSGiMetaData getOSGiMetaData(XResource resource) throws IOException
IOExceptionprotected OSGiMetaData getOSGiMetaDataFromManifest(XResource resource) throws IOException
IOExceptionprotected Manifest getResourceManifest(XResource resource) throws IOException
IOExceptionCopyright © 2016 JBoss by Red Hat. All rights reserved.