private void addReferences() { _references = new LinkedHashMap<QName, Reference>(); if (getConfig().getComposite().getReferences() == null) { return; } for (CompositeReferenceModel ref : getConfig().getComposite().getReferences()) { _references.put(ref.getQName(), new BaseReference(ref, this)); } }
/** * Retrieve the composite reference config for the specified reference name. * @param name composite reference name * @return composite reference config fragment, or null if the reference does not exist */ public CompositeReferenceModel getCompositeReference(String name) { for (CompositeReferenceModel reference : getSwitchYardConfig().getComposite().getReferences()) { if (reference.getName().equals(name)) { return reference; } } // no matching reference return null; }
/** * Lookup camel reference binding model in SCA configuration and use Switchard * model as root and return first element from it. * * @param config Configuration location. * @return Camel binding. * @throws Exception In case of any problems exception is not handled. */ @SuppressWarnings("unchecked") protected T getFirstCamelReferenceBinding(final String config) throws Exception { final InputStream in = Classes.getResourceAsStream(config, getClass()); final SwitchYardModel model = new ModelPuller<SwitchYardModel>().pull(in); final List<CompositeReferenceModel> services = model.getComposite().getReferences(); final CompositeReferenceModel compositeServiceModel = services.get(0); final List<BindingModel> bindings = compositeServiceModel.getBindings(); return (T) bindings.get(0); }
/** * Lookup camel reference binding model in SCA configuration and use Switchard * model as root and return first element from it. * * @param config Configuration location. * @return Camel binding. * @throws Exception In case of any problems exception is not handled. */ @SuppressWarnings("unchecked") protected T getFirstCamelReferenceBinding(final String config) throws Exception { final InputStream in = Classes.getResourceAsStream(config, getClass()); final SwitchYardModel model = new ModelPuller<SwitchYardModel>().pull(in); final List<CompositeReferenceModel> services = model.getComposite().getReferences(); final CompositeReferenceModel compositeServiceModel = services.get(0); final List<BindingModel> bindings = compositeServiceModel.getBindings(); return (T) bindings.get(0); }
if (composite != null) { for (CompositeReferenceModel reference : composite.getReferences()) { for (BindingModel binding : reference.getBindings()) { types.add(binding.getType());
_types = new HashSet<String>(); if (_model.getComposite() != null) { for (CompositeReferenceModel reference : _model.getComposite().getReferences()) { for (BindingModel binding : reference.getBindings()) { _types.add(binding.getType());
_types = new HashSet<String>(); if (_model.getComposite() != null) { for (CompositeReferenceModel reference : _model.getComposite().getReferences()) { for (BindingModel binding : reference.getBindings()) { _types.add(binding.getType());
for (CompositeReferenceModel reference : composite.getReferences()) { for (BindingModel binding : reference.getBindings()) { if (binding instanceof JCABindingModel) {
for (CompositeReferenceModel reference : composite.getReferences()) { for (BindingModel binding : reference.getBindings()) { if (binding instanceof JCABindingModel) {
return; for (CompositeReferenceModel reference : composite.getReferences()) { int bindingCount = 0; for (BindingModel binding : reference.getBindings()) {
compositeReferenceLoop: for (CompositeReferenceModel compositeReference : getConfig().getComposite().getReferences()) { for (ComponentReferenceModel componentReference : compositeReference.getComponentReferences()) { if (componentReference != null && componentReference.equals(reference)) {
for (CompositeReferenceModel reference : config.getComposite().getReferences()) { out.print(out.renderColor(ShellColor.BOLD, "reference: ")); out.println(reference.getName());