mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-22 15:12:38 +00:00
Compare commits
4 Commits
23.1.0.171
...
feature/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a8052d0ab | ||
|
|
a996fe2d2f | ||
|
|
e0db9362a4 | ||
|
|
63d853750e |
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
Binary file not shown.
@@ -48,7 +48,7 @@ function tagQuery()
|
||||
}
|
||||
query += "ASPECT:\"{http://www.alfresco.org/model/content/1.0}taggable\"";
|
||||
//MNT-2118 Share inconsistencies when displaying locked files with tags
|
||||
query += " AND -ASPECT:\"{http://www.alfresco.org/model/content/1.0}workingcopy\"";
|
||||
query += " -ASPECT:\"{http://www.alfresco.org/model/content/1.0}workingcopy\"";
|
||||
|
||||
// MNT-20091 check to prevent cm:taggable with NULL
|
||||
query += " AND ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}taggable\"";
|
||||
@@ -60,7 +60,7 @@ function tagQuery()
|
||||
query: query,
|
||||
language: "lucene",
|
||||
page: {
|
||||
// query minimum rows because all useful info will come with facets
|
||||
// query minimum rows because all usefull info will come with facets
|
||||
maxItems: 1,
|
||||
skipCount: 0
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@ function getCategoryNode()
|
||||
else
|
||||
{
|
||||
var queryPath = "/" + catAspect + "/" + encodePath(path);
|
||||
categoryResults = search.luceneSearch("+PATH:\"" + queryPath + "/*\" AND -PATH:\"" + queryPath + "/member\"");
|
||||
categoryResults = search.luceneSearch("+PATH:\"" + queryPath + "/*\" -PATH:\"" + queryPath + "/member\"");
|
||||
}
|
||||
|
||||
// make each result an object and indicate it is selectable in the UI
|
||||
@@ -71,4 +71,4 @@ function encodePath(path)
|
||||
function sortByName(a, b)
|
||||
{
|
||||
return (b.node.name.toLowerCase() > a.node.name.toLowerCase() ? -1 : 1);
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ function main()
|
||||
{
|
||||
query = "+PATH:\"" + parsedArgs.pathNode.qnamePath + "//*\" ";
|
||||
}
|
||||
query += "AND +TYPE:\"cm:content\" AND +@cm\\:content.mimetype:\"image/*\"";
|
||||
query += "+TYPE:\"cm:content\" +@cm\\:content.mimetype:image/*";
|
||||
|
||||
// Sort the list before trimming to page chunks
|
||||
assets = search.query(
|
||||
@@ -52,4 +52,4 @@ function main()
|
||||
/**
|
||||
* Images List Component: images
|
||||
*/
|
||||
model.images = main();
|
||||
model.images = main();
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -39,6 +39,7 @@ public class DirectAccessUrl implements Serializable
|
||||
private String contentUrl;
|
||||
private Date expiryTime;
|
||||
private boolean attachment;
|
||||
private String fileName;
|
||||
|
||||
public String getContentUrl()
|
||||
{
|
||||
@@ -70,18 +71,28 @@ public class DirectAccessUrl implements Serializable
|
||||
this.attachment = attachment;
|
||||
}
|
||||
|
||||
public String getFileName()
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName)
|
||||
{
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
@Override public boolean equals(Object obj)
|
||||
{
|
||||
if (this == obj) return true;
|
||||
if (obj == null || getClass() != obj.getClass()) return false;
|
||||
|
||||
DirectAccessUrl that = (DirectAccessUrl) obj;
|
||||
return attachment == that.attachment && Objects.equals(contentUrl,
|
||||
return Objects.equals(fileName, that.fileName) && attachment == that.attachment && Objects.equals(contentUrl,
|
||||
that.contentUrl) && Objects.equals(expiryTime, that.expiryTime);
|
||||
}
|
||||
|
||||
@Override public int hashCode()
|
||||
{
|
||||
return Objects.hash(contentUrl, expiryTime, attachment);
|
||||
return Objects.hash(contentUrl, expiryTime, attachment, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
</project>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<organization>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -388,6 +388,12 @@
|
||||
<load-on-startup>8</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>cmistck</servlet-name>
|
||||
<servlet-class>org.apache.chemistry.opencmis.tck.runner.WebRunnerServlet</servlet-class>
|
||||
<load-on-startup>8</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>publicapiServlet</servlet-name>
|
||||
<servlet-class>org.alfresco.rest.api.PublicApiWebScriptServlet</servlet-class>
|
||||
@@ -463,6 +469,14 @@
|
||||
<servlet-name>publicapiServlet</servlet-name>
|
||||
<url-pattern>/api/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- The CMIS TCK is deactivated by default. -->
|
||||
<!-- CMISTCK
|
||||
<servlet-mapping>
|
||||
<servlet-name>cmistck</servlet-name>
|
||||
<url-pattern>/cmistck</url-pattern>
|
||||
</servlet-mapping>
|
||||
CMISTCK -->
|
||||
|
||||
<!-- Enterprise servlet-mapping placeholder -->
|
||||
|
||||
|
||||
32
pom.xml
32
pom.xml
@@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Community Repo Parent</name>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
|
||||
<dependency.webscripts.version>8.45</dependency.webscripts.version>
|
||||
<dependency.bouncycastle.version>1.70</dependency.bouncycastle.version>
|
||||
<dependency.mockito-core.version>5.4.0</dependency.mockito-core.version>
|
||||
<dependency.mockito-core.version>4.9.0</dependency.mockito-core.version>
|
||||
<dependency.assertj.version>3.24.2</dependency.assertj.version>
|
||||
<dependency.org-json.version>20230618</dependency.org-json.version>
|
||||
<dependency.commons-dbcp.version>2.9.0</dependency.commons-dbcp.version>
|
||||
@@ -84,8 +84,10 @@
|
||||
<dependency.poi.version>5.2.2</dependency.poi.version>
|
||||
<dependency.poi-ooxml-lite.version>5.2.3</dependency.poi-ooxml-lite.version>
|
||||
<dependency.jboss.logging.version>3.5.0.Final</dependency.jboss.logging.version>
|
||||
<dependency.camel.version>3.21.0</dependency.camel.version> <!-- when bumping this version, please keep track/sync with included netty.io dependencies -->
|
||||
<dependency.netty.version>4.1.95.Final</dependency.netty.version> <!-- must be in sync with camels transitive dependencies, e.g.: netty-common -->
|
||||
<dependency.camel.version>3.20.2</dependency.camel.version> <!-- when bumping this version, please keep track/sync with included netty.io dependencies -->
|
||||
<dependency.netty.version>4.1.87.Final</dependency.netty.version> <!-- must be in sync with camels transitive dependencies, e.g.: netty-common -->
|
||||
<dependency.netty.qpid.version>4.1.82.Final</dependency.netty.qpid.version> <!-- must be in sync with camels transitive dependencies: native-unix-common/native-epoll/native-kqueue -->
|
||||
<dependency.netty-tcnative.version>2.0.56.Final</dependency.netty-tcnative.version> <!-- must be in sync with camels transitive dependencies -->
|
||||
<dependency.activemq.version>5.17.4</dependency.activemq.version>
|
||||
<dependency.apache-compress.version>1.23.0</dependency.apache-compress.version>
|
||||
<dependency.apache.taglibs.version>1.2.5</dependency.apache.taglibs.version>
|
||||
@@ -148,7 +150,7 @@
|
||||
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||
<tag>23.1.0.171</tag>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
@@ -849,6 +851,17 @@
|
||||
<artifactId>camel-mock</artifactId>
|
||||
<version>${dependency.camel.version}</version>
|
||||
</dependency>
|
||||
<!-- Netty non-transitive dependencies declared for depending projects usage in conjunction with Camel's other transitive netty dependencies -->
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-handler-proxy</artifactId>
|
||||
<version>${dependency.netty.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative-classes</artifactId>
|
||||
<version>${dependency.netty-tcnative.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.taglibs</groupId>
|
||||
@@ -893,15 +906,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-bom</artifactId>
|
||||
<version>${dependency.netty.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-bom</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.171</version>
|
||||
<version>23.1.0.167-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@@ -741,7 +741,7 @@
|
||||
<dependency>
|
||||
<groupId>commons-net</groupId>
|
||||
<artifactId>commons-net</artifactId>
|
||||
<version>3.9.0</version>
|
||||
<version>3.8.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -655,6 +655,9 @@ public class ContentServiceImpl implements ContentService, ApplicationContextAwa
|
||||
try
|
||||
{
|
||||
directAccessUrl = store.requestContentDirectUrl(contentUrl, attachment, fileName, contentMimetype, validFor);
|
||||
if (directAccessUrl != null) {
|
||||
directAccessUrl.setFileName(fileName);
|
||||
}
|
||||
}
|
||||
catch (UnsupportedOperationException ex)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -166,34 +166,46 @@ public class ContentServiceImplUnitTest
|
||||
@Test
|
||||
public void testRequestContentDirectUrl_StoreRequestContentDirectUrlIsCalledWithFileNameOverride()
|
||||
{
|
||||
DirectAccessUrl mockDirectAccessUrl = new DirectAccessUrl();
|
||||
mockDirectAccessUrl.setAttachment(true);
|
||||
mockDirectAccessUrl.setContentUrl(SOME_CONTENT_URL);
|
||||
final String fileNameOverride = "fileNameOverride.txt";
|
||||
setupSystemWideDirectAccessConfig(ENABLED);
|
||||
when(mockContentStore.isContentDirectUrlEnabled()).thenReturn(ENABLED);
|
||||
when(mockContentStore.requestContentDirectUrl(anyString(), eq(true), eq(fileNameOverride), anyString(), anyLong())).thenReturn(mockDirectAccessUrl);
|
||||
|
||||
DirectAccessUrl directAccessUrl = contentService.requestContentDirectUrl(NODE_REF, PROP_CONTENT_QNAME, true, 20L, fileNameOverride);
|
||||
assertNull(directAccessUrl);
|
||||
assertEquals("fileName was not set properly on the DirectAccessUrl response", fileNameOverride, directAccessUrl.getFileName());
|
||||
verify(mockContentStore, times(1)).requestContentDirectUrl(anyString(), eq(true), eq(fileNameOverride), anyString(), anyLong());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRequestContentDirectUrl_StoreRequestContentDirectUrlIsCalledWithNodeNamePropertyWhenFileNameOverrideIsNull()
|
||||
{
|
||||
DirectAccessUrl mockDirectAccessUrl = new DirectAccessUrl();
|
||||
mockDirectAccessUrl.setAttachment(true);
|
||||
mockDirectAccessUrl.setContentUrl(SOME_CONTENT_URL);
|
||||
setupSystemWideDirectAccessConfig(ENABLED);
|
||||
when(mockContentStore.isContentDirectUrlEnabled()).thenReturn(ENABLED);
|
||||
when(mockContentStore.requestContentDirectUrl(anyString(), eq(true), eq(SOME_FILE_NAME), anyString(), anyLong())).thenReturn(mockDirectAccessUrl);
|
||||
|
||||
DirectAccessUrl directAccessUrl = contentService.requestContentDirectUrl(NODE_REF, PROP_CONTENT_QNAME, true, 20L, null);
|
||||
assertNull(directAccessUrl);
|
||||
assertEquals("fileName was not set properly on the DirectAccessUrl response", SOME_FILE_NAME, directAccessUrl.getFileName());
|
||||
verify(mockContentStore, times(1)).requestContentDirectUrl(anyString(), eq(true), eq(SOME_FILE_NAME), anyString(), anyLong());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRequestContentDirectUrl_StoreRequestContentDirectUrlIsCalledWithNodeNamePropertyWhenFileNameOverrideIsEmpty()
|
||||
{
|
||||
DirectAccessUrl mockDirectAccessUrl = new DirectAccessUrl();
|
||||
mockDirectAccessUrl.setAttachment(true);
|
||||
mockDirectAccessUrl.setContentUrl(SOME_CONTENT_URL);
|
||||
setupSystemWideDirectAccessConfig(ENABLED);
|
||||
when(mockContentStore.isContentDirectUrlEnabled()).thenReturn(ENABLED);
|
||||
when(mockContentStore.requestContentDirectUrl(anyString(), eq(true), eq(SOME_FILE_NAME), anyString(), anyLong())).thenReturn(mockDirectAccessUrl);
|
||||
|
||||
DirectAccessUrl directAccessUrl = contentService.requestContentDirectUrl(NODE_REF, PROP_CONTENT_QNAME, true, 20L, "");
|
||||
assertNull(directAccessUrl);
|
||||
assertEquals("fileName was not set properly on the DirectAccessUrl response", SOME_FILE_NAME, directAccessUrl.getFileName());
|
||||
verify(mockContentStore, times(1)).requestContentDirectUrl(anyString(), eq(true), eq(SOME_FILE_NAME), anyString(), anyLong());
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -114,7 +114,7 @@ public class LockServiceImplTest extends BaseSpringTest
|
||||
private PolicyComponent policyComponent;
|
||||
|
||||
|
||||
public class LockServicePoliciesImpl implements LockServicePolicies.BeforeLock,
|
||||
private class LockServicePoliciesImpl implements LockServicePolicies.BeforeLock,
|
||||
LockServicePolicies.BeforeUnlock
|
||||
{
|
||||
@Override
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -48,7 +48,11 @@ import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.ArgumentMatchers.nullable;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.BDDMockito.then;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.mockito.Mockito.atLeastOnce;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.mockito.MockitoAnnotations.openMocks;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -93,7 +97,7 @@ public class RuleServiceImplUnitTest
|
||||
@Mock
|
||||
private PermissionService permissionService;
|
||||
@Mock
|
||||
private SimpleCache<NodeRef, List<Rule>> nodeRulesCache;
|
||||
private SimpleCache nodeRulesCache;
|
||||
@Mock
|
||||
private NodeService runtimeNodeService;
|
||||
@Mock
|
||||
|
||||
@@ -8,37 +8,36 @@
|
||||
<property name="location" value="test-messaging.properties" />
|
||||
</bean>
|
||||
|
||||
<bean id="transactionAwareEventProducer" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg type="java.lang.Class" value="org.alfresco.repo.rawevents.TransactionAwareEventProducer" />
|
||||
</bean>
|
||||
|
||||
<bean id="policyComponent" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg type="java.lang.Class" value="org.alfresco.repo.policy.PolicyComponentImpl"/>
|
||||
</bean>
|
||||
|
||||
<bean id="transformRequestProcessor" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg type="java.lang.Class" value="org.alfresco.repo.rendition2.TransformRequestProcessor" />
|
||||
</bean>
|
||||
|
||||
<import resource="classpath:/alfresco/subsystems/Messaging/default/messaging-context.xml" />
|
||||
|
||||
<bean id="messagingExceptionProcessor"
|
||||
class="org.alfresco.messaging.camel.MockExceptionProcessor" />
|
||||
|
||||
<bean id="mockConsumer"
|
||||
class="org.alfresco.messaging.camel.MockConsumer" />
|
||||
|
||||
<bean id="mockExceptionThrowingConsumer"
|
||||
class="org.alfresco.messaging.camel.MockExceptionThrowingConsumer" />
|
||||
<bean id="messagingExceptionProcessor"
|
||||
class="org.alfresco.messaging.camel.MockExceptionProcessor" />
|
||||
|
||||
<bean id="mockConsumer"
|
||||
class="org.alfresco.messaging.camel.MockConsumer" />
|
||||
|
||||
<bean id="mockExceptionThrowingConsumer"
|
||||
class="org.alfresco.messaging.camel.MockExceptionThrowingConsumer" />
|
||||
|
||||
<import resource="testRoutes.xml" />
|
||||
<bean id="testNewRouteLoader" class="org.alfresco.messaging.camel.SpringContextRouteLoader">
|
||||
<property name="camelContextId" value="alfrescoCamelContext" />
|
||||
<property name="routeContextId" value="customRoutes" />
|
||||
</bean>
|
||||
|
||||
<bean id="renditionEventProcessor" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg type="java.lang.Class" value="org.alfresco.repo.rendition2.RenditionEventProcessor"/>
|
||||
<bean id="transactionAwareEventProducer" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg value="org.alfresco.repo.rawevents.TransactionAwareEventProducer" />
|
||||
</bean>
|
||||
|
||||
<bean id="policyComponent" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg value="org.alfresco.repo.policy.PolicyComponentImpl"/>
|
||||
</bean>
|
||||
|
||||
<bean id="renditionEventProcessor" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg value="org.alfresco.repo.rendition2.RenditionEventProcessor"/>
|
||||
</bean>
|
||||
|
||||
<bean id="transformRequestProcessor" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg value="org.alfresco.repo.rendition2.TransformRequestProcessor" />
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -3,23 +3,23 @@
|
||||
<beans>
|
||||
|
||||
<bean id="repositoryHelper" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg type="java.lang.Class" value="org.alfresco.repo.model.Repository" />
|
||||
<constructor-arg value="org.alfresco.repo.model.Repository" />
|
||||
</bean>
|
||||
|
||||
<bean id="SiteService" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg type="java.lang.Class" value="org.alfresco.repo.site.SiteServiceInternal" />
|
||||
<constructor-arg value="org.alfresco.repo.site.SiteServiceInternal" />
|
||||
</bean>
|
||||
|
||||
<bean id="NodeService" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg type="java.lang.Class" value="org.alfresco.service.cmr.repository.NodeService" />
|
||||
<constructor-arg value="org.alfresco.service.cmr.repository.NodeService" />
|
||||
</bean>
|
||||
|
||||
<bean id="NamespaceService" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg type="java.lang.Class" value="org.alfresco.service.namespace.NamespaceService" />
|
||||
<constructor-arg value="org.alfresco.service.namespace.NamespaceService" />
|
||||
</bean>
|
||||
|
||||
<bean id="SearchService" class="org.mockito.Mockito" factory-method="mock">
|
||||
<constructor-arg type="java.lang.Class" value="org.alfresco.service.cmr.search.SearchService" />
|
||||
<constructor-arg value="org.alfresco.service.cmr.search.SearchService" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
Reference in New Issue
Block a user