mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
127312 jkaabimofrad: SFS-577, SFS-581: Fixed the shared-link no-auth APIs issue with multi-tenancy. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127316 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1950,15 +1950,20 @@ public class NodesImpl implements Nodes
|
||||
public BinaryResource getContent(String fileNodeId, Parameters parameters, boolean recordActivity)
|
||||
{
|
||||
final NodeRef nodeRef = validateNode(fileNodeId);
|
||||
return getContent(nodeRef, parameters, recordActivity);
|
||||
}
|
||||
|
||||
if (! nodeMatches(nodeRef, Collections.singleton(ContentModel.TYPE_CONTENT), null, false))
|
||||
@Override
|
||||
public BinaryResource getContent(NodeRef nodeRef, Parameters parameters, boolean recordActivity)
|
||||
{
|
||||
if (!nodeMatches(nodeRef, Collections.singleton(ContentModel.TYPE_CONTENT), null, false))
|
||||
{
|
||||
throw new InvalidArgumentException("NodeId of content is expected: "+nodeRef.getId());
|
||||
throw new InvalidArgumentException("NodeId of content is expected: " + nodeRef.getId());
|
||||
}
|
||||
|
||||
Map<QName, Serializable> nodeProps = nodeService.getProperties(nodeRef);
|
||||
ContentData cd = (ContentData)nodeProps.get(ContentModel.PROP_CONTENT);
|
||||
String name = (String)nodeProps.get(ContentModel.PROP_NAME);
|
||||
ContentData cd = (ContentData) nodeProps.get(ContentModel.PROP_CONTENT);
|
||||
String name = (String) nodeProps.get(ContentModel.PROP_NAME);
|
||||
|
||||
org.alfresco.rest.framework.resource.content.ContentInfo ci = null;
|
||||
String mimeType = null;
|
||||
@@ -1982,7 +1987,7 @@ public class NodesImpl implements Nodes
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("Ignored attachment=false for "+fileNodeId+" since "+mimeType+" is not in the whitelist for non-attach content types");
|
||||
logger.warn("Ignored attachment=false for "+nodeRef.getId()+" since "+mimeType+" is not in the whitelist for non-attach content types");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1990,7 +1995,7 @@ public class NodesImpl implements Nodes
|
||||
|
||||
if (recordActivity)
|
||||
{
|
||||
final ActivityInfo activityInfo = getActivityInfo(getParentNodeRef(nodeRef), nodeRef);
|
||||
final ActivityInfo activityInfo = getActivityInfo(getParentNodeRef(nodeRef), nodeRef);
|
||||
postActivity(Activity_Type.DOWNLOADED, activityInfo, true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user