Package org.jbpm.wire.descriptor

Examples of org.jbpm.wire.descriptor.IntegerDescriptor


  private void parseIntAttribute(Element element, String attributeName, ObjectDescriptor descriptor, String fieldName, Parse parse) {
    if (element.hasAttribute(attributeName)) {
      String intText = element.getAttribute(attributeName);
      try {
        int intValue = Integer.parseInt(intText);
        IntegerDescriptor intValueDescriptor = new IntegerDescriptor();
        intValueDescriptor.setValue(intValue);
        FieldOperation intValueInjection = new FieldOperation();
        intValueInjection.setFieldName(fieldName);
        intValueInjection.setDescriptor(intValueDescriptor);
        descriptor.addOperation(intValueInjection);
      } catch (NumberFormatException e) {
View Full Code Here


* @see WireParser
*/
public class IntBinding extends BasicTypeBinding {

  protected AbstractDescriptor createDescriptor(String value) {
    IntegerDescriptor integerDescriptor =  new IntegerDescriptor();
    Integer integerValue;
    try {
      integerValue = new Integer(value);
    } catch (NumberFormatException e) {
      throw new NumberFormatException("'"+value+"' cannot be parsed to an int");
    }
    integerDescriptor.setValue(integerValue);
    return integerDescriptor;
  }
View Full Code Here

TOP

Related Classes of org.jbpm.wire.descriptor.IntegerDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.