Package org.camunda.bpm.engine.impl.core.variable

Examples of org.camunda.bpm.engine.impl.core.variable.SerializedVariableValueImpl


  public DataFormat<?> getDefaultDataFormat() {
    return defaultDataFormat;
  }

  public SerializedVariableValue getSerializedValue(ValueFields valueFields) {
    SerializedVariableValueImpl value = new SerializedVariableValueImpl();

    String serializedValue = null;
    if (valueFields.getTextValue() != null) {
      serializedValue = valueFields.getTextValue();
    } else if (valueFields.getByteArrayValue() != null){
      try {
        ByteArrayEntity byteArray = valueFields.getByteArrayValue();
        serializedValue = new String(byteArray.getBytes(), "UTF-8");
      } catch (UnsupportedEncodingException e) {
        throw new ProcessEngineException("UTF-8 is not a supported encoding", e);
      }
    }

    value.setValue(serializedValue);
    value.setConfigValue(CONFIG_DATA_FORMAT, valueFields.getDataFormatId());
    value.setConfigValue(CONFIG_ROOT_TYPE, valueFields.getTextValue2());

    return value;
  }
View Full Code Here


  public String getTypeNameForValue(ValueFields valueFields) {
    return Object.class.getSimpleName();
  }

  public SerializedVariableValue getSerializedValue(ValueFields valueFields) {
    SerializedVariableValueImpl result = new SerializedVariableValueImpl();
    result.setConfigValue(CONFIG_CLASS_NAME, valueFields.getTextValue());
    result.setConfigValue(CONFIG_ENTITY_ID_STRING, valueFields.getTextValue2());

    return result;
  }
View Full Code Here

  public String getTypeNameForValue(ValueFields valueFields) {
    return Serializable.class.getSimpleName();
  }

  public SerializedVariableValue getSerializedValue(ValueFields valueFields) {
    SerializedVariableValueImpl result = new SerializedVariableValueImpl();
    result.setValue(super.getValue(valueFields));
    return result;
  }
View Full Code Here

*/
public abstract class PrimitiveVariableType implements VariableType {


  public SerializedVariableValue getSerializedValue(ValueFields valueFields) {
    SerializedVariableValueImpl result = new SerializedVariableValueImpl();
    result.setValue(getValue(valueFields));
    return result;
  }
View Full Code Here

    // typename independent of value
    return Date.class.getSimpleName();
  }

  public SerializedVariableValue getSerializedValue(ValueFields valueFields) {
    SerializedVariableValueImpl result = new SerializedVariableValueImpl();
    result.setValue(valueFields.getLongValue());
    return result;
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.core.variable.SerializedVariableValueImpl

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.