Tabnine Logo
ExpressionContainerConfig.getList
Code IndexAdd Tabnine to your IDE (free)

How to use
getList
method
in
org.apache.shindig.config.ExpressionContainerConfig

Best Java code snippets using org.apache.shindig.config.ExpressionContainerConfig.getList (Showing top 3 results out of 315)

origin: org.apache.shindig/shindig-common

@Test
public void parseWithDefaultInheritance() throws Exception {
 JSONObject json = new JSONObject();
 json.put(CONTAINER_KEY, new String[]{CHILD_CONTAINER});
 json.put(PARENT_KEY, DEFAULT_CONTAINER);
 json.put(ARRAY_NAME, ARRAY_ALT_VALUE);
 // small nested data.
 JSONObject nested = new JSONObject();
 nested.put(NESTED_NAME, NESTED_ALT_VALUE);
 json.put(NESTED_KEY, nested);
 File childFile = createTemporaryFile(json, ".json");
 File parentFile = createDefaultContainer();
 createConfigForTest(childFile.getAbsolutePath() +
   JsonContainerConfigLoader.FILE_SEPARATOR + parentFile.getAbsolutePath());
 String value = config.getString(CHILD_CONTAINER, TOP_LEVEL_NAME);
 assertEquals(TOP_LEVEL_VALUE, value);
 Map<String, Object> nestedObj = config.getMap(CHILD_CONTAINER, NESTED_KEY);
 String nestedValue = nestedObj.get(NESTED_NAME).toString();
 assertEquals(NESTED_ALT_VALUE, nestedValue);
 String arrayValue = config.getString(CHILD_CONTAINER, ARRAY_NAME);
 assertEquals(ARRAY_ALT_VALUE, arrayValue);
 // Verify that the parent value wasn't overwritten as well.
 List<String> actual = new ArrayList<String>();
 for (Object val : config.getList(DEFAULT_CONTAINER, ARRAY_NAME)) {
  actual.add(val.toString());
 }
 List<String> expected = Arrays.asList(ARRAY_VALUE);
 assertEquals(expected, actual);
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void parseWithDefaultInheritance() throws Exception {
 JSONObject json = new JSONObject();
 json.put(CONTAINER_KEY, new String[]{CHILD_CONTAINER});
 json.put(PARENT_KEY, DEFAULT_CONTAINER);
 json.put(ARRAY_NAME, ARRAY_ALT_VALUE);
 // small nested data.
 JSONObject nested = new JSONObject();
 nested.put(NESTED_NAME, NESTED_ALT_VALUE);
 json.put(NESTED_KEY, nested);
 File childFile = createTemporaryFile(json, ".json");
 File parentFile = createDefaultContainer();
 createConfigForTest(childFile.getAbsolutePath() +
   JsonContainerConfigLoader.FILE_SEPARATOR + parentFile.getAbsolutePath());
 String value = config.getString(CHILD_CONTAINER, TOP_LEVEL_NAME);
 assertEquals(TOP_LEVEL_VALUE, value);
 Map<String, Object> nestedObj = config.getMap(CHILD_CONTAINER, NESTED_KEY);
 String nestedValue = nestedObj.get(NESTED_NAME).toString();
 assertEquals(NESTED_ALT_VALUE, nestedValue);
 String arrayValue = config.getString(CHILD_CONTAINER, ARRAY_NAME);
 assertEquals(ARRAY_ALT_VALUE, arrayValue);
 // Verify that the parent value wasn't overwritten as well.
 List<String> actual = new ArrayList<String>();
 for (Object val : config.getList(DEFAULT_CONTAINER, ARRAY_NAME)) {
  actual.add(val.toString());
 }
 List<String> expected = Arrays.asList(ARRAY_VALUE);
 assertEquals(expected, actual);
}
origin: apache/shindig

@Test
public void parseWithDefaultInheritance() throws Exception {
 JSONObject json = new JSONObject();
 json.put(CONTAINER_KEY, new String[]{CHILD_CONTAINER});
 json.put(PARENT_KEY, DEFAULT_CONTAINER);
 json.put(ARRAY_NAME, ARRAY_ALT_VALUE);
 // small nested data.
 JSONObject nested = new JSONObject();
 nested.put(NESTED_NAME, NESTED_ALT_VALUE);
 json.put(NESTED_KEY, nested);
 File childFile = createTemporaryFile(json, ".json");
 File parentFile = createDefaultContainer();
 createConfigForTest(childFile.getAbsolutePath() +
   JsonContainerConfigLoader.FILE_SEPARATOR + parentFile.getAbsolutePath());
 String value = config.getString(CHILD_CONTAINER, TOP_LEVEL_NAME);
 assertEquals(TOP_LEVEL_VALUE, value);
 Map<String, Object> nestedObj = config.getMap(CHILD_CONTAINER, NESTED_KEY);
 String nestedValue = nestedObj.get(NESTED_NAME).toString();
 assertEquals(NESTED_ALT_VALUE, nestedValue);
 String arrayValue = config.getString(CHILD_CONTAINER, ARRAY_NAME);
 assertEquals(ARRAY_ALT_VALUE, arrayValue);
 // Verify that the parent value wasn't overwritten as well.
 List<String> actual = new ArrayList<String>();
 for (Object val : config.getList(DEFAULT_CONTAINER, ARRAY_NAME)) {
  actual.add(val.toString());
 }
 List<String> expected = Arrays.asList(ARRAY_VALUE);
 assertEquals(expected, actual);
}
org.apache.shindig.configExpressionContainerConfiggetList

Popular methods of ExpressionContainerConfig

  • <init>
  • createExpressionContext
  • getContainers
  • getExpressions
  • getMap
  • getProperty
  • getString

Popular in Java

  • Updating database using SQL prepared statement
  • getApplicationContext (Context)
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JTextField (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top Vim 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