mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-11-05 15:32:21 +00:00
Compare commits
4 Commits
23.1.0.174
...
feature/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a8052d0ab | ||
|
|
a996fe2d2f | ||
|
|
e0db9362a4 | ||
|
|
63d853750e |
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: >
|
if: >
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request') &&
|
((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request') &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
@@ -87,7 +87,7 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
!contains(github.event.head_commit.message, '[skip repo]') &&
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
@@ -108,7 +108,7 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
!contains(github.event.head_commit.message, '[skip repo]') &&
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -153,7 +153,7 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[skip db]')) ||
|
!contains(github.event.head_commit.message, '[skip db]')) ||
|
||||||
contains(github.event.head_commit.message, '[db]')) &&
|
contains(github.event.head_commit.message, '[db]')) &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -183,7 +183,7 @@ jobs:
|
|||||||
contains(github.event.head_commit.message, '[latest db]') ||
|
contains(github.event.head_commit.message, '[latest db]') ||
|
||||||
contains(github.event.head_commit.message, '[db]')) &&
|
contains(github.event.head_commit.message, '[db]')) &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
@@ -209,7 +209,7 @@ jobs:
|
|||||||
contains(github.event.head_commit.message, '[latest db]') ||
|
contains(github.event.head_commit.message, '[latest db]') ||
|
||||||
contains(github.event.head_commit.message, '[db]')) &&
|
contains(github.event.head_commit.message, '[db]')) &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
@@ -234,7 +234,7 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[skip db]')) ||
|
!contains(github.event.head_commit.message, '[skip db]')) ||
|
||||||
contains(github.event.head_commit.message, '[db]')) &&
|
contains(github.event.head_commit.message, '[db]')) &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
@@ -259,7 +259,7 @@ jobs:
|
|||||||
contains(github.event.head_commit.message, '[latest db]') ||
|
contains(github.event.head_commit.message, '[latest db]') ||
|
||||||
contains(github.event.head_commit.message, '[db]')) &&
|
contains(github.event.head_commit.message, '[db]')) &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
@@ -282,7 +282,7 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
!contains(github.event.head_commit.message, '[skip repo]') &&
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
@@ -303,7 +303,7 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
!contains(github.event.head_commit.message, '[skip repo]') &&
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -372,7 +372,7 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[skip tas]')) ||
|
!contains(github.event.head_commit.message, '[skip tas]')) ||
|
||||||
contains(github.event.head_commit.message, '[tas]')) &&
|
contains(github.event.head_commit.message, '[tas]')) &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -439,7 +439,7 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
!contains(github.event.head_commit.message, '[skip repo]') &&
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
@@ -462,7 +462,7 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[skip ags]')) ||
|
!contains(github.event.head_commit.message, '[skip ags]')) ||
|
||||||
contains(github.event.head_commit.message, '[ags]')) &&
|
contains(github.event.head_commit.message, '[ags]')) &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -493,7 +493,7 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[skip ags]')) ||
|
!contains(github.event.head_commit.message, '[skip ags]')) ||
|
||||||
contains(github.event.head_commit.message, '[ags on MySQL]')) &&
|
contains(github.event.head_commit.message, '[ags on MySQL]')) &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -524,7 +524,7 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[skip ags]') && !contains(github.event.head_commit.message, '[skip tas]')) ||
|
!contains(github.event.head_commit.message, '[skip ags]') && !contains(github.event.head_commit.message, '[skip tas]')) ||
|
||||||
(contains(github.event.head_commit.message, '[ags]') && contains(github.event.head_commit.message, '[tas]'))) &&
|
(contains(github.event.head_commit.message, '[ags]') && contains(github.event.head_commit.message, '[tas]'))) &&
|
||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
env:
|
env:
|
||||||
REQUIRES_LOCAL_IMAGES: true
|
REQUIRES_LOCAL_IMAGES: true
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
Binary file not shown.
@@ -48,7 +48,7 @@ function tagQuery()
|
|||||||
}
|
}
|
||||||
query += "ASPECT:\"{http://www.alfresco.org/model/content/1.0}taggable\"";
|
query += "ASPECT:\"{http://www.alfresco.org/model/content/1.0}taggable\"";
|
||||||
//MNT-2118 Share inconsistencies when displaying locked files with tags
|
//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
|
// MNT-20091 check to prevent cm:taggable with NULL
|
||||||
query += " AND ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}taggable\"";
|
query += " AND ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}taggable\"";
|
||||||
@@ -60,7 +60,7 @@ function tagQuery()
|
|||||||
query: query,
|
query: query,
|
||||||
language: "lucene",
|
language: "lucene",
|
||||||
page: {
|
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,
|
maxItems: 1,
|
||||||
skipCount: 0
|
skipCount: 0
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function getCategoryNode()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var queryPath = "/" + catAspect + "/" + encodePath(path);
|
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
|
// make each result an object and indicate it is selectable in the UI
|
||||||
@@ -71,4 +71,4 @@ function encodePath(path)
|
|||||||
function sortByName(a, b)
|
function sortByName(a, b)
|
||||||
{
|
{
|
||||||
return (b.node.name.toLowerCase() > a.node.name.toLowerCase() ? -1 : 1);
|
return (b.node.name.toLowerCase() > a.node.name.toLowerCase() ? -1 : 1);
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ function main()
|
|||||||
{
|
{
|
||||||
query = "+PATH:\"" + parsedArgs.pathNode.qnamePath + "//*\" ";
|
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
|
// Sort the list before trimming to page chunks
|
||||||
assets = search.query(
|
assets = search.query(
|
||||||
@@ -52,4 +52,4 @@ function main()
|
|||||||
/**
|
/**
|
||||||
* Images List Component: images
|
* Images List Component: images
|
||||||
*/
|
*/
|
||||||
model.images = main();
|
model.images = main();
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public class DirectAccessUrl implements Serializable
|
|||||||
private String contentUrl;
|
private String contentUrl;
|
||||||
private Date expiryTime;
|
private Date expiryTime;
|
||||||
private boolean attachment;
|
private boolean attachment;
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
public String getContentUrl()
|
public String getContentUrl()
|
||||||
{
|
{
|
||||||
@@ -70,18 +71,28 @@ public class DirectAccessUrl implements Serializable
|
|||||||
this.attachment = attachment;
|
this.attachment = attachment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getFileName()
|
||||||
|
{
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileName(String fileName)
|
||||||
|
{
|
||||||
|
this.fileName = fileName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override public boolean equals(Object obj)
|
@Override public boolean equals(Object obj)
|
||||||
{
|
{
|
||||||
if (this == obj) return true;
|
if (this == obj) return true;
|
||||||
if (obj == null || getClass() != obj.getClass()) return false;
|
if (obj == null || getClass() != obj.getClass()) return false;
|
||||||
|
|
||||||
DirectAccessUrl that = (DirectAccessUrl) obj;
|
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);
|
that.contentUrl) && Objects.equals(expiryTime, that.expiryTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public int hashCode()
|
@Override public int hashCode()
|
||||||
{
|
{
|
||||||
return Objects.hash(contentUrl, expiryTime, attachment);
|
return Objects.hash(contentUrl, expiryTime, attachment, fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -9,6 +9,6 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<organization>
|
<organization>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
package org.alfresco.rest.favorites;
|
package org.alfresco.rest.favorites;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.alfresco.dataprep.CMISUtil.DocumentType;
|
import org.alfresco.dataprep.CMISUtil.DocumentType;
|
||||||
import org.alfresco.rest.RestTest;
|
import org.alfresco.rest.RestTest;
|
||||||
import org.alfresco.rest.model.RestErrorModel;
|
import org.alfresco.rest.model.RestErrorModel;
|
||||||
import org.alfresco.rest.model.RestPersonFavoritesModel;
|
import org.alfresco.rest.model.RestPersonFavoritesModel;
|
||||||
import org.alfresco.rest.model.RestPersonFavoritesModelsCollection;
|
import org.alfresco.rest.model.RestPersonFavoritesModelsCollection;
|
||||||
import org.alfresco.rest.model.RestSiteModel;
|
import org.alfresco.rest.model.RestSiteModel;
|
||||||
import org.alfresco.rest.search.RestRequestQueryModel;
|
|
||||||
import org.alfresco.rest.search.SearchRequest;
|
|
||||||
import org.alfresco.utility.Utility;
|
|
||||||
import org.alfresco.utility.constants.UserRole;
|
import org.alfresco.utility.constants.UserRole;
|
||||||
import org.alfresco.utility.data.DataUser.ListUserWithRoles;
|
import org.alfresco.utility.data.DataUser.ListUserWithRoles;
|
||||||
import org.alfresco.utility.model.FileModel;
|
import org.alfresco.utility.model.FileModel;
|
||||||
@@ -20,7 +15,6 @@ import org.alfresco.utility.model.TestGroup;
|
|||||||
import org.alfresco.utility.model.UserModel;
|
import org.alfresco.utility.model.UserModel;
|
||||||
import org.alfresco.utility.testrail.ExecutionType;
|
import org.alfresco.utility.testrail.ExecutionType;
|
||||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||||
import org.hamcrest.Matchers;
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.testng.annotations.BeforeClass;
|
import org.testng.annotations.BeforeClass;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
@@ -67,7 +61,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.SANITY,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.SANITY,
|
||||||
description = "Verify Manager user gets favorites with Rest API and status code is 200")
|
description = "Verify Manager user gets favorites with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.SANITY })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.SANITY })
|
||||||
public void managerIsAbleToRetrieveFavorites()
|
public void managerIsAbleToRetrieveFavorites() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteManager));
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteManager));
|
||||||
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -83,7 +77,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
description = "Verify user gets status code 401 if authentication call fails")
|
description = "Verify user gets status code 401 if authentication call fails")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.SANITY })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.SANITY })
|
||||||
// @Bug(id = "MNT-16904", description = "It fails only on environment with tenants")
|
// @Bug(id = "MNT-16904", description = "It fails only on environment with tenants")
|
||||||
public void userIsNotAbleToRetrieveFavoritesIfAuthenticationFails()
|
public void userIsNotAbleToRetrieveFavoritesIfAuthenticationFails() throws Exception
|
||||||
{
|
{
|
||||||
UserModel siteManager = firstSiteUsers.getOneUserWithRole(UserRole.SiteManager);
|
UserModel siteManager = firstSiteUsers.getOneUserWithRole(UserRole.SiteManager);
|
||||||
siteManager.setPassword("wrongPassword");
|
siteManager.setPassword("wrongPassword");
|
||||||
@@ -94,7 +88,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify Admin user gets favorites sites with Rest API and status code is 200")
|
description = "Verify Admin user gets favorites sites with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void adminIsAbleToRetrieveFavoritesSites()
|
public void adminIsAbleToRetrieveFavoritesSites() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(adminUserModel).addSiteToFavorites(firstSiteModel);
|
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(adminUserModel).addSiteToFavorites(firstSiteModel);
|
||||||
restClient.withCoreAPI().usingUser(adminUserModel).addSiteToFavorites(secondSiteModel);
|
restClient.withCoreAPI().usingUser(adminUserModel).addSiteToFavorites(secondSiteModel);
|
||||||
@@ -109,7 +103,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify Admin user gets favorites folders with Rest API and status code is 200")
|
description = "Verify Admin user gets favorites folders with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void adminIsAbleToRetrieveFavoritesFolders()
|
public void adminIsAbleToRetrieveFavoritesFolders() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(adminUserModel).addFolderToFavorites(firstFolderModel);
|
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(adminUserModel).addFolderToFavorites(firstFolderModel);
|
||||||
restClient.withCoreAPI().usingUser(adminUserModel).addFolderToFavorites(secondFolderModel);
|
restClient.withCoreAPI().usingUser(adminUserModel).addFolderToFavorites(secondFolderModel);
|
||||||
@@ -124,7 +118,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify Admin user gets favorites files with Rest API and status code is 200")
|
description = "Verify Admin user gets favorites files with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void adminIsAbleToRetrieveFavoritesFiles()
|
public void adminIsAbleToRetrieveFavoritesFiles() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(adminUserModel).addFileToFavorites(firstFileModel);
|
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(adminUserModel).addFileToFavorites(firstFileModel);
|
||||||
restClient.withCoreAPI().usingUser(adminUserModel).addFileToFavorites(secondFileModel);
|
restClient.withCoreAPI().usingUser(adminUserModel).addFileToFavorites(secondFileModel);
|
||||||
@@ -139,7 +133,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify Collaborator user gets favorites with Rest API and status code is 200")
|
description = "Verify Collaborator user gets favorites with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void collaboratorIsAbleToRetrieveFavorites()
|
public void collaboratorIsAbleToRetrieveFavorites() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator))
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||||
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -154,7 +148,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify Contributor user gets favorites with Rest API and status code is 200")
|
description = "Verify Contributor user gets favorites with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void contributorIsAbleToRetrieveFavorites()
|
public void contributorIsAbleToRetrieveFavorites() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteContributor))
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteContributor))
|
||||||
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -169,7 +163,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify Consumer user gets favorites with Rest API and status code is 200")
|
description = "Verify Consumer user gets favorites with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void consumerIsAbleToRetrieveFavorites()
|
public void consumerIsAbleToRetrieveFavorites() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer))
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer))
|
||||||
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -184,7 +178,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify user doesn't have permission to get favorites of another user with Rest API and status code is 404")
|
description = "Verify user doesn't have permission to get favorites of another user with Rest API and status code is 404")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsNotAbleToRetrieveFavoritesOfAnotherUser()
|
public void userIsNotAbleToRetrieveFavoritesOfAnotherUser() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer))
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer))
|
||||||
.withCoreAPI().usingUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator)).getFavorites();
|
.withCoreAPI().usingUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator)).getFavorites();
|
||||||
@@ -195,7 +189,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify user doesn't have permission to get favorites of admin user with Rest API and status code is 200")
|
description = "Verify user doesn't have permission to get favorites of admin user with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsNotAbleToRetrieveFavoritesOfAdminUser()
|
public void userIsNotAbleToRetrieveFavoritesOfAdminUser() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer)).withCoreAPI()
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer)).withCoreAPI()
|
||||||
.usingUser(adminUserModel).getFavorites();
|
.usingUser(adminUserModel).getFavorites();
|
||||||
@@ -206,7 +200,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify admin user doesn't have permission to get favorites of another user with Rest API and status code is 200")
|
description = "Verify admin user doesn't have permission to get favorites of another user with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void adminIsNotAbleToRetrieveFavoritesOfAnotherUser()
|
public void adminIsNotAbleToRetrieveFavoritesOfAnotherUser() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator))
|
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator))
|
||||||
.getFavorites();
|
.getFavorites();
|
||||||
@@ -217,7 +211,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify User gets only favorites sites with Rest API and status code is 200")
|
description = "Verify User gets only favorites sites with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToRetrieveOnlyFavoritesSites()
|
public void userIsAbleToRetrieveOnlyFavoritesSites() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteManager));
|
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteManager));
|
||||||
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -235,7 +229,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify User gets only favorites files with Rest API and status code is 200")
|
description = "Verify User gets only favorites files with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToRetrieveOnlyFavoritesFiles()
|
public void userIsAbleToRetrieveOnlyFavoritesFiles() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator));
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator));
|
||||||
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -253,7 +247,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify User gets only favorites folders with Rest API and status code is 200")
|
description = "Verify User gets only favorites folders with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToRetrieveOnlyFavoritesFolders()
|
public void userIsAbleToRetrieveOnlyFavoritesFolders() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator));
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator));
|
||||||
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -271,7 +265,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify User gets only favorites files or folders with Rest API and status code is 200")
|
description = "Verify User gets only favorites files or folders with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToRetrieveFavoritesFilesOrFolders()
|
public void userIsAbleToRetrieveFavoritesFilesOrFolders() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer));
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer));
|
||||||
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -292,7 +286,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify User gets only favorites files or sites with Rest API and status code is 200")
|
description = "Verify User gets only favorites files or sites with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToRetrieveFavoritesFilesOrSites()
|
public void userIsAbleToRetrieveFavoritesFilesOrSites() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteManager));
|
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteManager));
|
||||||
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -313,7 +307,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify User gets only favorites folders or sites with Rest API and status code is 200")
|
description = "Verify User gets only favorites folders or sites with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToRetrieveFavoritesFoldersOrSites()
|
public void userIsAbleToRetrieveFavoritesFoldersOrSites() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteManager));
|
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteManager));
|
||||||
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -334,7 +328,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify User gets all favorites with Rest API and status code is 200")
|
description = "Verify User gets all favorites with Rest API and status code is 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToRetrieveAllFavorites()
|
public void userIsAbleToRetrieveAllFavorites() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator));
|
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator));
|
||||||
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -365,7 +359,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify request for a user with no favorites returns status 200")
|
description = "Verify request for a user with no favorites returns status 200")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userHasNoFavorites()
|
public void userHasNoFavorites() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteContributor));
|
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteContributor));
|
||||||
|
|
||||||
@@ -377,7 +371,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify request using invalid where parameter returns status 400")
|
description = "Verify request using invalid where parameter returns status 400")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void getFavoritesUsingInvalidWhereParameter()
|
public void getFavoritesUsingInvalidWhereParameter() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer));
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer));
|
||||||
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -393,7 +387,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify User gets correct favorites after deleting a favorite")
|
description = "Verify User gets correct favorites after deleting a favorite")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void checkFavoriteFolderIsRemoved()
|
public void checkFavoriteFolderIsRemoved() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteManager));
|
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteManager));
|
||||||
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
|
||||||
@@ -411,7 +405,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify get favorites specifying -me- string in place of <personid> for request")
|
description = "Verify get favorites specifying -me- string in place of <personid> for request")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToGetFavoritesWhenUsingMeAsUsername()
|
public void userIsAbleToGetFavoritesWhenUsingMeAsUsername() throws Exception
|
||||||
{
|
{
|
||||||
userFavorites = restClient.authenticateUser(userModel).withCoreAPI().usingMe().getFavorites();
|
userFavorites = restClient.authenticateUser(userModel).withCoreAPI().usingMe().getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||||
@@ -421,7 +415,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify get favorites using empty for where parameter for request")
|
description = "Verify get favorites using empty for where parameter for request")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToGetFavoritesWhenUsingEmptyWhereParameter()
|
public void userIsAbleToGetFavoritesWhenUsingEmptyWhereParameter() throws Exception
|
||||||
{
|
{
|
||||||
userFavorites = restClient.authenticateUser(adminUserModel).withCoreAPI().usingAuthUser().where().getFavorites();
|
userFavorites = restClient.authenticateUser(adminUserModel).withCoreAPI().usingAuthUser().where().getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST)
|
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST)
|
||||||
@@ -431,7 +425,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API,TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API,TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify that for invalid maxItems parameter status code returned is 400.")
|
description = "Verify that for invalid maxItems parameter status code returned is 400.")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void checkInvalidMaxItemsStatusCode()
|
public void checkInvalidMaxItemsStatusCode() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(adminUserModel).withParams("maxItems=AB").withCoreAPI().usingUser(adminUserModel).getFavorites();
|
restClient.authenticateUser(adminUserModel).withParams("maxItems=AB").withCoreAPI().usingUser(adminUserModel).getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST).assertLastError().containsSummary("Invalid paging parameter");
|
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST).assertLastError().containsSummary("Invalid paging parameter");
|
||||||
@@ -440,7 +434,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API,TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API,TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify that for invalid skipCount parameter status code returned is 400.")
|
description = "Verify that for invalid skipCount parameter status code returned is 400.")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void checkInvalidSkipCountStatusCode()
|
public void checkInvalidSkipCountStatusCode() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(adminUserModel).withParams("skipCount=AB").withCoreAPI().usingUser(adminUserModel).getFavorites();
|
restClient.authenticateUser(adminUserModel).withParams("skipCount=AB").withCoreAPI().usingUser(adminUserModel).getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST).assertLastError().containsSummary("Invalid paging parameter");
|
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST).assertLastError().containsSummary("Invalid paging parameter");
|
||||||
@@ -449,7 +443,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify get favorites when using invalid network id for non-tenant user")
|
description = "Verify get favorites when using invalid network id for non-tenant user")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void getFavoritesWhenNetworkIdIsInvalid()
|
public void getFavoritesWhenNetworkIdIsInvalid() throws Exception
|
||||||
{
|
{
|
||||||
UserModel networkUserModel = dataUser.createRandomTestUser();
|
UserModel networkUserModel = dataUser.createRandomTestUser();
|
||||||
networkUserModel.setDomain("invalidNetwork");
|
networkUserModel.setDomain("invalidNetwork");
|
||||||
@@ -460,7 +454,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify get favorites using AND instead of OR in where parameter for request")
|
description = "Verify get favorites using AND instead of OR in where parameter for request")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsNotAbleToGetFavoritesWhenUsingANDInWhereParameter()
|
public void userIsNotAbleToGetFavoritesWhenUsingANDInWhereParameter() throws Exception
|
||||||
{
|
{
|
||||||
userFavorites = restClient.withCoreAPI().usingAuthUser().where().targetFolderExist().invalidWhereParameter("AND").targetFileExist().getFavorites();
|
userFavorites = restClient.withCoreAPI().usingAuthUser().where().targetFolderExist().invalidWhereParameter("AND").targetFileExist().getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST)
|
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST)
|
||||||
@@ -470,7 +464,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify get favorites using wrong name instead of EXISTS in where parameter for request")
|
description = "Verify get favorites using wrong name instead of EXISTS in where parameter for request")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsNotAbleToGetFavoritesWhenUsingWrongWhereParameter()
|
public void userIsNotAbleToGetFavoritesWhenUsingWrongWhereParameter() throws Exception
|
||||||
{
|
{
|
||||||
userFavorites = restClient.withCoreAPI().usingAuthUser().where().invalidWhereParameter("EXIST((target/site))").targetFileExist().getFavorites();
|
userFavorites = restClient.withCoreAPI().usingAuthUser().where().invalidWhereParameter("EXIST((target/site))").targetFileExist().getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST)
|
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST)
|
||||||
@@ -480,7 +474,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify get favorites except the first one for request")
|
description = "Verify get favorites except the first one for request")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToGetFavoritesExceptTheFirstOne()
|
public void userIsAbleToGetFavoritesExceptTheFirstOne() throws Exception
|
||||||
{
|
{
|
||||||
userFavorites = restClient.authenticateUser(userModel).withParams("skipCount=1").withCoreAPI().usingUser(userModel).getFavorites();
|
userFavorites = restClient.authenticateUser(userModel).withParams("skipCount=1").withCoreAPI().usingUser(userModel).getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||||
@@ -493,7 +487,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify get first two favorites sites")
|
description = "Verify get first two favorites sites")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToGetFirstTwoFavorites()
|
public void userIsAbleToGetFirstTwoFavorites() throws Exception
|
||||||
{
|
{
|
||||||
userFavorites = restClient.authenticateUser(userModel).withParams("maxItems=2").withCoreAPI().usingUser(userModel).getFavorites();
|
userFavorites = restClient.authenticateUser(userModel).withParams("maxItems=2").withCoreAPI().usingUser(userModel).getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||||
@@ -509,7 +503,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify get favorites sites when using empty values for skipCount and maxItems")
|
description = "Verify get favorites sites when using empty values for skipCount and maxItems")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToGetFavoritesWhenSkipCountAndMaxItemsAreEmpty()
|
public void userIsAbleToGetFavoritesWhenSkipCountAndMaxItemsAreEmpty() throws Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(userModel).withParams("skipCount= ").withCoreAPI().usingUser(userModel).getFavorites();
|
restClient.authenticateUser(userModel).withParams("skipCount= ").withCoreAPI().usingUser(userModel).getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST).assertLastError().containsSummary(String.format(RestErrorModel.INVALID_SKIPCOUNT, " "));
|
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST).assertLastError().containsSummary(String.format(RestErrorModel.INVALID_SKIPCOUNT, " "));
|
||||||
@@ -521,7 +515,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify the get favorites request for a high value for skipCount parameter")
|
description = "Verify the get favorites request for a high value for skipCount parameter")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToGetFavoritesWithHighSkipCount()
|
public void userIsAbleToGetFavoritesWithHighSkipCount() throws Exception
|
||||||
{
|
{
|
||||||
userFavorites = restClient.authenticateUser(userModel).withParams("skipCount=999999999").withCoreAPI().usingUser(userModel).getFavorites();
|
userFavorites = restClient.authenticateUser(userModel).withParams("skipCount=999999999").withCoreAPI().usingUser(userModel).getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||||
@@ -532,7 +526,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
|
||||||
description = "Verify the get favorites request with properties parameter applied")
|
description = "Verify the get favorites request with properties parameter applied")
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
public void userIsAbleToGetFavoritesWithPropertiesParamApplied()
|
public void userIsAbleToGetFavoritesWithPropertiesParamApplied() throws Exception
|
||||||
{
|
{
|
||||||
userFavorites = restClient.authenticateUser(userModel).withParams("properties=targetGuid").withCoreAPI().usingUser(userModel).getFavorites();
|
userFavorites = restClient.authenticateUser(userModel).withParams("properties=targetGuid").withCoreAPI().usingUser(userModel).getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||||
@@ -543,7 +537,7 @@ public class GetFavoritesTests extends RestTest
|
|||||||
|
|
||||||
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION, description = "Verify entry details for get favorites response with Rest API")
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION, description = "Verify entry details for get favorites response with Rest API")
|
||||||
public void checkResponseSchemaForGetFavorites()
|
public void checkResponseSchemaForGetFavorites() throws Exception
|
||||||
{
|
{
|
||||||
userFavorites = restClient.authenticateUser(userModel).withCoreAPI().usingAuthUser().getFavorites();
|
userFavorites = restClient.authenticateUser(userModel).withCoreAPI().usingAuthUser().getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||||
@@ -559,12 +553,11 @@ public class GetFavoritesTests extends RestTest
|
|||||||
.field("title").is(thirdSiteModel.getTitle());
|
.field("title").is(thirdSiteModel.getTitle());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
|
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
|
||||||
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION, description = "Verify if get favorites response returns allowableOperations object when requested")
|
||||||
description = "Verify if get favorites response returns allowableOperations object when requested")
|
public void checkResponseForGetFavoritesWithAllowableOperations()
|
||||||
public void checkResponsesForGetFavoritesWithAllowableOperations()
|
|
||||||
{
|
{
|
||||||
final RestPersonFavoritesModelsCollection adminFavorites =
|
RestPersonFavoritesModelsCollection adminFavorites =
|
||||||
restClient.authenticateUser(adminUserModel).withCoreAPI().usingAuthUser().include(ALLOWABLE_OPERATIONS).getFavorites();
|
restClient.authenticateUser(adminUserModel).withCoreAPI().usingAuthUser().include(ALLOWABLE_OPERATIONS).getFavorites();
|
||||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||||
|
|
||||||
@@ -572,22 +565,4 @@ public class GetFavoritesTests extends RestTest
|
|||||||
.map(RestPersonFavoritesModel::onModel)
|
.map(RestPersonFavoritesModel::onModel)
|
||||||
.forEach(m -> m.assertThat().field(ALLOWABLE_OPERATIONS).isNotEmpty());
|
.forEach(m -> m.assertThat().field(ALLOWABLE_OPERATIONS).isNotEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
|
|
||||||
description = "Verify the get favorites request with properties parameter applied")
|
|
||||||
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
|
|
||||||
public void checkSearchResponseContainsIsFavoriteWhenRequested() throws InterruptedException {
|
|
||||||
final SearchRequest query = new SearchRequest();
|
|
||||||
final RestRequestQueryModel queryReq = new RestRequestQueryModel();
|
|
||||||
queryReq.setQuery(firstFileModel.getName());
|
|
||||||
query.setQuery(queryReq);
|
|
||||||
query.setInclude(List.of("isFavorite"));
|
|
||||||
|
|
||||||
Utility.sleep(500, 60000, () ->
|
|
||||||
{
|
|
||||||
restClient.authenticateUser(adminUserModel).withSearchAPI().search(query);
|
|
||||||
restClient.onResponse().assertThat().body("list.entries.entry[0].isFavorite", Matchers.notNullValue());
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -388,6 +388,12 @@
|
|||||||
<load-on-startup>8</load-on-startup>
|
<load-on-startup>8</load-on-startup>
|
||||||
</servlet>
|
</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>
|
||||||
<servlet-name>publicapiServlet</servlet-name>
|
<servlet-name>publicapiServlet</servlet-name>
|
||||||
<servlet-class>org.alfresco.rest.api.PublicApiWebScriptServlet</servlet-class>
|
<servlet-class>org.alfresco.rest.api.PublicApiWebScriptServlet</servlet-class>
|
||||||
@@ -463,6 +469,14 @@
|
|||||||
<servlet-name>publicapiServlet</servlet-name>
|
<servlet-name>publicapiServlet</servlet-name>
|
||||||
<url-pattern>/api/*</url-pattern>
|
<url-pattern>/api/*</url-pattern>
|
||||||
</servlet-mapping>
|
</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 -->
|
<!-- Enterprise servlet-mapping placeholder -->
|
||||||
|
|
||||||
|
|||||||
38
pom.xml
38
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">
|
<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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Alfresco Community Repo Parent</name>
|
<name>Alfresco Community Repo Parent</name>
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
|
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
|
||||||
<dependency.webscripts.version>8.45</dependency.webscripts.version>
|
<dependency.webscripts.version>8.45</dependency.webscripts.version>
|
||||||
<dependency.bouncycastle.version>1.70</dependency.bouncycastle.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.assertj.version>3.24.2</dependency.assertj.version>
|
||||||
<dependency.org-json.version>20230618</dependency.org-json.version>
|
<dependency.org-json.version>20230618</dependency.org-json.version>
|
||||||
<dependency.commons-dbcp.version>2.9.0</dependency.commons-dbcp.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.version>5.2.2</dependency.poi.version>
|
||||||
<dependency.poi-ooxml-lite.version>5.2.3</dependency.poi-ooxml-lite.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.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.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.95.Final</dependency.netty.version> <!-- must be in sync with camels transitive dependencies, e.g.: netty-common -->
|
<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.activemq.version>5.17.4</dependency.activemq.version>
|
||||||
<dependency.apache-compress.version>1.23.0</dependency.apache-compress.version>
|
<dependency.apache-compress.version>1.23.0</dependency.apache-compress.version>
|
||||||
<dependency.apache.taglibs.version>1.2.5</dependency.apache.taglibs.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>
|
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||||
<tag>23.1.0.174</tag>
|
<tag>HEAD</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
@@ -386,11 +388,7 @@
|
|||||||
<artifactId>commons-fileupload</artifactId>
|
<artifactId>commons-fileupload</artifactId>
|
||||||
<version>1.5</version>
|
<version>1.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>commons-net</groupId>
|
|
||||||
<artifactId>commons-net</artifactId>
|
|
||||||
<version>3.9.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
@@ -853,6 +851,17 @@
|
|||||||
<artifactId>camel-mock</artifactId>
|
<artifactId>camel-mock</artifactId>
|
||||||
<version>${dependency.camel.version}</version>
|
<version>${dependency.camel.version}</version>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>org.apache.taglibs</groupId>
|
<groupId>org.apache.taglibs</groupId>
|
||||||
@@ -897,15 +906,6 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.netty</groupId>
|
|
||||||
<artifactId>netty-bom</artifactId>
|
|
||||||
<version>${dependency.netty.version}</version>
|
|
||||||
<type>pom</type>
|
|
||||||
<scope>import</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.security</groupId>
|
<groupId>org.springframework.security</groupId>
|
||||||
<artifactId>spring-security-bom</artifactId>
|
<artifactId>spring-security-bom</artifactId>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.174</version>
|
<version>23.1.0.167-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -741,6 +741,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-net</groupId>
|
<groupId>commons-net</groupId>
|
||||||
<artifactId>commons-net</artifactId>
|
<artifactId>commons-net</artifactId>
|
||||||
|
<version>3.8.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -655,6 +655,9 @@ public class ContentServiceImpl implements ContentService, ApplicationContextAwa
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
directAccessUrl = store.requestContentDirectUrl(contentUrl, attachment, fileName, contentMimetype, validFor);
|
directAccessUrl = store.requestContentDirectUrl(contentUrl, attachment, fileName, contentMimetype, validFor);
|
||||||
|
if (directAccessUrl != null) {
|
||||||
|
directAccessUrl.setFileName(fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (UnsupportedOperationException ex)
|
catch (UnsupportedOperationException ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,22 +69,22 @@ public class AlfrescoRmiRegistryFactoryBean implements FactoryBean<Registry>, Di
|
|||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.debug("Looking for RMI registry at port '" + this.port + "', using custom socket factory");
|
LOG.debug("Looking for RMI registry at port '" + this.port + "', using custom socket factory");
|
||||||
}
|
}
|
||||||
|
Registry registry;
|
||||||
synchronized (LocateRegistry.class) {
|
synchronized (LocateRegistry.class) {
|
||||||
try {
|
try {
|
||||||
// Retrieve existing registry.
|
// Retrieve existing registry.
|
||||||
final Registry localRegistry = LocateRegistry.getRegistry(null, this.port, socketFactory);
|
registry = LocateRegistry.getRegistry(null, this.port, socketFactory);
|
||||||
testRegistry(localRegistry);
|
testRegistry(this.registry);
|
||||||
return localRegistry;
|
|
||||||
}
|
}
|
||||||
catch (RemoteException ex) {
|
catch (RemoteException ex) {
|
||||||
LOG.trace("RMI registry access threw exception", ex);
|
LOG.trace("RMI registry access threw exception", ex);
|
||||||
LOG.debug("Could not detect RMI registry - creating new one");
|
LOG.debug("Could not detect RMI registry - creating new one");
|
||||||
// Assume no registry found -> create new one.
|
// Assume no registry found -> create new one.
|
||||||
this.created = true;
|
this.created = true;
|
||||||
return LocateRegistry.createRegistry(this.port, socketFactory, socketFactory);
|
registry = LocateRegistry.createRegistry(this.port, socketFactory, socketFactory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return registry;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEnabled()
|
public boolean isEnabled()
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -166,34 +166,46 @@ public class ContentServiceImplUnitTest
|
|||||||
@Test
|
@Test
|
||||||
public void testRequestContentDirectUrl_StoreRequestContentDirectUrlIsCalledWithFileNameOverride()
|
public void testRequestContentDirectUrl_StoreRequestContentDirectUrlIsCalledWithFileNameOverride()
|
||||||
{
|
{
|
||||||
|
DirectAccessUrl mockDirectAccessUrl = new DirectAccessUrl();
|
||||||
|
mockDirectAccessUrl.setAttachment(true);
|
||||||
|
mockDirectAccessUrl.setContentUrl(SOME_CONTENT_URL);
|
||||||
final String fileNameOverride = "fileNameOverride.txt";
|
final String fileNameOverride = "fileNameOverride.txt";
|
||||||
setupSystemWideDirectAccessConfig(ENABLED);
|
setupSystemWideDirectAccessConfig(ENABLED);
|
||||||
when(mockContentStore.isContentDirectUrlEnabled()).thenReturn(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);
|
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());
|
verify(mockContentStore, times(1)).requestContentDirectUrl(anyString(), eq(true), eq(fileNameOverride), anyString(), anyLong());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRequestContentDirectUrl_StoreRequestContentDirectUrlIsCalledWithNodeNamePropertyWhenFileNameOverrideIsNull()
|
public void testRequestContentDirectUrl_StoreRequestContentDirectUrlIsCalledWithNodeNamePropertyWhenFileNameOverrideIsNull()
|
||||||
{
|
{
|
||||||
|
DirectAccessUrl mockDirectAccessUrl = new DirectAccessUrl();
|
||||||
|
mockDirectAccessUrl.setAttachment(true);
|
||||||
|
mockDirectAccessUrl.setContentUrl(SOME_CONTENT_URL);
|
||||||
setupSystemWideDirectAccessConfig(ENABLED);
|
setupSystemWideDirectAccessConfig(ENABLED);
|
||||||
when(mockContentStore.isContentDirectUrlEnabled()).thenReturn(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);
|
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());
|
verify(mockContentStore, times(1)).requestContentDirectUrl(anyString(), eq(true), eq(SOME_FILE_NAME), anyString(), anyLong());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRequestContentDirectUrl_StoreRequestContentDirectUrlIsCalledWithNodeNamePropertyWhenFileNameOverrideIsEmpty()
|
public void testRequestContentDirectUrl_StoreRequestContentDirectUrlIsCalledWithNodeNamePropertyWhenFileNameOverrideIsEmpty()
|
||||||
{
|
{
|
||||||
|
DirectAccessUrl mockDirectAccessUrl = new DirectAccessUrl();
|
||||||
|
mockDirectAccessUrl.setAttachment(true);
|
||||||
|
mockDirectAccessUrl.setContentUrl(SOME_CONTENT_URL);
|
||||||
setupSystemWideDirectAccessConfig(ENABLED);
|
setupSystemWideDirectAccessConfig(ENABLED);
|
||||||
when(mockContentStore.isContentDirectUrlEnabled()).thenReturn(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, "");
|
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());
|
verify(mockContentStore, times(1)).requestContentDirectUrl(anyString(), eq(true), eq(SOME_FILE_NAME), anyString(), anyLong());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Repository
|
* Alfresco Repository
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited
|
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
* 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;
|
private PolicyComponent policyComponent;
|
||||||
|
|
||||||
|
|
||||||
public class LockServicePoliciesImpl implements LockServicePolicies.BeforeLock,
|
private class LockServicePoliciesImpl implements LockServicePolicies.BeforeLock,
|
||||||
LockServicePolicies.BeforeUnlock
|
LockServicePolicies.BeforeUnlock
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Repository
|
* Alfresco Repository
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited
|
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
* 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.ArgumentMatchers.nullable;
|
||||||
import static org.mockito.BDDMockito.given;
|
import static org.mockito.BDDMockito.given;
|
||||||
import static org.mockito.BDDMockito.then;
|
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 static org.mockito.MockitoAnnotations.openMocks;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -93,7 +97,7 @@ public class RuleServiceImplUnitTest
|
|||||||
@Mock
|
@Mock
|
||||||
private PermissionService permissionService;
|
private PermissionService permissionService;
|
||||||
@Mock
|
@Mock
|
||||||
private SimpleCache<NodeRef, List<Rule>> nodeRulesCache;
|
private SimpleCache nodeRulesCache;
|
||||||
@Mock
|
@Mock
|
||||||
private NodeService runtimeNodeService;
|
private NodeService runtimeNodeService;
|
||||||
@Mock
|
@Mock
|
||||||
|
|||||||
@@ -8,37 +8,36 @@
|
|||||||
<property name="location" value="test-messaging.properties" />
|
<property name="location" value="test-messaging.properties" />
|
||||||
</bean>
|
</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" />
|
<import resource="classpath:/alfresco/subsystems/Messaging/default/messaging-context.xml" />
|
||||||
|
|
||||||
<bean id="messagingExceptionProcessor"
|
<bean id="messagingExceptionProcessor"
|
||||||
class="org.alfresco.messaging.camel.MockExceptionProcessor" />
|
class="org.alfresco.messaging.camel.MockExceptionProcessor" />
|
||||||
|
|
||||||
<bean id="mockConsumer"
|
<bean id="mockConsumer"
|
||||||
class="org.alfresco.messaging.camel.MockConsumer" />
|
class="org.alfresco.messaging.camel.MockConsumer" />
|
||||||
|
|
||||||
<bean id="mockExceptionThrowingConsumer"
|
|
||||||
class="org.alfresco.messaging.camel.MockExceptionThrowingConsumer" />
|
|
||||||
|
|
||||||
|
<bean id="mockExceptionThrowingConsumer"
|
||||||
|
class="org.alfresco.messaging.camel.MockExceptionThrowingConsumer" />
|
||||||
|
|
||||||
<import resource="testRoutes.xml" />
|
<import resource="testRoutes.xml" />
|
||||||
<bean id="testNewRouteLoader" class="org.alfresco.messaging.camel.SpringContextRouteLoader">
|
<bean id="testNewRouteLoader" class="org.alfresco.messaging.camel.SpringContextRouteLoader">
|
||||||
<property name="camelContextId" value="alfrescoCamelContext" />
|
<property name="camelContextId" value="alfrescoCamelContext" />
|
||||||
<property name="routeContextId" value="customRoutes" />
|
<property name="routeContextId" value="customRoutes" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="renditionEventProcessor" class="org.mockito.Mockito" factory-method="mock">
|
<bean id="transactionAwareEventProducer" class="org.mockito.Mockito" factory-method="mock">
|
||||||
<constructor-arg type="java.lang.Class" value="org.alfresco.repo.rendition2.RenditionEventProcessor"/>
|
<constructor-arg value="org.alfresco.repo.rawevents.TransactionAwareEventProducer" />
|
||||||
</bean>
|
</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>
|
</beans>
|
||||||
@@ -3,23 +3,23 @@
|
|||||||
<beans>
|
<beans>
|
||||||
|
|
||||||
<bean id="repositoryHelper" class="org.mockito.Mockito" factory-method="mock">
|
<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>
|
||||||
|
|
||||||
<bean id="SiteService" class="org.mockito.Mockito" factory-method="mock">
|
<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>
|
||||||
|
|
||||||
<bean id="NodeService" class="org.mockito.Mockito" factory-method="mock">
|
<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>
|
||||||
|
|
||||||
<bean id="NamespaceService" class="org.mockito.Mockito" factory-method="mock">
|
<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>
|
||||||
|
|
||||||
<bean id="SearchService" class="org.mockito.Mockito" factory-method="mock">
|
<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>
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
Reference in New Issue
Block a user