mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD (5.2) to 5.2.N (5.2.1)
127622 jkaabimofrad: Merged API-STRIKES-BACK (5.2.0) to HEAD (5.2) 127621 jkaabimofrad: Replaced anonymous class with lambda, to force the use of Java 8! git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@127728 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -220,24 +220,20 @@ public class QuickShareLinksImpl implements QuickShareLinks, InitializingBean
|
||||
String networkTenantDomain = pair.getFirst();
|
||||
final NodeRef nodeRef = pair.getSecond();
|
||||
|
||||
return TenantUtil.runAsSystemTenant(new TenantUtil.TenantRunAsWork<BinaryResource>()
|
||||
{
|
||||
public BinaryResource doWork() throws Exception
|
||||
return TenantUtil.runAsSystemTenant(() -> {
|
||||
// belt-and-braces (similar to QuickShareContentGet)
|
||||
if (!nodeService.hasAspect(nodeRef, QuickShareModel.ASPECT_QSHARE))
|
||||
{
|
||||
// belt-and-braces (similar to QuickShareContentGet)
|
||||
if (!nodeService.hasAspect(nodeRef, QuickShareModel.ASPECT_QSHARE))
|
||||
{
|
||||
throw new InvalidNodeRefException(nodeRef);
|
||||
}
|
||||
throw new InvalidNodeRefException(nodeRef);
|
||||
}
|
||||
|
||||
if (renditionId != null)
|
||||
{
|
||||
return renditions.getContent(nodeRef, renditionId, parameters);
|
||||
}
|
||||
else
|
||||
{
|
||||
return nodes.getContent(nodeRef, parameters, false);
|
||||
}
|
||||
if (renditionId != null)
|
||||
{
|
||||
return renditions.getContent(nodeRef, renditionId, parameters);
|
||||
}
|
||||
else
|
||||
{
|
||||
return nodes.getContent(nodeRef, parameters, false);
|
||||
}
|
||||
}, networkTenantDomain);
|
||||
}
|
||||
@@ -403,21 +399,17 @@ public class QuickShareLinksImpl implements QuickShareLinks, InitializingBean
|
||||
String networkTenantDomain = pair.getFirst();
|
||||
final NodeRef nodeRef = pair.getSecond();
|
||||
|
||||
return TenantUtil.runAsSystemTenant(new TenantUtil.TenantRunAsWork<CollectionWithPagingInfo<Rendition>>()
|
||||
{
|
||||
public CollectionWithPagingInfo<Rendition> doWork() throws Exception
|
||||
{
|
||||
String nodeId = nodeRef.getId();
|
||||
return TenantUtil.runAsSystemTenant(() -> {
|
||||
String nodeId = nodeRef.getId();
|
||||
|
||||
// hmm ... can we simplify ?
|
||||
String filterStatusCreated = "("+Renditions.PARAM_STATUS+"='"+Rendition.RenditionStatus.CREATED+"')";
|
||||
Query whereQuery = ResourceWebScriptHelper.getWhereClause(filterStatusCreated);
|
||||
Params.RecognizedParams recParams = new Params.RecognizedParams(null, null, null, null, null, null, whereQuery, null, false);
|
||||
Parameters params = Params.valueOf(recParams, null, null, null);
|
||||
// hmm ... can we simplify ?
|
||||
String filterStatusCreated = "(" + Renditions.PARAM_STATUS + "='" + Rendition.RenditionStatus.CREATED + "')";
|
||||
Query whereQuery = ResourceWebScriptHelper.getWhereClause(filterStatusCreated);
|
||||
Params.RecognizedParams recParams = new Params.RecognizedParams(null, null, null, null, null, null, whereQuery, null, false);
|
||||
Parameters params = Params.valueOf(recParams, null, null, null);
|
||||
|
||||
return renditions.getRenditions(nodeId, params);
|
||||
return renditions.getRenditions(nodeId, params);
|
||||
|
||||
}
|
||||
}, networkTenantDomain);
|
||||
}
|
||||
catch (InvalidSharedIdException ex)
|
||||
|
Reference in New Issue
Block a user