Tabnine Logo
JsonELResolver
Code IndexAdd Tabnine to your IDE (free)

How to use
JsonELResolver
in
org.apache.shindig.expressions

Best Java code snippets using org.apache.shindig.expressions.JsonELResolver (Showing top 20 results out of 315)

origin: org.apache.shindig/shindig-common

@Override
public Class<?> getType(ELContext context, Object base, Object property) {
 if (isJson(base)) {
  context.setPropertyResolved(true);
  Object value = getValue(context, base, property);
  return value == null ? null : value.getClass();
 }
 return null;
}
origin: org.gatein.shindig/shindig-common

@Override
public Object getValue(ELContext context, Object base, Object property) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  return ((JSONObject) base).opt(String.valueOf(property));
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  return ((JSONArray) base).opt(index);
 }
 
 return null;
}
origin: org.wso2.org.apache.shindig/shindig-common

@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
 if (isJson(base)) {
  context.setPropertyResolved(true);
 }
 return false;
}
origin: org.wso2.org.apache.shindig/shindig-common

/**
 * @return a default ELResolver with functionality needed by all
 * expression evaluation.
 */
private ELResolver createDefaultELResolver() {
 CompositeELResolver resolver = new CompositeELResolver();
 // Resolvers, in the order they will be most commonly accessed.
 // Moving JsonELResolver to the end makes JSON property resolution twice
 // as slow, so this is quite important.
 resolver.add(new JsonELResolver());
 resolver.add(new MapELResolver());
 resolver.add(new ListELResolver());
 resolver.add(new ArrayELResolver());
 // TODO: bean el resolver?
 return resolver;
}
origin: org.apache.shindig/shindig-common

@Override
public Object getValue(ELContext context, Object base, Object property) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  return ((JSONObject) base).opt(String.valueOf(property));
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  return ((JSONArray) base).opt(index);
 }
 return null;
}
origin: org.gatein.shindig/shindig-common

@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
 if (isJson(base)) {
  context.setPropertyResolved(true);
 }
 
 return false;
}
origin: org.gatein.shindig/shindig-common

/**
 * @return a default ELResolver with functionality needed by all
 * expression evaluation.
 */
private ELResolver createDefaultELResolver() {
 CompositeELResolver resolver = new CompositeELResolver();
 // Resolvers, in the order they will be most commonly accessed.
 // Moving JsonELResolver to the end makes JSON property resolution twice
 // as slow, so this is quite important.
 resolver.add(new JsonELResolver());
 resolver.add(new MapELResolver());
 resolver.add(new ListELResolver());
 resolver.add(new ArrayELResolver());
 // TODO: bean el resolver?
 
 return resolver;
}
origin: org.wso2.org.apache.shindig/shindig-common

@Override
public Class<?> getType(ELContext context, Object base, Object property) {
 if (isJson(base)) {
  context.setPropertyResolved(true);
  Object value = getValue(context, base, property);
  return value == null ? null : value.getClass();
 }
 return null;
}
origin: com.lmco.shindig/shindig-common

@Override
public Object getValue(ELContext context, Object base, Object property) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  return ((JSONObject) base).opt(String.valueOf(property));
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  return ((JSONArray) base).opt(index);
 }
 
 return null;
}
origin: com.lmco.shindig/shindig-common

@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
 if (isJson(base)) {
  context.setPropertyResolved(true);
 }
 
 return false;
}
origin: org.apache.shindig/shindig-common

/**
 * @return a default ELResolver with functionality needed by all
 * expression evaluation.
 */
private ELResolver createDefaultELResolver() {
 CompositeELResolver resolver = new CompositeELResolver();
 // Resolvers, in the order they will be most commonly accessed.
 // Moving JsonELResolver to the end makes JSON property resolution twice
 // as slow, so this is quite important.
 resolver.add(new JsonELResolver());
 resolver.add(new MapELResolver());
 resolver.add(new ListELResolver());
 resolver.add(new ArrayELResolver());
 // TODO: bean el resolver?
 return resolver;
}
origin: apache/shindig

@Override
public Class<?> getType(ELContext context, Object base, Object property) {
 if (isJson(base)) {
  context.setPropertyResolved(true);
  Object value = getValue(context, base, property);
  return value == null ? null : value.getClass();
 }
 return null;
}
origin: org.wso2.org.apache.shindig/shindig-common

@Override
public Object getValue(ELContext context, Object base, Object property) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  return ((JSONObject) base).opt(String.valueOf(property));
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  return ((JSONArray) base).opt(index);
 }
 return null;
}
origin: org.apache.shindig/shindig-common

@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
 if (isJson(base)) {
  context.setPropertyResolved(true);
 }
 return false;
}
origin: com.lmco.shindig/shindig-common

/**
 * @return a default ELResolver with functionality needed by all
 * expression evaluation.
 */
private ELResolver createDefaultELResolver() {
 CompositeELResolver resolver = new CompositeELResolver();
 // Resolvers, in the order they will be most commonly accessed.
 // Moving JsonELResolver to the end makes JSON property resolution twice
 // as slow, so this is quite important.
 resolver.add(new JsonELResolver());
 resolver.add(new MapELResolver());
 resolver.add(new ListELResolver());
 resolver.add(new ArrayELResolver());
 // TODO: bean el resolver?
 
 return resolver;
}
origin: org.gatein.shindig/shindig-common

@Override
public Class<?> getType(ELContext context, Object base, Object property) {
 if (isJson(base)) {
  context.setPropertyResolved(true);
  Object value = getValue(context, base, property);
  return value == null ? null : value.getClass();
 }
 
 return null;
}
origin: apache/shindig

@Override
public Object getValue(ELContext context, Object base, Object property) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  return ((JSONObject) base).opt(String.valueOf(property));
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  return ((JSONArray) base).opt(index);
 }
 return null;
}
origin: apache/shindig

@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
 if (isJson(base)) {
  context.setPropertyResolved(true);
 }
 return false;
}
origin: apache/shindig

/**
 * @return a default ELResolver with functionality needed by all
 * expression evaluation.
 */
private ELResolver createDefaultELResolver() {
 CompositeELResolver resolver = new CompositeELResolver();
 // Resolvers, in the order they will be most commonly accessed.
 // Moving JsonELResolver to the end makes JSON property resolution twice
 // as slow, so this is quite important.
 resolver.add(new JsonELResolver());
 resolver.add(new MapELResolver());
 resolver.add(new ListELResolver());
 resolver.add(new ArrayELResolver());
 // TODO: bean el resolver?
 return resolver;
}
origin: com.lmco.shindig/shindig-common

@Override
public Class<?> getType(ELContext context, Object base, Object property) {
 if (isJson(base)) {
  context.setPropertyResolved(true);
  Object value = getValue(context, base, property);
  return value == null ? null : value.getClass();
 }
 
 return null;
}
org.apache.shindig.expressionsJsonELResolver

Javadoc

ELResolver implementation for JSONArray and JSONObject.

Most used methods

  • <init>
  • getValue
  • isJson
  • toInt

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Reference (javax.naming)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top PhpStorm 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