private void setParameter(Endpoint endpoint, OMElement paramEle) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { String name = paramEle.getAttributeValue(new QName("name")); String value = paramEle.getText(); PropertyHelper.setInstanceProperty(name, value, endpoint); } }
protected void createConfiguration(Configuration config, Node node) { if (node == null) { String msg = "The configuration element for " + config.getClass().getName() + " is null."; throw new RuntimeException(msg); } try { // load properties for (Map.Entry<String, String> entry : node.getProperties().entrySet()) { String key = entry.getKey(); String value = entry.getValue(); PropertyHelper.setInstanceProperty(key, value, config); } } catch (Exception e) { String msg = "Error setting values to " + config.getClass().getName(); log.error(msg, e); throw new RuntimeException(msg, e); } }
private void setParameter(Endpoint endpoint, OMElement paramEle,ClassEndpoint clazzEndpoint) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { String name = paramEle.getAttributeValue(new QName("name")); String value = paramEle.getText(); if (name !=null) { PropertyHelper.setInstanceProperty(name, value, endpoint); clazzEndpoint.setParameters(name, value); } } }
setInstanceProperty(propertyName, value, o); } else {
setInstanceProperty(propertyName, value, o); } else {
String value = child.getAttribute(ATT_VALUE).getAttributeValue(); handler.addProperty(propName, value); PropertyHelper.setInstanceProperty(propName, value, handler); } else { OMNode omElt = child.getFirstElement(); if (omElt != null) { handler.addProperty(propName, omElt); PropertyHelper.setInstanceProperty(propName, omElt, handler); } else { handleException("A Class mediator property must specify " +
private static void populateParameters(OMElement handlerElem, SynapseHandler handler) { for (Iterator it = handlerElem.getChildrenWithName(PARAM_Q); it.hasNext();) { OMElement child = (OMElement) it.next(); String propName = child.getAttribute(NAME_ATT).getAttributeValue(); if (propName == null) { handleException("Synapse Handler parameter must contain the name attribute"); } else { if (child.getAttribute(VALUE_ATT) != null) { String value = child.getAttribute(VALUE_ATT).getAttributeValue(); handler.addProperty(propName, value); PropertyHelper.setInstanceProperty(propName, value, handler); } else { OMNode omElt = child.getFirstElement(); if (omElt != null) { handler.addProperty(propName, omElt); PropertyHelper.setInstanceProperty(propName, omElt, handler); } else { handleException("Synapse Handler parameter must contain " + "name and value attributes, or a name and a child XML fragment"); } } } } }
PropertyHelper.setInstanceProperty(name, getStaticSetterProperties().get(name), commandObject);
String value = child.getAttribute(ATT_VALUE).getAttributeValue(); classMediator.addProperty(propName, value); PropertyHelper.setInstanceProperty(propName, value, m); } else { OMNode omElt = child.getFirstElement(); if (omElt != null) { classMediator.addProperty(propName, omElt); PropertyHelper.setInstanceProperty(propName, omElt, m); } else { handleException("A Class mediator property must specify " +
PropertyHelper.setInstanceProperty(name, getStaticSetterProperties().get(name), commandObject);
PropertyHelper.setInstanceProperty(name, staticSetterProperties.get(name), commandObject); PropertyHelper.setInstanceProperty(name, synCtx.getProperty(contextSetterProperties.get(name)), commandObject); SynapseXPath xpath = messageSetterProperties.get(name); String value = xpath.stringValueOf(synCtx); PropertyHelper.setInstanceProperty(name, value, commandObject);
PropertyHelper.setInstanceProperty(name, staticSetterProperties.get(name), commandObject); PropertyHelper.setInstanceProperty(name, synCtx.getProperty(contextSetterProperties.get(name)), commandObject); SynapseXPath xpath = messageSetterProperties.get(name); String value = xpath.stringValueOf(synCtx); PropertyHelper.setInstanceProperty(name, value, commandObject);