Package org.activiti.engine.impl.javax.el

Examples of org.activiti.engine.impl.javax.el.ELException


    }
    if (value instanceof String) {
      try {
        return Double.valueOf((String)value);
      } catch (NumberFormatException e) {
        throw new ELException(LocalMessages.get("error.coerce.value", value, Double.class));
      }
    }
    if (value instanceof Character) {
      return Double.valueOf((short)((Character)value).charValue());
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), Double.class));
  }
View Full Code Here


    }
    if (value instanceof String) {
      try {
        return Float.valueOf((String)value);
      } catch (NumberFormatException e) {
        throw new ELException(LocalMessages.get("error.coerce.value", value, Float.class));
      }
    }
    if (value instanceof Character) {
      return Float.valueOf((short)((Character)value).charValue());
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), Float.class));
  }
View Full Code Here

    }
    if (value instanceof String) {
      try {
        return Long.valueOf((String)value);
      } catch (NumberFormatException e) {
        throw new ELException(LocalMessages.get("error.coerce.value", value, Long.class));
      }
    }
    if (value instanceof Character) {
      return Long.valueOf((short)((Character)value).charValue());
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), Long.class));
  }
View Full Code Here

    }
    if (value instanceof String) {
      try {
        return Integer.valueOf((String)value);
      } catch (NumberFormatException e) {
        throw new ELException(LocalMessages.get("error.coerce.value", value, Integer.class));
      }
    }
    if (value instanceof Character) {
      return Integer.valueOf((short)((Character)value).charValue());
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), Integer.class));
  }
View Full Code Here

    }
    if (value instanceof String) {
      try {
        return Short.valueOf((String)value);
      } catch (NumberFormatException e) {
        throw new ELException(LocalMessages.get("error.coerce.value", value, Short.class));
      }
    }
    if (value instanceof Character) {
      return Short.valueOf((short)((Character)value).charValue());
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), Short.class));
  }
View Full Code Here

    }
    if (value instanceof String) {
      try {
        return Byte.valueOf((String)value);
      } catch (NumberFormatException e) {
        throw new ELException(LocalMessages.get("error.coerce.value", value, Byte.class));
      }
    }
    if (value instanceof Character) {
      return Byte.valueOf(Short.valueOf((short)((Character)value).charValue()).byteValue());
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), Byte.class));
  }
View Full Code Here

    }
    if (value instanceof String) {
      try {
        return Enum.valueOf(type, (String)value);
      } catch (IllegalArgumentException e) {
        throw new ELException(LocalMessages.get("error.coerce.value", value, type));
      }
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), type));
  }
View Full Code Here

    PropertyEditor editor = PropertyEditorManager.findEditor(type);
    if (editor == null) {
      if ("".equals(value)) {
        return null;
      }
      throw new ELException(LocalMessages.get("error.coerce.type", String.class, type));
    } else {
      if ("".equals(value)) {
        try {
          editor.setAsText(value);
        } catch (IllegalArgumentException e) {
          return null;
        }
      } else {
        try {
          editor.setAsText(value);
        } catch (IllegalArgumentException e) {
          throw new ELException(LocalMessages.get("error.coerce.value", value, type));
        }
      }
      return editor.getValue();
    }
  }
View Full Code Here

      return value;
    }
    if (value instanceof String) {
      return coerceStringToType((String)value, type);
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), type));
  }
View Full Code Here

      Properties properties = new Properties();
      InputStream input = null;
      try {
        properties.load(input = new FileInputStream(file));
      } catch (IOException e) {
        throw new ELException("Cannot read default EL properties", e);
      } finally {
        try {
          input.close();
        } catch (IOException e) {
          // ignore...
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.javax.el.ELException

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.