Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

124672 jkaabimofrad: Added check for spring bean DI (as before it caused SFS cloud to fail when downloading or creating docs as we are extending the NodesImpl in the cloud overlay). Also, minor fixes to NodesImpl.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126575 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 11:36:40 +00:00
parent 302c79c98a
commit 0541849643

View File

@@ -132,6 +132,7 @@ import org.alfresco.service.cmr.version.VersionType;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
import org.alfresco.util.PropertyCheck;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -203,7 +204,7 @@ public class NodesImpl implements Nodes
// ignore types/aspects
private Set<QName> ignoreQNames;
private ConcurrentHashMap<String,NodeRef> ddCache = new ConcurrentHashMap<String, NodeRef>();
private ConcurrentHashMap<String,NodeRef> ddCache = new ConcurrentHashMap<>();
private Set<String> nonAttachContentTypes = Collections.emptySet(); // pre-configured whitelist, eg. images & pdf
@@ -214,6 +215,12 @@ public class NodesImpl implements Nodes
public void init()
{
PropertyCheck.mandatory(this, "serviceRegistry", sr);
PropertyCheck.mandatory(this, "behaviourFilter", behaviourFilter);
PropertyCheck.mandatory(this, "repositoryHelper", repositoryHelper);
PropertyCheck.mandatory(this, "quickShareLinks", quickShareLinks);
PropertyCheck.mandatory(this, "poster", poster);
this.namespaceService = sr.getNamespaceService();
this.fileFolderService = sr.getFileFolderService();
this.nodeService = sr.getNodeService();
@@ -1491,7 +1498,7 @@ public class NodesImpl implements Nodes
// Checks for the presence of, and creates as necessary,
// the folder structure in the provided path elements list.
if (pathElements != null && !pathElements.isEmpty())
if (!pathElements.isEmpty())
{
parentNodeRef = makeFolders(parentNodeRef, pathElements);
}