mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged 5.0.N (5.0.3) to HEAD (5.1)
109261: Merged DEV to V5.0.N 109258: MNT-14233: Evaluator for linkedNode doesn.t work. - Add new method that return JSONObject and use it for "linkedNode" property. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@109391 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -187,6 +187,16 @@ public class JSONConversionComponent
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public String toJSON(final NodeRef nodeRef, final boolean useShortQNames)
|
||||
{
|
||||
return toJSONObject(nodeRef, useShortQNames).toJSONString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a node reference to a JSON object. Selects the correct converter based on selection
|
||||
* implementation.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public JSONObject toJSONObject(final NodeRef nodeRef, final boolean useShortQNames)
|
||||
{
|
||||
final JSONObject json = new JSONObject();
|
||||
|
||||
@@ -214,7 +224,7 @@ public class JSONConversionComponent
|
||||
}
|
||||
}
|
||||
|
||||
return json.toJSONString();
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -239,7 +249,7 @@ public class JSONConversionComponent
|
||||
NodeRef targetNodeRef = nodeInfo.getLinkNodeRef();
|
||||
if (targetNodeRef != null)
|
||||
{
|
||||
rootJSONObject.put("linkedNode", toJSON(targetNodeRef, useShortQNames));
|
||||
rootJSONObject.put("linkedNode", toJSONObject(targetNodeRef, useShortQNames));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user