mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ACS-8871: Bump Spring from 6.0.19 to 6.1.13 (#2947)
* ACS-8871: Bump Spring from 6.0.19 to 6.1.13
This commit is contained in:
committed by
GitHub
parent
aeebd3dcc6
commit
27962726b4
2
pom.xml
2
pom.xml
@@ -57,7 +57,7 @@
|
|||||||
<dependency.acs-event-model.version>0.0.27</dependency.acs-event-model.version>
|
<dependency.acs-event-model.version>0.0.27</dependency.acs-event-model.version>
|
||||||
|
|
||||||
<dependency.aspectj.version>1.9.22.1</dependency.aspectj.version>
|
<dependency.aspectj.version>1.9.22.1</dependency.aspectj.version>
|
||||||
<dependency.spring.version>6.0.19</dependency.spring.version>
|
<dependency.spring.version>6.1.13</dependency.spring.version>
|
||||||
<dependency.spring-security.version>6.3.3</dependency.spring-security.version>
|
<dependency.spring-security.version>6.3.3</dependency.spring-security.version>
|
||||||
<dependency.antlr.version>3.5.3</dependency.antlr.version>
|
<dependency.antlr.version>3.5.3</dependency.antlr.version>
|
||||||
<dependency.jackson.version>2.17.2</dependency.jackson.version>
|
<dependency.jackson.version>2.17.2</dependency.jackson.version>
|
||||||
|
@@ -25,15 +25,24 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.repo.web.scripts.content;
|
package org.alfresco.repo.web.scripts.content;
|
||||||
|
|
||||||
|
import static java.util.Optional.ofNullable;
|
||||||
|
import static java.util.function.Predicate.not;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import jakarta.servlet.ServletContext;
|
import jakarta.servlet.ServletContext;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.springframework.extensions.webscripts.WebScriptException;
|
||||||
|
import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||||
|
import org.springframework.extensions.webscripts.WebScriptResponse;
|
||||||
|
import org.springframework.web.context.ServletContextAware;
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.repo.web.scripts.MimeTypeUtil;
|
import org.alfresco.repo.web.scripts.MimeTypeUtil;
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
@@ -42,13 +51,6 @@ import org.alfresco.service.cmr.repository.ContentService;
|
|||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.namespace.NamespaceService;
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
import org.springframework.extensions.webscripts.WebScriptException;
|
|
||||||
import org.springframework.extensions.webscripts.WebScriptRequest;
|
|
||||||
import org.springframework.extensions.webscripts.WebScriptResponse;
|
|
||||||
import org.springframework.web.context.ServletContextAware;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content Retrieval Service
|
* Content Retrieval Service
|
||||||
@@ -62,7 +64,7 @@ public class ContentGet extends StreamContent implements ServletContextAware
|
|||||||
// Logger
|
// Logger
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private static final Log logger = LogFactory.getLog(ContentGet.class);
|
private static final Log logger = LogFactory.getLog(ContentGet.class);
|
||||||
|
|
||||||
// Component dependencies
|
// Component dependencies
|
||||||
private ServletContext servletContext;
|
private ServletContext servletContext;
|
||||||
private DictionaryService dictionaryService;
|
private DictionaryService dictionaryService;
|
||||||
@@ -72,18 +74,19 @@ public class ContentGet extends StreamContent implements ServletContextAware
|
|||||||
private List<String> nonAttachContentTypes = Collections.emptyList();
|
private List<String> nonAttachContentTypes = Collections.emptyList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param nonAttachContentTypes List<String>
|
* @param nonAttachContentTypes
|
||||||
|
* List<String>
|
||||||
*/
|
*/
|
||||||
public void setNonAttachContentTypes(List<String> nonAttachContentTypes)
|
public void setNonAttachContentTypes(List<String> nonAttachContentTypes)
|
||||||
{
|
{
|
||||||
if (nonAttachContentTypes != null && !nonAttachContentTypes.isEmpty())
|
this.nonAttachContentTypes = ofNullable(nonAttachContentTypes)
|
||||||
{
|
.map(types -> types.stream().filter(not(String::isBlank)).toList())
|
||||||
this.nonAttachContentTypes = nonAttachContentTypes;
|
.orElse(Collections.emptyList());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param servletContext ServletContext
|
* @param servletContext
|
||||||
|
* ServletContext
|
||||||
*/
|
*/
|
||||||
public void setServletContext(ServletContext servletContext)
|
public void setServletContext(ServletContext servletContext)
|
||||||
{
|
{
|
||||||
@@ -91,23 +94,26 @@ public class ContentGet extends StreamContent implements ServletContextAware
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param dictionaryService DictionaryService
|
* @param dictionaryService
|
||||||
|
* DictionaryService
|
||||||
*/
|
*/
|
||||||
public void setDictionaryService(DictionaryService dictionaryService)
|
public void setDictionaryService(DictionaryService dictionaryService)
|
||||||
{
|
{
|
||||||
this.dictionaryService = dictionaryService;
|
this.dictionaryService = dictionaryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param namespaceService NamespaceService
|
* @param namespaceService
|
||||||
|
* NamespaceService
|
||||||
*/
|
*/
|
||||||
public void setNamespaceService(NamespaceService namespaceService)
|
public void setNamespaceService(NamespaceService namespaceService)
|
||||||
{
|
{
|
||||||
this.namespaceService = namespaceService;
|
this.namespaceService = namespaceService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param contentService ContentService
|
* @param contentService
|
||||||
|
* ContentService
|
||||||
*/
|
*/
|
||||||
public void setContentService(ContentService contentService)
|
public void setContentService(ContentService contentService)
|
||||||
{
|
{
|
||||||
@@ -118,7 +124,7 @@ public class ContentGet extends StreamContent implements ServletContextAware
|
|||||||
* @see org.springframework.extensions.webscripts.WebScript#execute(WebScriptRequest, WebScriptResponse)
|
* @see org.springframework.extensions.webscripts.WebScript#execute(WebScriptRequest, WebScriptResponse)
|
||||||
*/
|
*/
|
||||||
public void execute(WebScriptRequest req, WebScriptResponse res)
|
public void execute(WebScriptRequest req, WebScriptResponse res)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
// create map of args
|
// create map of args
|
||||||
String[] names = req.getParameterNames();
|
String[] names = req.getParameterNames();
|
||||||
@@ -127,10 +133,10 @@ public class ContentGet extends StreamContent implements ServletContextAware
|
|||||||
{
|
{
|
||||||
args.put(name, req.getParameter(name));
|
args.put(name, req.getParameter(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create map of template vars
|
// create map of template vars
|
||||||
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
|
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
|
||||||
|
|
||||||
// create object reference from url
|
// create object reference from url
|
||||||
ObjectReference reference = createObjectReferenceFromUrl(args, templateVars);
|
ObjectReference reference = createObjectReferenceFromUrl(args, templateVars);
|
||||||
NodeRef nodeRef = reference.getNodeRef();
|
NodeRef nodeRef = reference.getNodeRef();
|
||||||
@@ -139,7 +145,6 @@ public class ContentGet extends StreamContent implements ServletContextAware
|
|||||||
throw new WebScriptException(HttpServletResponse.SC_NOT_FOUND, "Unable to find " + reference.toString());
|
throw new WebScriptException(HttpServletResponse.SC_NOT_FOUND, "Unable to find " + reference.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// render content
|
// render content
|
||||||
QName propertyQName = ContentModel.PROP_CONTENT;
|
QName propertyQName = ContentModel.PROP_CONTENT;
|
||||||
String contentPart = templateVars.get("property");
|
String contentPart = templateVars.get("property");
|
||||||
@@ -186,7 +191,7 @@ public class ContentGet extends StreamContent implements ServletContextAware
|
|||||||
if (attach && rfc5987Supported)
|
if (attach && rfc5987Supported)
|
||||||
{
|
{
|
||||||
String name = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
|
String name = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
|
||||||
|
|
||||||
// maintain the original name of the node during the download - do not modify it - see MNT-16510
|
// maintain the original name of the node during the download - do not modify it - see MNT-16510
|
||||||
streamContent(req, res, nodeRef, propertyQName, attach, name, model);
|
streamContent(req, res, nodeRef, propertyQName, attach, name, model);
|
||||||
}
|
}
|
||||||
@@ -195,4 +200,4 @@ public class ContentGet extends StreamContent implements ServletContextAware
|
|||||||
streamContent(req, res, nodeRef, propertyQName, attach, null, model);
|
streamContent(req, res, nodeRef, propertyQName, attach, null, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -250,7 +250,7 @@
|
|||||||
<property name="delegate" ref="webscript.content.streamer" />
|
<property name="delegate" ref="webscript.content.streamer" />
|
||||||
<property name="contentService" ref="contentService" />
|
<property name="contentService" ref="contentService" />
|
||||||
<property name="repository" ref="repositoryHelper" />
|
<property name="repository" ref="repositoryHelper" />
|
||||||
<property name="nonAttachContentTypes" value="#{T(java.util.Arrays).asList('${content.nonAttach.mimetypes}')}" />
|
<property name="nonAttachContentTypes" value="#{'${content.nonAttach.mimetypes}'.split(',')}" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- Content Info -->
|
<!-- Content Info -->
|
||||||
|
@@ -997,7 +997,7 @@ public class LockServiceImpl implements LockService,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Never return a null LockState
|
// Never return a null LockState
|
||||||
Assert.notNull(lockState);
|
Assert.notNull(lockState, "The lockState should not be null");
|
||||||
return lockState;
|
return lockState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -68,4 +68,4 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ../../../repository/src/test/resources/realms/alfresco-realm.json:/opt/keycloak/data/import/alfresco-realm.json
|
- ../../../repository/src/test/resources/realms/alfresco-realm.json:/opt/keycloak/data/import/alfresco-realm.json
|
||||||
ports:
|
ports:
|
||||||
- 8999:8080
|
- 8999:8080
|
||||||
|
Reference in New Issue
Block a user