@Test public void testRepositoryContent() throws Exception { Requirement freq = new IdentityRequirementBuilder("camel.core.feature", (String) null).getRequirement(); Repository repository = ServiceLocator.getRequiredService(Repository.class); Collection<Capability> providers = repository.findProviders(freq); Assert.assertEquals("One provider", 1, providers.size()); } }
public IdentityRequirementBuilder(String symbolicName, VersionRange range, Map<String, Object> atts, Map<String, String> dirs) { super(IdentityNamespace.IDENTITY_NAMESPACE, symbolicName); if (range != null) { getAttributes().put(IdentityNamespace.CAPABILITY_VERSION_ATTRIBUTE, range); } if (atts != null) { getAttributes().putAll(atts); } if (dirs != null) { getDirectives().putAll(dirs); } } }
Requirement req = new IdentityRequirementBuilder(identity).getRequirement(); Set<ResourceHandle> result = provisioner.provisionResources(Collections.singleton(req));
Requirement req = new IdentityRequirementBuilder(resB.getIdentity()).getRequirement(); Set<ResourceHandle> result = provisioner.provisionResources(Collections.singleton(req));