mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Revert "MNT-18497: Implement linkedNodeToJson logic"
This reverts commit 2835d684
This commit is contained in:
@@ -18,7 +18,6 @@ branches:
|
|||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- /support\/.*/
|
- /support\/.*/
|
||||||
- fix/MNT-18497_Rendering-folder-with-links-is-slow-in-share
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
@@ -234,38 +234,7 @@ public class JSONConversionComponent
|
|||||||
|
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* MNT-18497
|
|
||||||
* Convert a linkedNode reference to a JSON object. Selects the correct converter based on selection
|
|
||||||
* implementation. Skips adding properties and aspects of targetNodeRef
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public JSONObject linkedNodeToJSONObject(final NodeRef nodeRef, final boolean useShortQNames)
|
|
||||||
{
|
|
||||||
final JSONObject json = new JSONObject();
|
|
||||||
|
|
||||||
if (this.nodeService.exists(nodeRef))
|
|
||||||
{
|
|
||||||
if (publicServiceAccessService.hasAccess(ServiceRegistry.NODE_SERVICE.getLocalName(), "getProperties", nodeRef) == AccessStatus.ALLOWED)
|
|
||||||
{
|
|
||||||
// init namespace prefix cache
|
|
||||||
namespacePrefixCache.get().clear();
|
|
||||||
|
|
||||||
// Get node info
|
|
||||||
FileInfo nodeInfo = this.fileFolderService.getFileInfo(nodeRef);
|
|
||||||
|
|
||||||
// Set root values
|
|
||||||
setRootValues(nodeInfo, json, useShortQNames);
|
|
||||||
|
|
||||||
// add permissions
|
|
||||||
json.put("permissions", permissionsToJSON(nodeRef));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param nodeInfo FileInfo
|
* @param nodeInfo FileInfo
|
||||||
@@ -288,7 +257,7 @@ public class JSONConversionComponent
|
|||||||
NodeRef targetNodeRef = nodeInfo.getLinkNodeRef();
|
NodeRef targetNodeRef = nodeInfo.getLinkNodeRef();
|
||||||
if (targetNodeRef != null)
|
if (targetNodeRef != null)
|
||||||
{
|
{
|
||||||
rootJSONObject.put("linkedNode", linkedNodeToJSONObject(targetNodeRef, useShortQNames));
|
rootJSONObject.put("linkedNode", toJSONObject(targetNodeRef, useShortQNames));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user