protected void configure(CompositeReference compositeReference, BuilderContext context) { for (ComponentReference reference : compositeReference.getPromotedReferences()) { configure(compositeReference, reference, null, context); } }
protected void configure(CompositeReference compositeReference, BuilderContext context) { for (ComponentReference reference : compositeReference.getPromotedReferences()) { configure(compositeReference, reference, null, context); } }
/** * 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); } } }
/** * 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); } } }
/** * 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); } } } }
/** * 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); } } } }
/** * 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; }
List<ComponentReference> promotedReferences = compositeReference.getPromotedReferences(); for (int i = 0, n = promotedReferences.size(); i < n; i++) { ComponentReference componentReference = promotedReferences.get(i);
List<ComponentReference> promotedReferences = compositeReference.getPromotedReferences(); for (int i = 0, n = promotedReferences.size(); i < n; i++) { ComponentReference componentReference = promotedReferences.get(i);
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;
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;
List<ComponentReference> promotedReferences = compositeReference.getPromotedReferences();
List<ComponentReference> promotedReferences = compositeReference.getPromotedReferences();
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);
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);