List<ComponentReference> promotedReferences = compositeReference.getPromotedReferences(); for (int i = 0, n = promotedReferences.size(); i < n; i++) { ComponentReference componentReference = promotedReferences.get(i); if (componentReference != null) { Component promotedComponent = compositeReference.getPromotedComponents().get(i); promotedComponent = components.get(promotedComponent.getName()); compositeReference.getPromotedComponents().set(i, promotedComponent);
protected void configure(CompositeReference compositeReference, BuilderContext context) { for (ComponentReference reference : compositeReference.getPromotedReferences()) { configure(compositeReference, reference, null, context); } }
compositeReference.setName(getString(reader, NAME)); readMultiplicity(compositeReference, reader); readTargets(compositeReference, reader); promotedComponent.setName(promotedComponentName); promotedComponent.setUnresolved(true); compositeReference.getPromotedComponents().add(promotedComponent); ComponentReference promotedReference = assemblyFactory.createComponentReference(); promotedReference.setUnresolved(true); promotedReference.setName(refName); compositeReference.getPromotedReferences().add(promotedReference); compositeReference.setWiredByImpl(getBoolean(reader, WIRED_BY_IMPL));
protected void configure(CompositeReference compositeReference, BuilderContext context) { for (ComponentReference reference : compositeReference.getPromotedReferences()) { configure(compositeReference, reference, null, context); } }
compositeReference.setName(getString(reader, NAME)); readMultiplicity(compositeReference, reader); readTargets(compositeReference, reader); promotedComponent.setName(promotedComponentName); promotedComponent.setUnresolved(true); compositeReference.getPromotedComponents().add(promotedComponent); ComponentReference promotedReference = assemblyFactory.createComponentReference(); promotedReference.setUnresolved(true); promotedReference.setName(refName); compositeReference.getPromotedReferences().add(promotedReference); compositeReference.setWiredByImpl(getBoolean(reader, WIRED_BY_IMPL));
List<ComponentReference> promotedReferences = compositeReference.getPromotedReferences(); for (int i = 0, n = promotedReferences.size(); i < n; i++) { ComponentReference componentReference = promotedReferences.get(i); if (componentReference != null) { Component promotedComponent = compositeReference.getPromotedComponents().get(i); promotedComponent = components.get(promotedComponent.getName()); compositeReference.getPromotedComponents().set(i, promotedComponent);
/** * Follow a reference promotion chain down to the innermost (non composite) * component references. * * @param compositeReference * @param componentReferences * @return */ private void collectPromotedComponentReferences(CompositeReference compositeReference, List<ComponentReference> componentReferences) { for (ComponentReference componentReference : compositeReference.getPromotedReferences()) { Reference reference = componentReference.getReference(); if (reference instanceof CompositeReference) { // Continue to follow the reference promotion chain collectPromotedComponentReferences((CompositeReference)reference, componentReferences); } else if (reference != null) { // Found a non-composite reference componentReferences.add(componentReference); } } }
implCompService.setPromotedComponent(((CompositeReference)implReference).getPromotedComponents().get(0)); implCompService.setForCallback(true); if (((CompositeReference)implReference).getPromotedReferences().get(0).isUnresolved() == false){ String serviceName = ((CompositeReference)implReference).getPromotedReferences().get(0).getName(); ComponentService promotedService = ((CompositeReference)implReference).getPromotedComponents().get(0).getService(serviceName); component.getName(), reference.getName(), ((CompositeReference)implReference).getPromotedComponents().get(0).getName(), serviceName);
/** * Follow a reference promotion chain down to the innermost (non composite) * component references. * * @param compositeReference * @param componentReferences * @return */ private void collectPromotedComponentReferences(CompositeReference compositeReference, List<ComponentReference> componentReferences) { for (ComponentReference componentReference : compositeReference.getPromotedReferences()) { Reference reference = componentReference.getReference(); if (reference instanceof CompositeReference) { // Continue to follow the reference promotion chain collectPromotedComponentReferences((CompositeReference)reference, componentReferences); } else if (reference != null) { // Found a non-composite reference componentReferences.add(componentReference); } } }
implCompService.setPromotedComponent(((CompositeReference)implReference).getPromotedComponents().get(0)); implCompService.setForCallback(true); if (((CompositeReference)implReference).getPromotedReferences().get(0).isUnresolved() == false){ String serviceName = ((CompositeReference)implReference).getPromotedReferences().get(0).getName(); ComponentService promotedService = ((CompositeReference)implReference).getPromotedComponents().get(0).getService(serviceName); component.getName(), reference.getName(), ((CompositeReference)implReference).getPromotedComponents().get(0).getName(), serviceName);
/** * Follow a reference promotion chain down to the innermost (non composite) * component references. * * @param compositeReference * @param componentReferences * @return */ private void collectPromotedComponentReferences(CompositeReference compositeReference, List<ComponentReference> componentReferences) { for (ComponentReference componentReference : compositeReference.getPromotedReferences()) { // If the user has entered an incorrect promotion string an error will be reported to // tell them but the processing will still reach here so only continue processing // if the promotion chain is well formed if (componentReference != null){ Reference reference = componentReference.getReference(); if (reference instanceof CompositeReference) { // Continue to follow the reference promotion chain collectPromotedComponentReferences((CompositeReference)reference, componentReferences); } else if (reference != null) { // Found a non-composite reference componentReferences.add(componentReference); } } } }
CompositeReference implCompReference = assemblyFactory.createCompositeReference(); implCompReference.getPromotedComponents().add(((CompositeService)implService) .getPromotedComponent()); implCompReference.getPromotedReferences().add(promotedReference); } else { Monitor.error(monitor,
/** * Follow a reference promotion chain down to the innermost (non composite) * component references. * * @param compositeReference * @param componentReferences * @return */ private void collectPromotedComponentReferences(CompositeReference compositeReference, List<ComponentReference> componentReferences) { for (ComponentReference componentReference : compositeReference.getPromotedReferences()) { // If the user has entered an incorrect promotion string an error will be reported to // tell them but the processing will still reach here so only continue processing // if the promotion chain is well formed if (componentReference != null){ Reference reference = componentReference.getReference(); if (reference instanceof CompositeReference) { // Continue to follow the reference promotion chain collectPromotedComponentReferences((CompositeReference)reference, componentReferences); } else if (reference != null) { // Found a non-composite reference componentReferences.add(componentReference); } } } }
CompositeReference implCompReference = assemblyFactory.createCompositeReference(); implCompReference.getPromotedComponents().add(((CompositeService)implService) .getPromotedComponent()); implCompReference.getPromotedReferences().add(promotedReference); } else { Monitor.error(monitor,
/** * Navigate the component/componentType inheritance chain to find the leaf contract * @param contract * @return */ private Contract getLeafContract(Contract contract) { Contract prev = null; Contract current = contract; while (current != null) { prev = current; if (current instanceof ComponentReference) { current = ((ComponentReference)current).getReference(); } else if (current instanceof CompositeReference) { current = ((CompositeReference)current).getPromotedReferences().get(0); } else if (current instanceof ComponentService) { current = ((ComponentService)current).getService(); } else if (current instanceof CompositeService) { current = ((CompositeService)current).getPromotedService(); } else { break; } if (current == null) { return prev; } } return current; }
/** * Navigate the component/componentType inheritence chain to find the leaf contract * @param contract * @return */ private Contract getLeafContract(Contract contract) { Contract prev = null; Contract current = contract; while (current != null) { prev = current; if (current instanceof ComponentReference) { current = ((ComponentReference)current).getReference(); } else if (current instanceof CompositeReference) { current = ((CompositeReference)current).getPromotedReferences().get(0); } else if (current instanceof ComponentService) { current = ((ComponentService)current).getService(); } else if (current instanceof CompositeService) { current = ((CompositeService)current).getPromotedService(); } else { break; } if (current == null) { return prev; } } return current; }
for (ComponentReference ref : compositeReference.getPromotedReferences()) {
for (ComponentReference ref : compositeReference.getPromotedReferences()) {
for (Reference reference : composite.getReferences()) { CompositeReference compositeReference = (CompositeReference)reference; if (compositeReference.getPromotedReferences().contains(componentReference)) { promoted = true; break;
for (Reference reference : composite.getReferences()) { CompositeReference compositeReference = (CompositeReference)reference; if (compositeReference.getPromotedReferences().contains(componentReference)) { promoted = true; break;