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)
122978 jvonka: RA-766: Update REST fwk - implement "include" query param (used by nodes & shared-links) and deprecate "select" (still used by tasks & cmm). git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126520 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -78,9 +78,7 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.extensions.webscripts.WebScriptException;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -184,7 +182,7 @@ public class QuickShareLinksImpl implements QuickShareLinks, InitializingBean
|
||||
{
|
||||
public QuickShareLink doWork() throws Exception
|
||||
{
|
||||
return getQuickShareInfo(sharedId, noAuth, parameters.getSelectedProperties());
|
||||
return getQuickShareInfo(sharedId, noAuth, parameters.getInclude());
|
||||
}
|
||||
}, networkTenantDomain);
|
||||
}
|
||||
@@ -309,7 +307,7 @@ public class QuickShareLinksImpl implements QuickShareLinks, InitializingBean
|
||||
|
||||
boolean noAuth = (AuthenticationUtil.getRunAsUser() == null);
|
||||
|
||||
List<String> selectParam = parameters.getSelectedProperties();
|
||||
List<String> includeParam = parameters.getInclude();
|
||||
|
||||
for (QuickShareLink qs : nodeIds)
|
||||
{
|
||||
@@ -336,7 +334,7 @@ public class QuickShareLinksImpl implements QuickShareLinks, InitializingBean
|
||||
try
|
||||
{
|
||||
QuickShareDTO qsDto = quickShareService.shareContent(nodeRef);
|
||||
result.add(getQuickShareInfo(qsDto.getId(), noAuth, selectParam));
|
||||
result.add(getQuickShareInfo(qsDto.getId(), noAuth, includeParam));
|
||||
}
|
||||
catch (InvalidNodeRefException inre)
|
||||
{
|
||||
@@ -444,12 +442,12 @@ public class QuickShareLinksImpl implements QuickShareLinks, InitializingBean
|
||||
|
||||
List<QuickShareLink> qsLinks = new ArrayList<>(results.length());
|
||||
|
||||
List<String> selectParam = parameters.getSelectedProperties();
|
||||
List<String> includeParam = parameters.getInclude();
|
||||
|
||||
for (ResultSetRow row : results)
|
||||
{
|
||||
NodeRef nodeRef = row.getNodeRef();
|
||||
qsLinks.add(getQuickShareInfo(nodeRef, false, selectParam));
|
||||
qsLinks.add(getQuickShareInfo(nodeRef, false, includeParam));
|
||||
}
|
||||
|
||||
results.close();
|
||||
|
Reference in New Issue
Block a user