use of org.apache.aries.blueprint.reflect.PassThroughMetadataImpl in project aries by apache.
the class BaseNameSpaceHandlerSetup method parseCDR.
protected ComponentDefinitionRegistry parseCDR(String name) throws Exception {
Parser p = new Parser();
URL bpxml = this.getClass().getResource(name);
p.parse(Arrays.asList(bpxml));
Set<URI> nsuris = p.getNamespaces();
NamespaceHandlerSet nshandlers = nhri.getNamespaceHandlers(nsuris, b);
ComponentDefinitionRegistry cdr = new ComponentDefinitionRegistryImpl();
cdr.registerComponentDefinition(new PassThroughMetadataImpl("blueprintBundle", b));
p.populate(nshandlers, cdr);
return cdr;
}
use of org.apache.aries.blueprint.reflect.PassThroughMetadataImpl in project aries by apache.
the class BlueprintContainerImpl method init.
public void init(boolean validate) throws Exception {
// Parse xml resources
Parser parser = new Parser();
parser.parse(getResources());
// Check namespaces
Set<URI> namespaces = parser.getNamespaces();
// Create handler set
NamespaceHandlerSet handlerSet = createNamespaceHandlerSet(namespaces);
// Add predefined beans
componentDefinitionRegistry.registerComponentDefinition(new PassThroughMetadataImpl("blueprintContainer", this));
if (validate) {
// Validate
parser.validate(handlerSet.getSchema());
}
// Populate
parser.populate(handlerSet, componentDefinitionRegistry);
// Create repository
repository = new NoOsgiRecipeBuilder(this, tempRecipeIdSpace).createRepository();
// Processors handling
processTypeConverters();
processProcessors();
// Instantiate eager singletons
instantiateEagerComponents();
}
use of org.apache.aries.blueprint.reflect.PassThroughMetadataImpl in project aries by apache.
the class BlueprintContainerImpl method resetComponentDefinitionRegistry.
protected void resetComponentDefinitionRegistry() {
this.componentDefinitionRegistry.reset();
componentDefinitionRegistry.registerComponentDefinition(new PassThroughMetadataImpl("blueprintContainer", this));
componentDefinitionRegistry.registerComponentDefinition(new PassThroughMetadataImpl("blueprintBundle", bundle));
componentDefinitionRegistry.registerComponentDefinition(new PassThroughMetadataImpl("blueprintBundleContext", bundleContext));
componentDefinitionRegistry.registerComponentDefinition(new PassThroughMetadataImpl("blueprintConverter", converter));
}
Aggregations