public MapInfo(Element mapElement, ObjectFactoryParser configParser) { super(mapElement, configParser); List entryElements = XmlUtil.elements(mapElement); keyInfos = new ObjectInfo[entryElements.size()]; valueInfos = new ObjectInfo[entryElements.size()]; for (int i = 0; i < entryElements.size(); i++) { Element entryElement = (Element) entryElements.get(i); Element keyElement = XmlUtil.element(entryElement, "key"); Element valueElement = XmlUtil.element(entryElement, "value"); keyInfos[i] = configParser.parse(XmlUtil.element(keyElement)); valueInfos[i] = configParser.parse(XmlUtil.element(valueElement)); } }
protected static void addTemplateProperty(Element templateElement, String property, Properties templateProperties) { Element element = XmlUtil.element(templateElement, property); if (element != null) { templateProperties.setProperty(property, XmlUtil.getContentText(element)); } }
Element constructorElement = XmlUtil.element(beanElement, "constructor"); if (constructorElement != null) { if (beanElement.hasAttribute("class") && !constructorElement.hasAttribute("class")) {
public MapInfo(Element mapElement, ObjectFactoryParser configParser) { super(mapElement, configParser); List entryElements = XmlUtil.elements(mapElement); keyInfos = new ObjectInfo[entryElements.size()]; valueInfos = new ObjectInfo[entryElements.size()]; for (int i = 0; i < entryElements.size(); i++) { Element entryElement = (Element) entryElements.get(i); Element keyElement = XmlUtil.element(entryElement, "key"); Element valueElement = XmlUtil.element(entryElement, "value"); keyInfos[i] = configParser.parse(XmlUtil.element(keyElement)); valueInfos[i] = configParser.parse(XmlUtil.element(valueElement)); } }
Element constructorElement = XmlUtil.element(beanElement, "constructor"); if (constructorElement != null) { if (beanElement.hasAttribute("class") && !constructorElement.hasAttribute("class")) {
private static void addTemplateProperty(Element templateElement, String property, Properties templateProperties) { Element element = XmlUtil.element(templateElement, property); if (element != null) { templateProperties.setProperty(property, XmlUtil.getContentText(element)); } }
Element parameterInfoElement = XmlUtil.element(parameterElement); if (parameterInfoElement == null) { throw new JbpmException("missing subelement in constructor parameter");
addTemplateProperty(templateElement, "bcc", templateProperties); Element bccActorsElement = XmlUtil.element(templateElement, "bccActors"); if (bccActorsElement != null) { templateProperties.setProperty("bcc-actors", XmlUtil.getContentText(bccActorsElement));
public FieldInfo(Element fieldElement, ObjectFactoryParser configParser) { // field name if (fieldElement.hasAttribute("name")) { fieldName = fieldElement.getAttribute("name"); } else { throw new JbpmException("missing name or setter attribute in property"); } // value info Element propertyValueElement = XmlUtil.element(fieldElement); fieldValueInfo = configParser.parse(propertyValueElement); }
Element parameterInfoElement = XmlUtil.element(parameterElement); if (parameterInfoElement == null) { throw new JbpmException("missing subelement in constructor parameter");
addTemplateProperty(templateElement, "bcc", templateProperties); Element bccActorsElement = XmlUtil.element(templateElement, "bccActors"); if (bccActorsElement != null) { templateProperties.setProperty("bcc-actors", XmlUtil.getContentText(bccActorsElement));
public FieldInfo(Element fieldElement, ObjectFactoryParser configParser) { // field name if (fieldElement.hasAttribute("name")) { fieldName = fieldElement.getAttribute("name"); } else { throw new JbpmException("missing name or setter attribute in property"); } // value info Element propertyValueElement = XmlUtil.element(fieldElement); fieldValueInfo = configParser.parse(propertyValueElement); }
Element factoryElement = XmlUtil.element(serviceElement, "factory"); if (factoryElement != null) { Element factoryBeanElement = XmlUtil.element(factoryElement); if (factoryBeanElement == null) { throw new ConfigurationException("element factory requires either a bean or ref subelement"); Element saveOperationsElement = XmlUtil.element(jbpmContextElement, "save-operations"); if (saveOperationsElement != null) { List saveOperationElements = XmlUtil.elements(saveOperationsElement, "save-operation"); Element saveOperationBeanElement = XmlUtil.element(saveOperationElement); if (saveOperationBeanElement == null) { throw new ConfigurationException("element save-operation requires either a class attribute or a bean or ref subelement");
public PropertyInfo(Element propertyElement, ObjectFactoryParser configParser) { // property name if (propertyElement.hasAttribute("name")) { String propertyName = propertyElement.getAttribute("name"); if (propertyName.startsWith("is") && propertyName.length() >= 3 && Character.isUpperCase(propertyName.charAt(2))) { setterMethodName = "set" + propertyName.substring(2); } else { setterMethodName = "set" + Character.toUpperCase(propertyName.charAt(0)) + propertyName.substring(1); } } // setter method else if (propertyElement.hasAttribute("setter")) { setterMethodName = propertyElement.getAttribute("setter"); } else { throw new JbpmException("missing name or setter attribute in property"); } // value info Element propertyValueElement = XmlUtil.element(propertyElement); propertyValueInfo = configParser.parse(propertyValueElement); }
Element factoryElement = XmlUtil.element(serviceElement, "factory"); if (factoryElement != null) { Element factoryBeanElement = XmlUtil.element(factoryElement); if (factoryBeanElement == null) { throw new ConfigurationException("element factory requires either a bean or ref subelement"); Element saveOperationsElement = XmlUtil.element(jbpmContextElement, "save-operations"); if (saveOperationsElement != null) { List saveOperationElements = XmlUtil.elements(saveOperationsElement, "save-operation"); Element saveOperationBeanElement = XmlUtil.element(saveOperationElement); if (saveOperationBeanElement == null) { throw new ConfigurationException("element save-operation requires either a class attribute or a bean or ref subelement");
public PropertyInfo(Element propertyElement, ObjectFactoryParser configParser) { // property name if (propertyElement.hasAttribute("name")) { String propertyName = propertyElement.getAttribute("name"); if (propertyName.startsWith("is") && propertyName.length() >= 3 && Character.isUpperCase(propertyName.charAt(2))) { setterMethodName = "set" + propertyName.substring(2); } else { setterMethodName = "set" + Character.toUpperCase(propertyName.charAt(0)) + propertyName.substring(1); } } // setter method else if (propertyElement.hasAttribute("setter")) { setterMethodName = propertyElement.getAttribute("setter"); } else { throw new JbpmException("missing name or setter attribute in property"); } // value info Element propertyValueElement = XmlUtil.element(propertyElement); propertyValueInfo = configParser.parse(propertyValueElement); }
public JbpmTypeObjectInfo(Element jbpmTypeElement, ObjectFactoryParser objectFactoryParser) { super(jbpmTypeElement, objectFactoryParser); Element variableInstanceElement = XmlUtil.element(jbpmTypeElement, "variable-instance"); if (!variableInstanceElement.hasAttribute("class")) { throw new ConfigurationException("missing class attribute in variable-instance"); Element typeMatcherElement = XmlUtil.element(jbpmTypeElement, "matcher"); if (typeMatcherElement == null) { throw new ConfigurationException("missing matcher element in jbpm-type"); Element typeMatcherBeanElement = XmlUtil.element(typeMatcherElement); typeMatcherObjectInfo = objectFactoryParser.parse(typeMatcherBeanElement); Element converterElement = XmlUtil.element(jbpmTypeElement, "converter"); if (converterElement != null) { if (!converterElement.hasAttribute("class")) {
public JbpmTypeObjectInfo(Element jbpmTypeElement, ObjectFactoryParser objectFactoryParser) { super(jbpmTypeElement, objectFactoryParser); Element variableInstanceElement = XmlUtil.element(jbpmTypeElement, "variable-instance"); if (!variableInstanceElement.hasAttribute("class")) { throw new ConfigurationException("missing class attribute in variable-instance"); Element typeMatcherElement = XmlUtil.element(jbpmTypeElement, "matcher"); if (typeMatcherElement == null) { throw new ConfigurationException("missing matcher element in jbpm-type"); Element typeMatcherBeanElement = XmlUtil.element(typeMatcherElement); typeMatcherObjectInfo = objectFactoryParser.parse(typeMatcherBeanElement); Element converterElement = XmlUtil.element(jbpmTypeElement, "converter"); if (converterElement != null) { if (!converterElement.hasAttribute("class")) {