private void validateServiceRegistration(QName name) { if (getConfig().getComposite() == null) { return; } for (ComponentModel component : getConfig().getComposite().getComponents()) { for (ComponentServiceModel service : component.getServices()) { if (service.getQName().equals(name)) { throw BaseDeployMessages.MESSAGES.serviceRegHidesService(name.toString(), service.toString()); } } } } }
/** * Retrieve the component service config for the specified service name. * @param name component service name * @return component service config fragment, or null if the service does not exist */ public ComponentServiceModel getComponentService(String name) { for (ComponentModel component : getMergedSwitchYardConfig().getComposite().getComponents()) { for (ComponentServiceModel service : component.getServices()) { if (service.getName().equals(name)) { return service; } } } // no matching service return null; }
/** * Retrieve the component reference config for the specified reference name. * @param name component reference name * @return component reference config fragment, or null if the reference does not exist */ public ComponentReferenceModel getComponentReference(String name) { for (ComponentModel component : getMergedSwitchYardConfig().getComposite().getComponents()) { for (ComponentReferenceModel reference : component.getReferences()) { if (reference.getName().equals(name)) { return reference; } } } // no matching reference return null; }
private void addComponents() { _componentServices = new LinkedHashMap<QName, ComponentService>(); if (getConfig().getComposite().getComponents() == null) { return; } for (ComponentModel component : getConfig().getComposite().getComponents()) { // TODO: we need a separate node for components, to support cases // where the component implements no services. Should also consider // multiple services per component. if (component.getServices().size() > 0) { ComponentServiceModel service = component.getServices().get(0); if (service.getInterface() == null || EsbInterfaceModel.ESB.equals(service.getInterface().getType())) { _componentServices.put(service.getQName(), new BaseNoopComponentService(service, component, this)); } else if (InterfaceModel.JAVA.equals(service.getInterface().getType())) { _componentServices.put(service.getQName(), new BaseJavaComponentService(service, component, this)); } else if (InterfaceModel.WSDL.equals(service.getInterface().getType())) { _componentServices.put(service.getQName(), new BaseWsdlComponentService(service, component, this)); } } } }
String componentReferenceName = (namesCount == 2) ? names[1] : null; boolean componentMissing = true; componentLoop: for (ComponentModel component : composite.getComponents()) { if (componentName.equals(component.getName())) { List<ComponentReferenceModel> componentReferences = component.getReferences();
String componentReferenceName = (namesCount == 2) ? names[1] : null; boolean componentMissing = true; componentLoop: for (ComponentModel component : composite.getComponents()) { if (componentName.equals(component.getName())) { List<ComponentReferenceModel> componentReferences = component.getReferences();
String componentName = names[0]; String componentServiceName = (namesCount == 2) ? names[1] : null; for (ComponentModel component : composite.getComponents()) { if (componentName.equals(component.getName())) { List<ComponentServiceModel> componentServices = component.getServices();
String componentName = names[0]; String componentServiceName = (namesCount == 2) ? names[1] : null; for (ComponentModel component : composite.getComponents()) { if (componentName.equals(component.getName())) { List<ComponentServiceModel> componentServices = component.getServices();
for (ComponentModel component : composite.getComponents()) { if (component.getImplementation() != null) { types.add(component.getImplementation().getType());
for (Iterator<ComponentModel> userConfigComponents = userConfig.getComposite().getComponents().iterator(); userConfigComponents.hasNext();) { ComponentModel componentModel = userConfigComponents.next(); if (componentModel.getName().equals(componentName)) { for (ComponentModel componentModel : mergedConfig.getComposite().getComponents()) { if (componentModel.getName().equals(componentName)) { componentModel.addReference(reference);
for (ComponentModel component : _model.getComposite().getComponents()) { ComponentImplementationModel impl = component.getImplementation(); if (impl == null) {
for (ComponentModel component : _model.getComposite().getComponents()) { ComponentImplementationModel impl = component.getImplementation(); if (impl == null) {
CompositeModel composite = switchYard.getMergedSwitchYardConfig().getComposite(); if (composite != null) { Iterator<ComponentModel> components = composite.getComponents().iterator(); while (components.hasNext()) { ComponentModel auxComponent = components.next();
SwitchYardFacet switchYard = _project.getFacet(SwitchYardFacet.class); ComponentModel component = null; for (ComponentModel c : switchYard.getSwitchYardConfig().getComposite().getComponents()) { if (c.getName().equals(componentName)) { component = c; for (ComponentModel c : switchYard.getMergedSwitchYardConfig().getComposite().getComponents()) { if (c.getName().equals(componentName)) { out.println(out.renderColor(ShellColor.YELLOW, "Component " + componentName + " is defined by annotation and not in switchyard.xml."));
return; for (ComponentModel component : getConfig().getComposite().getComponents()) { Activator activator = findActivator(component); if (activator == null) {
for (ComponentModel component : config.getComposite().getComponents()) { out.print(out.renderColor(ShellColor.BOLD, "component: ")); out.println(component.getName());