Merged HEAD (5.2) to 5.2.N (5.2.1)

126520 jkaabimofrad: 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/BRANCHES/DEV/5.2.N/root@126864 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 11:58:26 +00:00
parent bb219d0916
commit 0f836e8090
13 changed files with 228 additions and 158 deletions

View File

@@ -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();