Examples of VariableType


Examples of org.activiti.engine.impl.variable.VariableType

    return variableTypes;
  }

  public VariableType getResult(ResultSet resultSet, int columnIndex) throws SQLException {
    String typeName = resultSet.getString(columnIndex);
    VariableType type = getVariableTypes().getVariableType(typeName);
    if (type == null) {
      throw new ActivitiException("unknown variable type name " + typeName);
    }
    return type;
  }
View Full Code Here

Examples of org.activiti.engine.impl.variable.VariableType

    if(jpaPersistenceUnitName!=null) {
      jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName);
    }
    if(jpaEntityManagerFactory!=null) {
      sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));
      VariableType jpaType = variableTypes.getVariableType(JPAEntityVariableType.TYPE_NAME);
      // Add JPA-type
      if(jpaType == null) {
        // We try adding the variable right before SerializableType, if available
        int serializableIndex = variableTypes.getTypeIndex(SerializableType.TYPE_NAME);
        if(serializableIndex > -1) {
View Full Code Here

Examples of org.camunda.bpm.engine.impl.variable.VariableType

    // type
    VariableTypes variableTypes = Context.getProcessEngineConfiguration()
      .getVariableTypes();

    VariableType variableType = variableTypes.getVariableType(formField.getTypeName());
    if(variableType == null) {
      throw new ProcessEngineException("Unsupported variable type '"+formField.getTypeName()+ "'.");
    }
    variableInstance.setType(variableType);
View Full Code Here

Examples of org.camunda.bpm.engine.impl.variable.VariableType

  protected VariableTypes variableTypes;

  public VariableType getResult(ResultSet rs, String columnName) throws SQLException {
    String typeName = rs.getString(columnName);
    VariableType type = getVariableTypes().getVariableType(typeName);
    ensureNotNull("unknown variable type name " + typeName, "type", type);
    return type;
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.variable.VariableType

    return type;
  }

  public VariableType getResult(CallableStatement cs, int columnIndex) throws SQLException {
    String typeName = cs.getString(columnIndex);
    VariableType type = getVariableTypes().getVariableType(typeName);
    ensureNotNull("unknown variable type name " + typeName, "type", type);
    return type;
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.variable.VariableType

    return variableTypes;
  }

  public VariableType getResult(ResultSet resultSet, int columnIndex) throws SQLException {
    String typeName = resultSet.getString(columnIndex);
    VariableType type = getVariableTypes().getVariableType(typeName);
    ensureNotNull("unknown variable type name " + typeName, "type", type);
    return type;
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.variable.VariableType

      variableTypes.addType(new DoubleType());
      variableTypes.addType(new ByteArrayType());

      if (defaultSerializationFormat != null) {
        defaultSerializationFormat = defaultSerializationFormat.trim();
        VariableType serializationType = null;

        for (SerializationVariableTypeResolver resolver : serializationTypeResolvers) {
          serializationType = resolver.getTypeForSerializationFormat(defaultSerializationFormat);
          if (serializationType != null) {
            break;
          }
        }

        if (serializationType != null) {
          variableTypes.addType(serializationType);
        } else {
          throw new ProcessEngineException("Cannot find a VariableType that serializes objects"
              + " for the default format '" + defaultSerializationFormat + "'");
        }
      } else {
        variableTypes.addType(new SerializableType());
        if(ProcessEngineSpinSupport.isSpinAvailable()) {
          VariableType spinVariableType = ProcessEngineSpinSupport
            .getVariableTypeResolver()
            .getTypeForSerializationFormat("application/json; implementation=tree");
          variableTypes.addType(spinVariableType);
        }
      }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.variable.VariableType

    if(jpaPersistenceUnitName!=null) {
      jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName);
    }
    if(jpaEntityManagerFactory!=null) {
      sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));
      VariableType jpaType = variableTypes.getVariableType(ProcessEngineVariableType.JPA.getName());
      // Add JPA-type
      if(jpaType == null) {
        // We try adding the variable right before SerializableType, if available
        int serializableIndex = variableTypes.getTypeIndex(ProcessEngineVariableType.SERIALIZABLE.getName());
        if(serializableIndex > -1) {
View Full Code Here

Examples of org.camunda.bpm.engine.impl.variable.VariableType

    this.local = local;
  }
 
  public void initialize(VariableTypes types) {
    if(variableInstanceEntity == null) {
      VariableType type = types.findVariableType(value);
      if(type instanceof ByteArrayType) {
        throw new ProcessEngineException("Variables of type ByteArray cannot be used to query");
      } else if(type instanceof JPAEntityVariableType && operator != QueryOperator.EQUALS) {
        throw new ProcessEngineException("JPA entity variables can only be used in 'variableValueEquals'");
      } else {
View Full Code Here

Examples of org.mitre.oval.xmlSchema.ovalVariables5.VariableType

        for (CheckExport export : exports) {
            String variableId = export.getName();

            org.mitre.oval.xmlSchema.ovalDefinitions5.VariableType defVariable = ovalResolver.getVariable(variableId);

            VariableType variable = variablesType.addNewVariable();
               
            if (defVariable != null) {
                variable.setDatatype(defVariable.getDatatype());
            } else {
              // TODO: P3: handle simple and complex type
                switch (export.getType()) {
                    case BOOLEAN:
                        variable.setDatatype(SimpleDatatypeEnumeration.BOOLEAN);
                        break;
                    case NUMBER:
                    case STRING:
                    default:
                        variable.setDatatype(SimpleDatatypeEnumeration.STRING);
                        break;
                }
            }
            variable.setId(variableId);
            for (String s : export.getValues()) {
              variable.addNewValue().setStringValue(s);
            }
            variable.setComment("");
        }

        return retval;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.