congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ValueFields.getTextValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getTextValue
method
in
org.camunda.bpm.engine.impl.variable.serializer.ValueFields

Best Java code snippets using org.camunda.bpm.engine.impl.variable.serializer.ValueFields.getTextValue (Showing top 20 results out of 315)

origin: camunda/camunda-bpm-platform

public StringValue readValue(ValueFields valueFields) {
 return Variables.stringValue(valueFields.getTextValue());
}
origin: camunda/camunda-bpm-platform

public ObjectValue readValue(ValueFields valueFields, boolean deserializeObjectValue) {
 if(valueFields.getTextValue() != null && valueFields.getTextValue2() != null) {
  Object jpaEntity = mappings.getJPAEntity(valueFields.getTextValue(), valueFields.getTextValue2());
  return Variables.objectValue(jpaEntity).create();
 }
 return Variables.objectValue(null).create();
}
origin: camunda/camunda-bpm-platform

public ObjectValue readValue(ValueFields valueFields, boolean deserializeObjectValue) {
 if(valueFields.getTextValue() != null && valueFields.getTextValue2() != null) {
  Object jpaEntity = mappings.getJPAEntity(valueFields.getTextValue(), valueFields.getTextValue2());
  return Variables.objectValue(jpaEntity).create();
 }
 return Variables.objectValue(null).create();
}
origin: camunda/camunda-bpm-platform

public StringValue readValue(ValueFields valueFields) {
 return Variables.stringValue(valueFields.getTextValue());
}
origin: camunda/camunda-bpm-platform

@Override
public FileValue readValue(ValueFields valueFields, boolean deserializeValue) {
 FileValueBuilder builder = Variables.fileValue(valueFields.getTextValue());
 if (valueFields.getByteArrayValue() != null) {
  builder.file(valueFields.getByteArrayValue());
 }
 // to ensure the same array size all the time
 if (valueFields.getTextValue2() != null) {
  String[] split = Arrays.copyOf(valueFields.getTextValue2().split(MIMETYPE_ENCODING_SEPARATOR, NR_OF_VALUES_IN_TEXTFIELD2), NR_OF_VALUES_IN_TEXTFIELD2);
  String mimeType = returnNullIfEmptyString(split[0]);
  String encoding = returnNullIfEmptyString(split[1]);
  builder.mimeType(mimeType);
  builder.encoding(encoding);
 }
 return builder.create();
}
origin: org.camunda.bpm/camunda-engine

public StringValue readValue(ValueFields valueFields) {
 return Variables.stringValue(valueFields.getTextValue());
}
origin: camunda/camunda-bpm-platform

@Override
public FileValue readValue(ValueFields valueFields, boolean deserializeValue) {
 FileValueBuilder builder = Variables.fileValue(valueFields.getTextValue());
 if (valueFields.getByteArrayValue() != null) {
  builder.file(valueFields.getByteArrayValue());
 }
 // to ensure the same array size all the time
 if (valueFields.getTextValue2() != null) {
  String[] split = Arrays.copyOf(valueFields.getTextValue2().split(MIMETYPE_ENCODING_SEPARATOR, NR_OF_VALUES_IN_TEXTFIELD2), NR_OF_VALUES_IN_TEXTFIELD2);
  String mimeType = returnNullIfEmptyString(split[0]);
  String encoding = returnNullIfEmptyString(split[1]);
  builder.mimeType(mimeType);
  builder.encoding(encoding);
 }
 return builder.create();
}
origin: camunda/camunda-bpm-platform

@Test
public void testWriteMimetypeFilenameAndBytesValueWithShortcutMethod() throws URISyntaxException, UnsupportedEncodingException {
 File file = new File(this.getClass().getClassLoader().getResource("org/camunda/bpm/engine/test/standalone/variables/simpleFile.txt").toURI());
 FileValue fileValue = Variables.fileValue(file);
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(new String(valueFields.getByteArrayValue(), "UTF-8"), is("text"));
 assertThat(valueFields.getTextValue(), is("simpleFile.txt"));
 assertThat(valueFields.getTextValue2(), is("text/plain" + SEPARATOR));
}
origin: camunda/camunda-bpm-platform

@Test
public void testWriteFilenameOnlyValue() {
 String filename = "test.txt";
 FileValue fileValue = Variables.fileValue(filename).create();
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(valueFields.getByteArrayValue(), is(nullValue()));
 assertThat(valueFields.getTextValue(), is(filename));
 assertThat(valueFields.getTextValue2(), is(nullValue()));
}
origin: camunda/camunda-bpm-platform

@Test
public void testWriteMimetypeFilenameAndBytesValue() throws UnsupportedEncodingException {
 String filename = "test.txt";
 String mimeType = "text/json";
 InputStream is = this.getClass().getClassLoader().getResourceAsStream("org/camunda/bpm/engine/test/standalone/variables/simpleFile.txt");
 FileValue fileValue = Variables.fileValue(filename).mimeType(mimeType).file(is).create();
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(new String(valueFields.getByteArrayValue(), "UTF-8"), is("text"));
 assertThat(valueFields.getTextValue(), is(filename));
 assertThat(valueFields.getTextValue2(), is(mimeType + SEPARATOR));
}
origin: camunda/camunda-bpm-platform

@Test
public void testWriteMimetypeFilenameBytesValueAndEncoding() throws UnsupportedEncodingException {
 String filename = "test.txt";
 String mimeType = "text/json";
 Charset encoding = Charset.forName("UTF-8");
 InputStream is = this.getClass().getClassLoader().getResourceAsStream("org/camunda/bpm/engine/test/standalone/variables/simpleFile.txt");
 FileValue fileValue = Variables.fileValue(filename).mimeType(mimeType).encoding(encoding).file(is).create();
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(new String(valueFields.getByteArrayValue(), "UTF-8"), is("text"));
 assertThat(valueFields.getTextValue(), is(filename));
 assertThat(valueFields.getTextValue2(), is(mimeType + SEPARATOR + encoding.name()));
}
origin: camunda/camunda-bpm-platform

@Test
public void testWriteMimetypeAndFilenameValue() {
 String filename = "test.txt";
 String mimeType = "text/json";
 FileValue fileValue = Variables.fileValue(filename).mimeType(mimeType).create();
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(valueFields.getByteArrayValue(), is(nullValue()));
 assertThat(valueFields.getTextValue(), is(filename));
 assertThat(valueFields.getTextValue2(), is(mimeType + SEPARATOR));
}
origin: camunda/camunda-bpm-platform

@Test
public void testWriteFilenameAndEncodingValue() {
 String filename = "test.txt";
 String encoding = "UTF-8";
 FileValue fileValue = Variables.fileValue(filename).encoding(encoding).create();
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(valueFields.getByteArrayValue(), is(nullValue()));
 assertThat(valueFields.getTextValue(), is(filename));
 assertThat(valueFields.getTextValue2(), is(SEPARATOR + encoding));
}
origin: org.camunda.bpm/camunda-engine

public ObjectValue readValue(ValueFields valueFields, boolean deserializeObjectValue) {
 if(valueFields.getTextValue() != null && valueFields.getTextValue2() != null) {
  Object jpaEntity = mappings.getJPAEntity(valueFields.getTextValue(), valueFields.getTextValue2());
  return Variables.objectValue(jpaEntity).create();
 }
 return Variables.objectValue(null).create();
}
origin: org.camunda.bpm/camunda-engine

@Test
public void testWriteMimetypeFilenameAndBytesValueWithShortcutMethod() throws URISyntaxException, UnsupportedEncodingException {
 File file = new File(this.getClass().getClassLoader().getResource("org/camunda/bpm/engine/test/standalone/variables/simpleFile.txt").toURI());
 FileValue fileValue = Variables.fileValue(file);
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(new String(valueFields.getByteArrayValue(), "UTF-8"), is("text"));
 assertThat(valueFields.getTextValue(), is("simpleFile.txt"));
 assertThat(valueFields.getTextValue2(), is("text/plain" + SEPARATOR));
}
origin: org.camunda.bpm/camunda-engine

@Test
public void testWriteFilenameOnlyValue() {
 String filename = "test.txt";
 FileValue fileValue = Variables.fileValue(filename).create();
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(valueFields.getByteArrayValue(), is(nullValue()));
 assertThat(valueFields.getTextValue(), is(filename));
 assertThat(valueFields.getTextValue2(), is(nullValue()));
}
origin: org.camunda.bpm/camunda-engine

@Test
public void testWriteMimetypeFilenameBytesValueAndEncoding() throws UnsupportedEncodingException {
 String filename = "test.txt";
 String mimeType = "text/json";
 Charset encoding = Charset.forName("UTF-8");
 InputStream is = this.getClass().getClassLoader().getResourceAsStream("org/camunda/bpm/engine/test/standalone/variables/simpleFile.txt");
 FileValue fileValue = Variables.fileValue(filename).mimeType(mimeType).encoding(encoding).file(is).create();
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(new String(valueFields.getByteArrayValue(), "UTF-8"), is("text"));
 assertThat(valueFields.getTextValue(), is(filename));
 assertThat(valueFields.getTextValue2(), is(mimeType + SEPARATOR + encoding.name()));
}
origin: org.camunda.bpm/camunda-engine

@Test
public void testWriteMimetypeFilenameAndBytesValue() throws UnsupportedEncodingException {
 String filename = "test.txt";
 String mimeType = "text/json";
 InputStream is = this.getClass().getClassLoader().getResourceAsStream("org/camunda/bpm/engine/test/standalone/variables/simpleFile.txt");
 FileValue fileValue = Variables.fileValue(filename).mimeType(mimeType).file(is).create();
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(new String(valueFields.getByteArrayValue(), "UTF-8"), is("text"));
 assertThat(valueFields.getTextValue(), is(filename));
 assertThat(valueFields.getTextValue2(), is(mimeType + SEPARATOR));
}
origin: org.camunda.bpm/camunda-engine

@Test
public void testWriteMimetypeAndFilenameValue() {
 String filename = "test.txt";
 String mimeType = "text/json";
 FileValue fileValue = Variables.fileValue(filename).mimeType(mimeType).create();
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(valueFields.getByteArrayValue(), is(nullValue()));
 assertThat(valueFields.getTextValue(), is(filename));
 assertThat(valueFields.getTextValue2(), is(mimeType + SEPARATOR));
}
origin: org.camunda.bpm/camunda-engine

@Test
public void testWriteFilenameAndEncodingValue() {
 String filename = "test.txt";
 String encoding = "UTF-8";
 FileValue fileValue = Variables.fileValue(filename).encoding(encoding).create();
 ValueFields valueFields = new MockValueFields();
 serializer.writeValue(fileValue, valueFields);
 assertThat(valueFields.getByteArrayValue(), is(nullValue()));
 assertThat(valueFields.getTextValue(), is(filename));
 assertThat(valueFields.getTextValue2(), is(SEPARATOR + encoding));
}
org.camunda.bpm.engine.impl.variable.serializerValueFieldsgetTextValue

Popular methods of ValueFields

  • getByteArrayValue
  • getTextValue2
  • setByteArrayValue
  • getDoubleValue
  • getLongValue
  • getName
  • setDoubleValue
  • setLongValue
  • setTextValue
  • setTextValue2

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now