private ComponentType getComponentType(ModelResolver resolver, JavaImplementation impl, ProcessorContext context) { String className = impl.getJavaClass().getName(); String componentTypeURI = className.replace('.', '/') + ".componentType"; ComponentType componentType = assemblyFactory.createComponentType(); componentType.setUnresolved(true); componentType.setURI(componentTypeURI); componentType = resolver.resolveModel(ComponentType.class, componentType, context); if (!componentType.isUnresolved()) { return componentType; } return null; }
public void resolve(WebImplementation implementation, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { // Resolve the component type String uri = implementation.getURI(); if (uri != null) { ComponentType componentType = assemblyFactory.createComponentType(); componentType.setURI("web.componentType"); componentType = resolver.resolveModel(ComponentType.class, componentType, context); if (!componentType.isUnresolved()) { // Initialize the implementation's services, references and properties implementation.getServices().addAll(componentType.getServices()); implementation.getReferences().addAll(componentType.getReferences()); implementation.getProperties().addAll(componentType.getProperties()); } } implementation.setUnresolved(false); }
componentType.setURI(uri.toString());
componentType.setURI(uri.toString());
componentType.setURI(uri); componentType.setUnresolved(true);
componentType.setURI(uri); componentType.setUnresolved(true);
ComponentType componentType = assemblyFactory.createComponentType(); componentType.setUnresolved(true); componentType.setURI(componentTypeURI); componentType = resolver.resolveModel(ComponentType.class, componentType, context); if (!componentType.isUnresolved()) {
componentType.setURI("OSGI-INF/sca/" + bundle.getSymbolicName() + "/bundle.componentType"); componentType.setUnresolved(true); componentType = resolver.resolveModel(ComponentType.class, componentType, context); componentType.setURI(BUNDLE_COMPONENT_TYPE); componentType = resolver.resolveModel(ComponentType.class, componentType, context);