public PassThroughMetadataImpl(PassThroughMetadata source) { super(source); this.object = source.getObject(); }
public PassThroughMetadataImpl(PassThroughMetadata source) { super(source); this.object = source.getObject(); }
@SuppressWarnings("unchecked") private static <T>T getComponent(ComponentDefinitionRegistry cdr, String id) { return (T)((PassThroughMetadata) cdr.getComponentDefinition(id)).getObject(); }
@Override public void process(ComponentDefinitionRegistry registry) throws ComponentDefinitionException { container = (ExtendedBlueprintContainer) ((PassThroughMetadata) registry.getComponentDefinition("blueprintContainer")).getObject(); super.process(registry); }
@Override public void process(ComponentDefinitionRegistry registry) throws ComponentDefinitionException { container = (ExtendedBlueprintContainer) ((PassThroughMetadata) registry.getComponentDefinition("blueprintContainer")).getObject(); super.process(registry); }
private Bundle getBundle(ParserContext context) { PassThroughMetadata ptm = (PassThroughMetadata) context.getComponentDefinitionRegistry().getComponentDefinition("blueprintBundle"); return (Bundle) ptm.getObject(); }
protected BlueprintContainer getBlueprintContainer(ParserContext context) { PassThroughMetadata ptm = (PassThroughMetadata) context.getComponentDefinitionRegistry().getComponentDefinition("blueprintContainer"); return (BlueprintContainer) ptm.getObject(); }
/** * Get hold of the blueprint bundle using the built in components * * @param context * @return */ private Bundle getBlueprintBundle(ParserContext context) { PassThroughMetadata metadata = (PassThroughMetadata) context .getComponentDefinitionRegistry().getComponentDefinition( "blueprintBundle"); Bundle result = null; if (metadata != null) { result = (Bundle) metadata.getObject(); } return result; }
public void process(ComponentDefinitionRegistry registry) throws ComponentDefinitionException { try { blueprintBundle = (Bundle) ((PassThroughMetadata)registry.getComponentDefinition("blueprintBundle")).getObject(); for (String name : registry.getComponentDefinitionNames()) { processMetadata(registry.getComponentDefinition(name)); } } finally { processingStack.clear(); blueprintBundle = null; } }
public void process(ComponentDefinitionRegistry registry) throws ComponentDefinitionException { try { blueprintBundle = (Bundle) ((PassThroughMetadata)registry.getComponentDefinition("blueprintBundle")).getObject(); for (String name : registry.getComponentDefinitionNames()) { processMetadata(registry.getComponentDefinition(name)); } } finally { processingStack.clear(); blueprintBundle = null; } }
Bundle b = (Bundle) ptm.getObject(); if (b.loadClass(DataFormatResolver.class.getName()) != DataFormatResolver.class) { throw new UnsupportedOperationException();
Bundle b = (Bundle) ptm.getObject(); if (b.loadClass(LanguageResolver.class.getName()) != LanguageResolver.class) { throw new UnsupportedOperationException();
Bundle b = (Bundle) ptm.getObject(); if (b.loadClass(ComponentResolver.class.getName()) != ComponentResolver.class) { throw new UnsupportedOperationException();
KSessionOptions kSessionOptions = (KSessionOptions) passThroughMetadata.getObject(); String type = kSessionOptions.getType(); String kbaseRef = kSessionOptions.getkBaseRef();
KSessionOptions kSessionOptions = (KSessionOptions) passThroughMetadata.getObject(); String type = kSessionOptions.getType(); String kbaseRef = kSessionOptions.getkBaseRef();
KBaseOptions kBaseOptions = (KBaseOptions) passThroughMetadata.getObject(); String packages = kBaseOptions.getPackages(); if ( !kBaseOptions.getPackages().isEmpty()) {
KBaseOptions kBaseOptions = (KBaseOptions) passThroughMetadata.getObject(); String packages = kBaseOptions.getPackages(); if ( !kBaseOptions.getPackages().isEmpty()) {
protected MutableBeanMetadata getBus(ParserContext context, String name) { ComponentDefinitionRegistry cdr = context.getComponentDefinitionRegistry(); ComponentMetadata meta = cdr.getComponentDefinition("blueprintBundle"); Bundle blueprintBundle = null; if (meta instanceof PassThroughMetadata) { blueprintBundle = (Bundle) ((PassThroughMetadata) meta).getObject(); } if (!cdr.containsComponentDefinition(InterceptorTypeConverter.class.getName())) { MutablePassThroughMetadata md = context.createMetadata(MutablePassThroughMetadata.class); md.setObject(new InterceptorTypeConverter()); md.setId(InterceptorTypeConverter.class.getName()); context.getComponentDefinitionRegistry().registerTypeConverter(md); } if (blueprintBundle != null && !cdr.containsComponentDefinition(name)) { //Create a bus MutableBeanMetadata bus = context.createMetadata(MutableBeanMetadata.class); bus.setId(name); bus.setRuntimeClass(BlueprintBus.class); bus.addProperty("bundleContext", createRef(context, "blueprintBundleContext")); bus.addProperty("blueprintContainer", createRef(context, "blueprintContainer")); bus.setDestroyMethod("shutdown"); bus.setInitMethod("initialize"); context.getComponentDefinitionRegistry().registerComponentDefinition(bus); return bus; } return (MutableBeanMetadata) cdr.getComponentDefinition(name); }