Codota Logo
FieldData.getValue
Code IndexAdd Codota to your IDE (free)

How to use
getValue
method
in
org.drools.ide.common.client.modeldriven.testing.FieldData

Best Java code snippets using org.drools.ide.common.client.modeldriven.testing.FieldData.getValue (Showing top 10 results out of 315)

  • Common ways to obtain FieldData
private void myMethod () {
FieldData f =
  • Codota Iconnew FieldData()
  • Smart code suggestions by Codota
}
origin: org.drools/droolsjbpm-ide-common

private String createExpression(CollectionFieldData field) {
  String result = "[";
  int index = 1;
  for (FieldData fieldData : field.getCollectionFieldList()) {
    result += fieldData.getValue().replace("=", "");
    if (index < field.getCollectionFieldList().size()) {
      result += ",";
    }
    index++;
  }
  return result + "]";
}
origin: org.chtijbug.drools/droolsjbpm-ide-common

private String createExpression(CollectionFieldData field) {
  String result = "[";
  int index = 1;
  for (FieldData fieldData : field.getCollectionFieldList()) {
    result += fieldData.getValue().replace("=", "");
    if (index < field.getCollectionFieldList().size()) {
      result += ",";
    }
    index++;
  }
  return result + "]";
}
origin: org.chtijbug.drools/droolsjbpm-ide-common

public FieldPopulator getFieldPopulator(Field field) throws ClassNotFoundException,
    InstantiationException,
    IllegalAccessException, InvocationTargetException, NoSuchMethodException {
  if (field instanceof FieldData) {
    FieldData fieldData = (FieldData) field;
    if (fieldData.getValue() == null) {
      throw new IllegalArgumentException("Field value can not be null");
    } else {
      return getFieldDataPopulator(factObject,
          fieldData);
    }
  } else if (field instanceof FactAssignmentField) {
    return new FactAssignmentFieldPopulator(factObject,
        (FactAssignmentField) field,
        typeResolver,
        classLoader);
  } else if (field instanceof CollectionFieldData) {
    return new CollectionFieldPopulator(
        factObject,
        (CollectionFieldData) field);
  }
  throw new IllegalArgumentException("Unknown field type " + field.getClass());
}
origin: org.drools/droolsjbpm-ide-common

public FieldPopulator getFieldPopulator(Field field) throws ClassNotFoundException,
    InstantiationException,
    IllegalAccessException, InvocationTargetException, NoSuchMethodException {
  if (field instanceof FieldData) {
    FieldData fieldData = (FieldData) field;
    if (fieldData.getValue() == null) {
      throw new IllegalArgumentException("Field value can not be null");
    } else {
      return getFieldDataPopulator(factObject,
          fieldData);
    }
  } else if (field instanceof FactAssignmentField) {
    return new FactAssignmentFieldPopulator(factObject,
        (FactAssignmentField) field,
        typeResolver,
        classLoader);
  } else if (field instanceof CollectionFieldData) {
    return new CollectionFieldPopulator(
        factObject,
        (CollectionFieldData) field);
  }
  throw new IllegalArgumentException("Unknown field type " + field.getClass());
}
origin: org.drools/droolsjbpm-ide-common

if (fieldData.getValue().startsWith("=")) {
  return new ExpressionFieldPopulator(factObject,
      fieldData.getName(),
      fieldData.getValue().substring(1));
      fieldData.getValue(),
      typeResolver,
      classLoader);
      getFieldType(fieldData.getName()),
      fieldData.getName(),
      fieldData.getValue());
} else {
  return new SimpleFieldPopulator(factObject,
      fieldData.getName(),
      fieldData.getValue());
origin: org.chtijbug.drools/droolsjbpm-ide-common

if (fieldData.getValue().startsWith("=")) {
  return new ExpressionFieldPopulator(factObject,
      fieldData.getName(),
      fieldData.getValue().substring(1));
      fieldData.getValue(),
      typeResolver,
      classLoader);
      getFieldType(fieldData.getName()),
      fieldData.getName(),
      fieldData.getValue());
} else {
  return new SimpleFieldPopulator(factObject,
      fieldData.getName(),
      fieldData.getValue());
origin: org.drools/droolsjbpm-ide-common

@Test
public void testLoadLegacyFieldDataTestScenario() throws Exception {
  StringBuffer contents = new StringBuffer();
  BufferedReader reader = null;
  try {
    reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("LegacyFieldDataTestScenario.xml")));
    String text = null;
    while ((text = reader.readLine()) != null) {
      contents.append(text);
    }
  } catch (Exception e) {
    if (reader != null) {
      reader.close();
    }
    throw new IllegalStateException("Error while reading file.", e);
  }
  Scenario scenario = ScenarioXMLPersistence.getInstance().unmarshal(contents.toString());
  verifyFieldDataNamesAreNotNull(scenario);
  FactData factData = (FactData) scenario.getFixtures().get(0);
  assertTrue(factData.getFieldData().get(0) instanceof CollectionFieldData);
  CollectionFieldData collectionFieldData=(CollectionFieldData)factData.getFieldData().get(0);
  FieldData fieldData = collectionFieldData.getCollectionFieldList().get(0);
  assertEquals("ratingSummaries", fieldData.getName());
  assertEquals("=c1",fieldData.getValue());
}
origin: org.drools/droolsjbpm-ide-common

@Test
public void testLoadLegacyTestScenario() throws Exception {
  StringBuffer contents = new StringBuffer();
  BufferedReader reader = null;
  try {
    reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("testLoadLegacyTestScenario.xml")));
    String text = null;
    while ((text = reader.readLine()) != null) {
      contents.append(text);
    }
  } catch (Exception e) {
    if (reader != null) {
      reader.close();
    }
    throw new IllegalStateException("Error while reading file.", e);
  }
  Scenario scenario = ScenarioXMLPersistence.getInstance().unmarshal(contents.toString());
  verifyFieldDataNamesAreNotNull(scenario);
  FactData factData = (FactData) scenario.getFixtures().get(0);
  assertTrue(factData.getFieldData().get(0) instanceof FieldData);
  FieldData fieldData = (FieldData) factData.getFieldData().get(0);
  assertEquals("42", fieldData.getValue());
  assertEquals("age", fieldData.getName());
}
origin: org.chtijbug.drools/droolsjbpm-ide-common

if (fieldData.getValue() != null && fieldData.getValue().startsWith("=[")) {
  CollectionFieldData collectionFieldData = new CollectionFieldData();
  collectionFieldData.setName(name);
  String list = fieldData.getValue().substring(2, fieldData.getValue().length() - 1);
origin: org.drools/droolsjbpm-ide-common

if (fieldData.getValue() != null && fieldData.getValue().startsWith("=[")) {
  CollectionFieldData collectionFieldData = new CollectionFieldData();
  collectionFieldData.setName(name);
  String list = fieldData.getValue().substring(2, fieldData.getValue().length() - 1);
org.drools.ide.common.client.modeldriven.testingFieldDatagetValue

Popular methods of FieldData

  • <init>
  • getName
  • setName
  • setNature
  • setValue
  • getNature

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • getSharedPreferences (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • JButton (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now