|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gentics.api.lib.resolving.JSONResolvable
public class JSONResolvable
Bridge class between JSONObject and Resolvable. Wraps an
instance of JSONObject and resolves properties.
| Field Summary | |
|---|---|
protected org.json.JSONObject |
jsonObject
wapped JSON object |
| Constructor Summary | |
|---|---|
JSONResolvable(org.json.JSONObject jsonObject)
Create an instance of the JSON Resolvable wrapper |
|
| Method Summary | |
|---|---|
boolean |
canResolve()
Check whether the resolvable is capable of resolving properties right now. |
java.lang.Object |
get(java.lang.String key)
Get the property named by key or null if the property does not exist or is not set. |
java.lang.Object |
getProperty(java.lang.String key)
Get the property named by key or null if the property does not exist or is not set. |
protected static java.lang.Object |
transformValue(java.lang.Object value)
Helper method to transform the given value from JSON to Resolvable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.json.JSONObject jsonObject
| Constructor Detail |
|---|
public JSONResolvable(org.json.JSONObject jsonObject)
jsonObject - wrapped JSON object| Method Detail |
|---|
public boolean canResolve()
ResolvableResolvable.getProperty(String) or Resolvable.get(String) will return null.
canResolve in interface Resolvablepublic java.lang.Object get(java.lang.String key)
Resolvable
get in interface Resolvablekey - key of the property
public java.lang.Object getProperty(java.lang.String key)
ResolvableResolvable.get(String).
getProperty in interface Resolvablekey - key of the property
protected static java.lang.Object transformValue(java.lang.Object value)
throws org.json.JSONException
value - value to transform
org.json.JSONException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||