Compare commits

...

67 Commits

Author SHA1 Message Date
alfresco-build
b13ca1f68b [maven-release-plugin][skip ci] prepare release 20.101 2023-03-14 09:23:49 +00:00
dependabot[bot]
484699b266 Bump groovy from 3.0.12 to 3.0.16 (#1801)
Bumps [groovy](https://github.com/apache/groovy) from 3.0.12 to 3.0.16.
- [Release notes](https://github.com/apache/groovy/releases)
- [Commits](https://github.com/apache/groovy/commits)

---
updated-dependencies:
- dependency-name: org.codehaus.groovy:groovy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 09:55:22 +01:00
alfresco-build
a15161c872 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-13 21:34:16 +00:00
alfresco-build
b3a6150655 [maven-release-plugin][skip ci] prepare release 20.100 2023-03-13 21:34:13 +00:00
Damian Ujma
42e06da4f8 ACS-4137 Change the 'build-multiarch-docker-image' profile phase to package (#1799)
* ACS-4137 Change the build-multiarch-docker-image profile phase to package

* ACS-4137 Change the build-multiarch-docker-image profile phase to package
2023-03-13 22:05:22 +01:00
alfresco-build
4ac30c2173 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-13 15:30:38 +00:00
alfresco-build
d1d84d849e [maven-release-plugin][skip ci] prepare release 20.99 2023-03-13 15:30:35 +00:00
dependabot[bot]
40af1799fe Bump alfresco/alfresco-base-tomcat from tomcat9-jre17-rockylinux8-202209261711 to tomcat9-jre17-rockylinux8-202303081618 in /packaging/docker-alfresco (#1792)
* Bump alfresco/alfresco-base-tomcat in /packaging/docker-alfresco

Bumps alfresco/alfresco-base-tomcat from tomcat9-jre17-rockylinux8-202209261711 to tomcat9-jre17-rockylinux8-202303081618.

---
updated-dependencies:
- dependency-name: alfresco/alfresco-base-tomcat
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* ACS-4768 Update freetype package for Rocky Linux 8.7

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Damian.Ujma@hyland.com <Damian.Ujma@hyland.com>
2023-03-13 16:03:51 +01:00
alfresco-build
f59e4a044a [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-13 10:24:01 +00:00
alfresco-build
5924263c18 [maven-release-plugin][skip ci] prepare release 20.98 2023-03-13 10:23:58 +00:00
Damian Ujma
082e38692f ACS-4137 Produce Multi-Arch Docker images (#1797)
* Revert "Revert "ACS-4137 Produce Multi-Arch Docker images (#1656)" (#1796)"

This reverts commit ddbaabb713.

* ACS-4137 Remove default multi-arch docker-maven-plugin configuration
2023-03-13 10:44:06 +01:00
alfresco-build
f5c4112e65 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-12 00:06:40 +00:00
alfresco-build
ad8251c054 [maven-release-plugin][skip ci] prepare release 20.97 2023-03-12 00:06:37 +00:00
Alfresco CI User
32d0182096 [force] Force release for 2023-03-12. 2023-03-12 00:03:26 +00:00
alfresco-build
2ac9779a3b [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-10 10:45:43 +00:00
alfresco-build
af999fb0fd [maven-release-plugin][skip ci] prepare release 20.96 2023-03-10 10:45:40 +00:00
Damian Ujma
ddbaabb713 Revert "ACS-4137 Produce Multi-Arch Docker images (#1656)" (#1796)
This reverts commit 212fa9b362.
2023-03-10 11:20:43 +01:00
alfresco-build
b93136f2c0 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-10 09:06:46 +00:00
alfresco-build
923aadb12a [maven-release-plugin][skip ci] prepare release 20.95 2023-03-10 09:06:42 +00:00
Wojtek Świętoń
212fa9b362 ACS-4137 Produce Multi-Arch Docker images (#1656)
* ACS-4137 Update pom.xml to use buildx

* ACS-4137 Update travis.yml to use buildx

* ACS-4137 Update travis.yml to use buildx, newest docker version

* ACS-4137 reverted unnecessary changes in travis.yml file

* ACS-4137 Change deprecated <dockerFileDir> property to <contextDir>. Moved <build> section from subpoms to global pom.

* ACS-4137 POM indentation fixes

* ACS-4137 Fix building a multiarch image (#1697)

* ACS-4137 Test wih GHA [ags][tas]

* ACS-4137 Test wih GHA [ags][tas]

* ACS-4137 Fix setting network [ags][tas]

* ACS-4137 Fix creating builder [ags][tas]

* ACS-4137 Change image tag [ags][tas]

* ACS-4137 Fix starting the registry [ags][tas]

* ACS-4137 Refactor code [ags][tas]

* ACS-4137 Uncomment all jobs [tas][ags]

* ACS-4137 Improve prepare_buildx.sh [tas][ags]

* ACS-4137 Implement timeout + remove hardcoded base image tag [tas][ags]

* ACS-4137 Added exec-maven-plugin to build-push-image for alfresco-governance-repository-community-base image

* ACS-4137 Generalize prepare_buildx.sh + increase registry timeout

* ACS-4137 merged local.registry.host and local.registry.port. Builder name changed to entitled-builder. In prepare_builder script added localhost registry checking

* ACS-4137 added build-multiarch-docker-images maven profile

* ACS-4137 added <BASE_IMAGE> arg to build-docker-images profile

* ACS-4137 added combine.self="override" attribute to configuration in build-docker-images profile to not use buildx. Delete redundant base.image.tag

* ACS-4137 Push docker images to local repository

* ACS-4137 Remove useless scripts

* ACS-4137 Move builder.name and local.registry properties to main pom.xml

* ACS-4137 Remove useless properties definitions

---------

Co-authored-by: Damian.Ujma@hyland.com <Damian.Ujma@hyland.com>
Co-authored-by: Damian Ujma <92095156+damianujma@users.noreply.github.com>
2023-03-10 09:20:22 +01:00
alfresco-build
c3e37b96b4 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-08 10:53:06 +00:00
alfresco-build
517f40e150 [maven-release-plugin][skip ci] prepare release 20.94 2023-03-08 10:53:02 +00:00
dependabot[bot]
f86d0f1fd2 Bump alfresco-jlan-embed from 7.2 to 7.4 (#1773)
Bumps alfresco-jlan-embed from 7.2 to 7.4.

---
updated-dependencies:
- dependency-name: org.alfresco:alfresco-jlan-embed
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-08 10:38:40 +01:00
alfresco-build
09da8640a0 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-08 09:14:04 +00:00
alfresco-build
6bd9bf768e [maven-release-plugin][skip ci] prepare release 20.93 2023-03-08 09:14:00 +00:00
pzurek
f75c0c8f9e Just to check if the recent problems are related to Dependabot commits 2023-03-08 09:14:54 +01:00
dependabot[bot]
ff9364a3b1 Bump utility from 3.0.58 to 3.0.61 (#1776) 2023-03-07 19:22:57 +00:00
dependabot[bot]
db832663b4 Bump dependency.activemq.version from 5.17.1 to 5.17.4 (#1778) 2023-03-07 11:39:30 +00:00
alfresco-build
890e1173c5 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-07 11:36:43 +00:00
alfresco-build
9399c38741 [maven-release-plugin][skip ci] prepare release 20.92 2023-03-07 11:36:39 +00:00
mikolajbrzezinski
bf16e843fd ACS-3975 Fix Intermittent Test Failure (#1785)
Fix Intermittent Test Failure
2023-03-07 11:50:33 +01:00
dependabot[bot]
69a5a95dae Bump docker-maven-plugin from 0.40.2 to 0.42.0 (#1784) 2023-03-07 10:50:09 +00:00
alfresco-build
be37440e24 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-07 10:29:48 +00:00
alfresco-build
6504406861 [maven-release-plugin][skip ci] prepare release 20.91 2023-03-07 10:29:44 +00:00
dependabot[bot]
38d7dbfa00 Bump json from 20220320 to 20230227 (#1779)
Bumps [json](https://github.com/douglascrockford/JSON-java) from 20220320 to 20230227.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

---
updated-dependencies:
- dependency-name: org.json:json
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 10:46:42 +01:00
dependabot[bot]
1ed635275f Bump commons-fileupload from 1.4 to 1.5 (#1749)
Bumps commons-fileupload from 1.4 to 1.5.

---
updated-dependencies:
- dependency-name: commons-fileupload:commons-fileupload
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 10:46:26 +01:00
Domenico Sibilio
7b87ee628d ACS-4776 Finalize deprecation of BitlyUrlShortenerImpl (#1787) 2023-03-07 10:32:14 +01:00
alfresco-build
9cff80362d [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-05 00:06:40 +00:00
alfresco-build
8311c889bb [maven-release-plugin][skip ci] prepare release 20.90 2023-03-05 00:06:38 +00:00
Alfresco CI User
bd5b5a240e [force] Force release for 2023-03-05. 2023-03-05 00:03:38 +00:00
alfresco-build
c2d13e3177 [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-27 11:08:57 +00:00
alfresco-build
e8f50da5a2 [maven-release-plugin][skip ci] prepare release 20.89 2023-02-27 11:08:54 +00:00
Tom Page
2053e3b83a Code freeze testing. 2023-02-27 09:35:11 +00:00
alfresco-build
bcc2eadba6 [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-26 00:06:28 +00:00
alfresco-build
eb40dd3a45 [maven-release-plugin][skip ci] prepare release 20.88 2023-02-26 00:06:25 +00:00
Alfresco CI User
4c511423d5 [force] Force release for 2023-02-26. 2023-02-26 00:03:24 +00:00
alfresco-build
b12b21e773 [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-24 07:28:12 +00:00
alfresco-build
569078f408 [maven-release-plugin][skip ci] prepare release 20.87 2023-02-24 07:28:08 +00:00
Damian Ujma
90de678d7d ACS-3750 Fix cancelled workflow condition (#1768) 2023-02-23 16:11:09 +01:00
alfresco-build
0a75cbbc67 [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-22 11:38:44 +00:00
alfresco-build
c5f174a55d [maven-release-plugin][skip ci] prepare release 20.86 2023-02-22 11:38:42 +00:00
Piotr Żurek
119596647a ACS-4424 AGS Community tests for ES (#1761) 2023-02-22 12:08:30 +01:00
Piyush Joshi
e5d5969fc4 [ACS-3960][ACS-4339] Count is only returned for a tag if it is greater than zero (#1755)
* Added fix for ACS-3960

* Added fix for ACS-3960

* Added fix for ACS-3960

* Added formatting

* Added Fix for ACS-3960

* Revert "Added Fix for ACS-3960"

This reverts commit c06dba2d93.

* Addressed review comment

Co-authored-by: Tom Page <tpage-alfresco@users.noreply.github.com>

* Issue Fixed and added unit test cases.

* Removed extra assertion in testcases.

---------

Co-authored-by: suneet.gupta <suneet.gupta@hyland.com>
Co-authored-by: Tom Page <tpage-alfresco@users.noreply.github.com>
2023-02-22 10:21:59 +05:30
alfresco-build
b79dc538c9 [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-19 00:17:09 +00:00
alfresco-build
72965efb57 [maven-release-plugin][skip ci] prepare release 20.85 2023-02-19 00:17:06 +00:00
Alfresco CI User
d467c3cdb1 [force] Force release for 2023-02-19. 2023-02-19 00:03:32 +00:00
alfresco-build
73d919435c [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-15 17:42:28 +00:00
alfresco-build
5fb86e1bbc [maven-release-plugin][skip ci] prepare release 20.84 2023-02-15 17:42:23 +00:00
Krystian Dabrowski
23de0fefd7 ACS-4633: Duplicated tag is not detected when tag string contains upper case (#1750) 2023-02-15 18:13:19 +01:00
Piyush Joshi
7c3e8a2549 [MNT-22633] Creation, Modification TimeStamp values setted for download as zip (#1717)
* Creation, Modification date timestamp added to zip file

* Addressed review comments

* Addressed review comments

* Revert "Addressed review comments"

This reverts commit 58214ee427.

* Addressed review comments

* Revert "Addressed review comments"

This reverts commit a584f53023.

* Update ZipDownloadExporter.java

Addresed review comments

---------

Co-authored-by: suneet.gupta <suneet.gupta@hyland.com>
2023-02-15 21:45:46 +05:30
alfresco-build
6a3dbff290 [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-13 12:39:27 +00:00
alfresco-build
0ca29a76a9 [maven-release-plugin][skip ci] prepare release 20.83 2023-02-13 12:39:23 +00:00
George Evangelopoulos
561e7330e3 ACS-4027: add E2Es for DELETE /tags/{tagsId} endpoint (#1743)
* ACS-4027: add E2Es and helper methods
2023-02-13 13:31:53 +02:00
alfresco-build
628b267a2b [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-12 00:06:42 +00:00
alfresco-build
ea9687ac33 [maven-release-plugin][skip ci] prepare release 20.82 2023-02-12 00:06:39 +00:00
Alfresco CI User
4292a3ce1c [force] Force release for 2023-02-12. 2023-02-12 00:03:14 +00:00
alfresco-build
09721dca4e [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-11 17:33:49 +00:00
43 changed files with 474 additions and 318 deletions

View File

@@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
needs: [run_ci]
if: >
!failure() &&
!(failure() || cancelled()) &&
!contains(github.event.head_commit.message, '[no release]') &&
github.event_name != 'pull_request'
steps:
@@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
needs: [push_to_nexus]
if: >
!failure() &&
!(failure() || cancelled()) &&
!contains(github.event.head_commit.message, '[no downstream]') &&
github.event_name != 'pull_request'
steps:

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<build>

View File

@@ -33,7 +33,9 @@ import org.alfresco.rest.rm.community.model.record.Record;
import org.alfresco.rest.v0.RecordsAPI;
import org.alfresco.utility.Utility;
import org.alfresco.utility.constants.UserRole;
import org.alfresco.utility.data.RandomData;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FileType;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.UserModel;
import org.json.JSONObject;
@@ -97,9 +99,10 @@ public class InplaceRecordSearchTests extends BaseRMRestTest {
@Test
public void searchForInplaceRecord() {
// And a document that isn't a record
final String fileName = "File" + RandomData.getRandomAlphanumeric();
uploadedDocbyCollabUser = dataContent.usingSite(privateSite)
.usingUser(siteCollaborator)
.createContent(CMISUtil.DocumentType.TEXT_PLAIN);
.createContent(new FileModel(fileName, FileType.fromName(fileName + "." + CMISUtil.DocumentType.TEXT_PLAIN.extention)));
assertNotNull(uploadedDocbyCollabUser.getNodeRef());

View File

@@ -72,7 +72,7 @@ public class SearchDocumentsV1Test extends BaseRMRestTest
cmisQueryModel.setLanguage("cmis");
RestRequestQueryModel aftsQueryModel = new RestRequestQueryModel();
aftsQueryModel.setQuery("cm:name:*" + SEARCH_TERM);
aftsQueryModel.setQuery("cm:name:*" + SEARCH_TERM + ".txt");
aftsQueryModel.setLanguage("afts");
return new RestRequestQueryModel[][] {
@@ -107,7 +107,7 @@ public class SearchDocumentsV1Test extends BaseRMRestTest
private void waitIndexing() throws Exception
{
RestRequestQueryModel queryType = new RestRequestQueryModel();
queryType.setQuery("cm:name:*" + SEARCH_TERM);
queryType.setQuery("cm:name:*" + SEARCH_TERM + ".txt");
queryType.setLanguage("afts");
Utility.sleep(1000, 80000, () ->
{

View File

@@ -66,7 +66,6 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAspects.CUT_OFF_ASPECT;
import static org.alfresco.rest.rm.community.model.recordcategory.RetentionPeriodProperty.*;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.utility.data.RandomData.getRandomName;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@@ -84,26 +83,29 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
@Autowired
private RecordFoldersAPI recordFoldersAPI;
private final static String TEST_PREFIX = generateTestPrefix(DispositionScheduleLinkedRecordsTest.class);
private RecordCategory Category1,catsameLevel1,catsameLevel2;
private RecordCategory Category1;
private RecordCategoryChild CopyCatFolder,folder1,CatFolder,folder2;
private static final String categoryRM3077 = TEST_PREFIX + "RM-3077_manager_sees_me";
private static final String copyCategoryRM3077 = "Copy_of_" + categoryRM3077;
private static final String folderRM3077 = "RM-3077_folder_"+ categoryRM3077;
private static final String copyFolderRM3077 = "Copy_of_" + folderRM3077;
private final String electronicRecord = "RM-2937 electronic 2 record";
private final String folder = TEST_PREFIX + "RM-2937 folder ghosting";
private static final String categoryRecordsRM2526 = TEST_PREFIX + "RM-2526_category_records_immediately";
private static final String category2RecordsRM2526 = TEST_PREFIX + "RM-2526_category_2_records_1_day";
private static final String firstCategoryRM3060 = TEST_PREFIX + "RM-3060_category_record";
private static final String secondCategoryRM3060 = "Copy_of_" + firstCategoryRM3060;
private static final String firstFolderRM3060 = TEST_PREFIX + "RM-3060_folder";
private static final String secondFolderRM3060 = TEST_PREFIX + "RM-3060_disposition_on_Record_Level";
private static final String electronicRecordRM3060 = TEST_PREFIX + "RM-3060_electronic_1_record";
private static final String nonElectronicRecordRM3060 = TEST_PREFIX + "RM-3060_non-electronic_record";
private static final String firstCategoryRM1622 = TEST_PREFIX + "RM-1622_category_record";
private static final String secondCategoryRM1622 = "Copy_of_" + firstCategoryRM1622;;
private static final String firstFolderRM1622 = TEST_PREFIX + "RM-1622_folder";
private static final String electronicRecordRM1622 = TEST_PREFIX + "RM-1622_electronic_1_record";
private static final String secondFolderRM1622 = TEST_PREFIX + "RM-1622_disposition_on_Record_Level";
private static final String TRANSFER_LOCATION = TEST_PREFIX + "RM-3060_transferred_records";
public static final String TRANSFER_TYPE = "rma:transferred";
private FilePlan filePlanModel;
private UserModel rmAdmin, rmManager;
@BeforeClass(alwaysRun = true)
public void setupDispositionScheduleLinkedRecordsTest() {
createRMSiteIfNotExists();
@@ -368,35 +370,35 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
// create a category with retention applied on records level
RecordCategory catsameLevel1 = getRestAPIFactory().getFilePlansAPI(rmAdmin)
.createRootRecordCategory(RecordCategory.builder().name(firstCategoryRM3060).build(),
RecordCategory.DEFAULT_FILE_PLAN_ALIAS);
.createRootRecordCategory(RecordCategory.builder().name(firstCategoryRM1622).build(),
RecordCategory.DEFAULT_FILE_PLAN_ALIAS);
RecordCategory catsameLevel2 = getRestAPIFactory().getFilePlansAPI(rmAdmin)
.createRootRecordCategory(RecordCategory.builder().name(secondCategoryRM3060).build(),
RecordCategory.DEFAULT_FILE_PLAN_ALIAS);
.createRootRecordCategory(RecordCategory.builder().name(secondCategoryRM1622).build(),
RecordCategory.DEFAULT_FILE_PLAN_ALIAS);
// create retention schedule applied on records for category 1
dispositionScheduleService.createCategoryRetentionSchedule(firstCategoryRM3060, true);
dispositionScheduleService.createCategoryRetentionSchedule(firstCategoryRM1622, true);
// with retain immediately after record creation date and cut 1 day after record creation date
dispositionScheduleService.addCutOffAfterPeriodStep(firstCategoryRM3060, "day|1", DATE_FILED);
dispositionScheduleService.addCutOffAfterPeriodStep(firstCategoryRM1622, "day|1", DATE_FILED);
// create a folder on the category firstCategoryRM3060 with a complete electronic record
RecordCategoryChild firstFolderRecordCategoryChild = createRecordFolder(catsameLevel1.getId(),firstFolderRM3060);
Record firstElectronicRecord = createElectronicRecord(firstFolderRecordCategoryChild.getId(),electronicRecordRM3060);
// create a folder on the category firstCategoryRM1622 with a complete electronic record
RecordCategoryChild firstFolderRecordCategoryChild = createRecordFolder(catsameLevel1.getId(),firstFolderRM1622);
Record firstElectronicRecord = createElectronicRecord(firstFolderRecordCategoryChild.getId(),electronicRecordRM1622);
String elRecordFullName = recordsAPI.getRecordFullName(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(),firstFolderRM3060, electronicRecordRM3060);
getDataUser().getAdminUser().getPassword(),firstFolderRM1622, electronicRecordRM1622);
String elRecordNameNodeRef = recordsAPI.getRecordNodeRef(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), elRecordFullName, "/" + firstCategoryRM3060 + "/" + firstFolderRM3060);
getDataUser().usingAdmin().getAdminUser().getPassword(), elRecordFullName, "/" + firstCategoryRM1622 + "/" + firstFolderRM1622);
recordsAPI.completeRecord(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(), elRecordFullName);
// create a folder on the category secondCategoryRM3060 with a non electronic record
RecordCategoryChild secondFolderRecordCategoryChild = createRecordFolder(catsameLevel2.getId(),secondFolderRM3060);
// create a folder on the category secondCategoryRM1622 with a non electronic record
RecordCategoryChild secondFolderRecordCategoryChild = createRecordFolder(catsameLevel2.getId(),secondFolderRM1622);
String elRecordNameNodeRefs = recordsAPI.getRecordNodeRef(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), elRecordFullName, "/" + firstCategoryRM3060 + "/" + firstFolderRM3060);
getDataUser().usingAdmin().getAdminUser().getPassword(), elRecordFullName, "/" + firstCategoryRM1622 + "/" + firstFolderRM1622);
// link it to the folder in second category through the details page
@@ -404,8 +406,8 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
recordLists.add(NODE_REF_WORKSPACE_SPACES_STORE + firstElectronicRecord.getId());
linksAPI.linkRecord(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(), HttpStatus.SC_OK,secondCategoryRM3060 + "/" +
secondFolderRM3060, recordLists);
getDataUser().getAdminUser().getPassword(), HttpStatus.SC_OK,secondCategoryRM1622 + "/" +
secondFolderRM1622, recordLists);
// edit disposition date
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<modules>

View File

@@ -1,3 +1,4 @@
ARG BASE_IMAGE
# BUILD STAGE AGS
FROM debian:11-slim AS AGSBUILDER
@@ -12,7 +13,7 @@ RUN unzip -q /build/gs-api-explorer-*.war -d /build/gs-api-explorer && \
chmod -R g-w,o= /build
# ACTUAL IMAGE
FROM alfresco/alfresco-community-repo-base:${image.tag}
FROM ${BASE_IMAGE}
# Alfresco user does not have permissions to modify webapps or configuration. Switch to root.
# The access will be fixed after all operations are done.

View File

@@ -8,13 +8,15 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<properties>
<app.amp.client.war.folder>${project.build.directory}/${project.build.finalName}-war</app.amp.client.war.folder>
<image.name>alfresco/alfresco-governance-repository-community-base</image.name>
<base.image>alfresco/alfresco-community-repo-base</base.image>
<scripts.directory>${project.parent.parent.parent.parent.basedir}/scripts</scripts.directory>
</properties>
<dependencies>
@@ -537,9 +539,43 @@
</build>
</profile>
<profile>
<id>build-docker-images</id>
<!-- builds "image:latest" locally -->
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>${image.name}:${image.tag}</name>
<build>
<args>
<BASE_IMAGE>${base.image}:${image.tag}</BASE_IMAGE>
</args>
<contextDir>${project.basedir}</contextDir>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-image</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>build-docker-images</id>
<!-- builds "image:latest" locally -->
<id>build-multiarch-docker-images</id>
<build>
<plugins>
<plugin>
@@ -548,20 +584,56 @@
<configuration>
<images>
<image>
<name>${image.name}:${image.tag}</name>
<name>${local.registry}/${image.name}:${image.tag}</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<builderName>${builder.name}</builderName>
</buildx>
<contextDir>${project.basedir}</contextDir>
<args>
<BASE_IMAGE>${local.registry}/${base.image}:${image.tag}</BASE_IMAGE>
</args>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-image</id>
<id>build-push-image</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>prepare-buildx</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${scripts.directory}/prepare_buildx.sh</executable>
<arguments>
<argument>${builder.name}</argument>
<argument>${image.registry}</argument>
<argument>${image.name}</argument>
<argument>${image.tag}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
@@ -578,12 +650,37 @@
<images>
<image>
<!-- Quay image -->
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<name>${image.registry}/${image.name}:${image.tag}</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<builderName>${builder.name}</builderName>
</buildx>
<args>
<BASE_IMAGE>${local.registry}/${base.image}:${image.tag}</BASE_IMAGE>
</args>
<contextDir>${project.basedir}</contextDir>
</build>
</image>
<image>
<!-- DockerHub image -->
<name>${image.name}:${image.tag}</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<builderName>${builder.name}</builderName>
</buildx>
<args>
<BASE_IMAGE>${local.registry}/${base.image}:${image.tag}</BASE_IMAGE>
</args>
<contextDir>${project.basedir}</contextDir>
</build>
</image>
</images>
</configuration>
@@ -598,6 +695,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>prepare-buildx</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${scripts.directory}/prepare_buildx.sh</executable>
<arguments>
<argument>${builder.name}</argument>
<argument>${image.registry}</argument>
<argument>${image.name}</argument>
<argument>${image.tag}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<build>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<dependencies>

View File

@@ -9,6 +9,6 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
</project>

View File

@@ -1,6 +1,6 @@
# Fetch image based on Tomcat 9.0, Java 17 and Rocky Linux 8
# More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat
FROM alfresco/alfresco-base-tomcat:tomcat9-jre17-rockylinux8-202209261711
FROM alfresco/alfresco-base-tomcat:tomcat9-jre17-rockylinux8-202303081618
# Set default docker_context.
ARG resource_path=target
@@ -65,7 +65,7 @@ RUN sed -i -e "s_appender.rolling.fileName\=alfresco.log_appender.rolling.fileNa
RUN yum install -y fontconfig-2.13.1-4.el8 \
dejavu-fonts-common-2.35-7.el8 \
fontpackages-filesystem-1.44-22.el8 \
freetype-2.9.1-4.el8_3.1 \
freetype-2.9.1-9.el8 \
libpng-1.6.34-5.el8 \
dejavu-sans-fonts-2.35-7.el8 && \
yum clean all

View File

@@ -7,11 +7,12 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<properties>
<image.name>alfresco/alfresco-community-repo-base</image.name>
<scripts.directory>${project.parent.parent.basedir}/scripts</scripts.directory>
</properties>
<build>
@@ -156,6 +157,67 @@
</build>
</profile>
<profile>
<id>build-multiarch-docker-images</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>${local.registry}/${image.name}:${image.tag}</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<builderName>${builder.name}</builderName>
</buildx>
<contextDir>${project.basedir}</contextDir>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-push-image</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>prepare-buildx</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${scripts.directory}/prepare_buildx.sh</executable>
<arguments>
<argument>${builder.name}</argument>
<argument>${image.registry}</argument>
<argument>${image.name}</argument>
<argument>${image.tag}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>push-docker-images</id>
<!-- publishes "image:latest" on Quay & DockerHub -->
@@ -168,12 +230,29 @@
<images>
<!-- Quay image -->
<image>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<name>${image.registry}/${image.name}:${image.tag}</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<contextDir>${project.basedir}</contextDir>
</build>
</image>
<!-- DockerHub image -->
<image>
<name>${image.name}:${image.tag}</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<contextDir>${project.basedir}</contextDir>
</build>
</image>
</images>
</configuration>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<modules>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<organization>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<developers>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<properties>
@@ -165,7 +165,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>3.0.12</version>
<version>3.0.16</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->

View File

@@ -14,7 +14,6 @@ import org.alfresco.utility.testrail.annotation.TestRail;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Ignore;
import org.testng.annotations.Test;
public class AddFavoritesTests extends RestTest
@@ -355,7 +354,6 @@ public class AddFavoritesTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
description = "Verify add file favorite with tag id returns status code 404")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Ignore
public void addFileFavoriteUsingTagId() throws Exception
{
FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);

View File

@@ -128,7 +128,7 @@ public class CreateTagsTests extends RestTest
final String repeatedTagName = getRandomName(TAG_NAME_PREFIX).toLowerCase();
final List<RestTagModel> tagModels = List.of(
createTagModelWithName(repeatedTagName),
createTagModelWithRandomName(),
createTagModelWithName(getRandomName(TAG_NAME_PREFIX).toLowerCase()),
createTagModelWithName(repeatedTagName)
);
@@ -173,13 +173,17 @@ public class CreateTagsTests extends RestTest
public void testCreateTag_usingAlreadyExistingTagName()
{
STEP("Create some tag in the system");
final RestTagModel alreadyExistingTag = prepareOrphanTag();
final RestTagModel tagToCreate = createTagModelWithRandomName();
final RestTagModel alreadyExistingTag = prepareOrphanTag(tagToCreate);
// set original name instead the case lowered one
alreadyExistingTag.setTag(tagToCreate.getTag());
STEP("Try to use already existing tag to create duplicate and expect 409");
restClient.authenticateUser(admin).withCoreAPI().createSingleTag(alreadyExistingTag);
restClient.assertStatusCodeIs(CONFLICT);
restClient.assertLastError().containsSummary("Duplicate child name not allowed: " + alreadyExistingTag.getTag());
restClient
.assertStatusCodeIs(CONFLICT)
.assertLastError().containsSummary("Duplicate child name not allowed: " + alreadyExistingTag.getTag().toLowerCase());
}
/**
@@ -189,7 +193,7 @@ public class CreateTagsTests extends RestTest
public void testCreateTag_includingCount()
{
STEP("Create single tag as admin including count and verify if it is 0");
final RestTagModel tagModel = createTagModelWithRandomName();
final RestTagModel tagModel = createTagModelWithName(getRandomName(TAG_NAME_PREFIX).toLowerCase());
final RestTagModel createdTag = restClient.authenticateUser(admin).withCoreAPI().include(FIELD_COUNT).createSingleTag(tagModel);
restClient.assertStatusCodeIs(CREATED);
@@ -198,9 +202,13 @@ public class CreateTagsTests extends RestTest
.assertThat().field(FIELD_COUNT).is(0);
}
private RestTagModel prepareOrphanTag()
private RestTagModel prepareOrphanTagWithRandomName()
{
return prepareOrphanTag(createTagModelWithRandomName());
}
private RestTagModel prepareOrphanTag(final RestTagModel tagModel)
{
final RestTagModel tagModel = createTagModelWithRandomName();
final RestTagModel tag = restClient.authenticateUser(admin).withCoreAPI().createSingleTag(tagModel);
restClient.assertStatusCodeIs(CREATED);
return tag;
@@ -208,7 +216,7 @@ public class CreateTagsTests extends RestTest
private static RestTagModel createTagModelWithRandomName()
{
return createTagModelWithName(getRandomName(TAG_NAME_PREFIX).toLowerCase());
return createTagModelWithName(getRandomName(TAG_NAME_PREFIX));
}
private static RestTagModel createTagModelWithName(final String tagName)

View File

@@ -0,0 +1,88 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.tags;
import org.alfresco.dataprep.CMISUtil;
import org.alfresco.rest.model.RestTagModel;
import org.alfresco.utility.constants.UserRole;
import org.alfresco.utility.model.TestGroup;
import org.testng.annotations.Test;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.springframework.http.HttpStatus.FORBIDDEN;
import static org.springframework.http.HttpStatus.NOT_FOUND;
import static org.springframework.http.HttpStatus.NO_CONTENT;
public class DeleteTagsTests extends TagsDataPrep
{
/**
* Check we can delete a tag by its id.
*/
@Test(groups = {TestGroup.REST_API})
public void testDeleteTag()
{
STEP("Create a tag assigned to a document and send a request to delete it.");
document = dataContent.usingUser(adminUserModel).usingSite(siteModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
RestTagModel aTag = createTagForDocument(document);
restClient.authenticateUser(dataUser.getAdminUser()).withCoreAPI().usingTag(aTag).deleteTag();
restClient.assertStatusCodeIs(NO_CONTENT);
STEP("Ensure that the tag has been deleted by sending a GET request and receiving 404.");
restClient.authenticateUser(dataUser.getAdminUser()).withCoreAPI().getTag(aTag);
restClient.assertStatusCodeIs(NOT_FOUND);
}
/**
* Attempt to delete a tag as a site manager and receive 403 error.
* Other user roles have fewer permissions than a SiteManager and thus would also be forbidden from deleting a tag.
*/
@Test(groups = {TestGroup.REST_API})
public void testDeleteTagAsSiteManager_andFail()
{
STEP("Create a tag assigned to a document and attempt to delete as a site manager");
document = dataContent.usingUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)).usingSite(siteModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
RestTagModel aTag = createTagForDocument(document);
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)).withCoreAPI().usingTag(aTag).deleteTag();
restClient.assertStatusCodeIs(FORBIDDEN).assertLastError().containsSummary("Current user does not have permission to manage a tag");
}
/**
* Check we receive 404 error when trying to delete a tag with a non-existent id
*/
@Test(groups = {TestGroup.REST_API})
public void testDeleteNonExistentTag()
{
STEP("Attempt to delete tag with non-existent id and receive 404 error");
final String id = "non-existing-dummy-id";
final RestTagModel tagModel = createTagModelWithId(id);
restClient.authenticateUser(dataUser.getAdminUser()).withCoreAPI().usingTag(tagModel).deleteTag();
restClient.assertStatusCodeIs(NOT_FOUND);
}
}

View File

@@ -1,6 +1,5 @@
package org.alfresco.rest.tags;
import java.util.Date;
import org.alfresco.dataprep.CMISUtil;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.model.RestTagModel;
@@ -12,12 +11,9 @@ import org.alfresco.utility.data.RandomData;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.TestGroup;
import org.alfresco.utility.model.UserModel;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = {TestGroup.REQUIRE_SOLR})
public class TagsDataPrep extends RestTest
{
@@ -34,7 +30,9 @@ public class TagsDataPrep extends RestTest
@BeforeClass
public void init() throws Exception
{
//Create users
adminUserModel = dataUser.getAdminUser();
userModel = dataUser.createRandomTestUser();
//Create public site
siteModel = dataSite.usingUser(adminUserModel).createPublicRandomSite();
usersWithRoles = dataUser.usingAdmin().addUsersWithRolesToSite(siteModel, UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer, UserRole.SiteContributor);
@@ -60,4 +58,23 @@ public class TagsDataPrep extends RestTest
});
}
protected RestTagModel createTagForDocument(FileModel document)
{
String documentTagValue = RandomData.getRandomName("tag");
return restClient.withCoreAPI().usingResource(document).addTag(documentTagValue);
}
protected RestTagModel createTagModelWithId(final String id)
{
return createTagModelWithIdAndName(id, RandomData.getRandomName("tag"));
}
protected RestTagModel createTagModelWithIdAndName(final String id, final String tag)
{
return RestTagModel.builder()
.id(id)
.tag(tag)
.create();
}
}

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<developers>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<properties>

20
pom.xml
View File

@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-community-repo</artifactId>
<version>20.81</version>
<version>20.101</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -35,6 +35,8 @@
<build-number>local</build-number>
<image.tag>latest</image.tag>
<image.registry>quay.io</image.registry>
<builder.name>entitled-builder</builder.name>
<local.registry>127.0.0.1:5000</local.registry>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
@@ -45,7 +47,7 @@
<dependency.alfresco-hb-data-sender.version>1.0.12</dependency.alfresco-hb-data-sender.version>
<dependency.alfresco-trashcan-cleaner.version>2.4.1</dependency.alfresco-trashcan-cleaner.version>
<dependency.alfresco-jlan.version>7.2</dependency.alfresco-jlan.version>
<dependency.alfresco-jlan.version>7.4</dependency.alfresco-jlan.version>
<dependency.alfresco-server-root.version>6.0.1</dependency.alfresco-server-root.version>
<dependency.alfresco-messaging-repo.version>1.2.20</dependency.alfresco-messaging-repo.version>
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
@@ -64,7 +66,7 @@
<dependency.bouncycastle.version>1.70</dependency.bouncycastle.version>
<dependency.mockito-core.version>4.9.0</dependency.mockito-core.version>
<dependency.assertj.version>3.24.2</dependency.assertj.version>
<dependency.org-json.version>20220320</dependency.org-json.version>
<dependency.org-json.version>20230227</dependency.org-json.version>
<dependency.commons-dbcp.version>2.9.0</dependency.commons-dbcp.version>
<dependency.commons-io.version>2.11.0</dependency.commons-io.version>
<dependency.gson.version>2.8.9</dependency.gson.version>
@@ -75,7 +77,7 @@
<dependency.slf4j.version>2.0.3</dependency.slf4j.version>
<dependency.log4j.version>2.19.0</dependency.log4j.version>
<dependency.gytheio.version>0.17</dependency.gytheio.version>
<dependency.groovy.version>3.0.12</dependency.groovy.version>
<dependency.groovy.version>3.0.16</dependency.groovy.version>
<dependency.tika.version>2.4.1</dependency.tika.version>
<dependency.spring-security.version>5.7.5</dependency.spring-security.version>
<dependency.truezip.version>7.7.10</dependency.truezip.version>
@@ -87,7 +89,7 @@
<dependency.netty.version>4.1.79.Final</dependency.netty.version> <!-- must be in sync with camels transitive dependencies, e.g.: netty-common -->
<dependency.netty.qpid.version>4.1.72.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.53.Final</dependency.netty-tcnative.version> <!-- must be in sync with camels transitive dependencies -->
<dependency.activemq.version>5.17.1</dependency.activemq.version>
<dependency.activemq.version>5.17.4</dependency.activemq.version>
<dependency.apache-compress.version>1.22</dependency.apache-compress.version>
<dependency.apache.taglibs.version>1.2.5</dependency.apache.taglibs.version>
<dependency.awaitility.version>4.2.0</dependency.awaitility.version>
@@ -120,7 +122,7 @@
<dependency.mysql.version>8.0.30</dependency.mysql.version>
<dependency.mysql-image.version>8</dependency.mysql-image.version>
<dependency.mariadb.version>2.7.4</dependency.mariadb.version>
<dependency.tas-utility.version>3.0.58</dependency.tas-utility.version>
<dependency.tas-utility.version>3.0.61</dependency.tas-utility.version>
<dependency.rest-assured.version>5.2.0</dependency.rest-assured.version>
<dependency.tas-email.version>1.11</dependency.tas-email.version>
<dependency.tas-webdav.version>1.7</dependency.tas-webdav.version>
@@ -148,7 +150,7 @@
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-community-repo</url>
<tag>20.81</tag>
<tag>20.101</tag>
</scm>
<distributionManagement>
@@ -384,7 +386,7 @@
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.4</version>
<version>1.5</version>
</dependency>
<dependency>
@@ -916,7 +918,7 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.40.2</version>
<version>0.42.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<dependencies>

View File

@@ -179,7 +179,7 @@ public class TagsImpl implements Tags
for (Pair<NodeRef, String> pair : page)
{
Tag selectedTag = new Tag(pair.getFirst(), pair.getSecond());
selectedTag.setCount(tagsByCountMap.get(selectedTag.getTag()));
selectedTag.setCount(Optional.ofNullable(tagsByCountMap.get(selectedTag.getTag())).orElse(0));
tags.add(selectedTag);
}

View File

@@ -29,6 +29,7 @@ import static org.alfresco.rest.api.impl.TagsImpl.NOT_A_VALID_TAG;
import static org.alfresco.rest.api.impl.TagsImpl.NO_PERMISSION_TO_MANAGE_A_TAG;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
@@ -83,6 +84,18 @@ public class TagsImplTest
given(nodesMock.validateNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, TAG_ID)).willReturn(TAG_NODE_REF);
given(taggingServiceMock.getTagName(TAG_NODE_REF)).willReturn(TAG_NAME);
}
@Test
public void testGetTags() {
final List<String> tagNames = List.of("testTag","tag11");
final List<Tag> tagsToCreate = createTags(tagNames);
given(taggingServiceMock.createTags(any(), any())).willAnswer(invocation -> createTagAndNodeRefPairs(invocation.getArgument(1)));
given(parametersMock.getInclude()).willReturn(List.of("count"));
final List<Tag> actualCreatedTags = objectUnderTest.createTags(tagsToCreate, parametersMock);
final List<Tag> expectedTags = createTagsWithNodeRefs(tagNames).stream()
.peek(tag -> tag.setCount(0))
.collect(Collectors.toList());
assertEquals(expectedTags, actualCreatedTags);
}
@Test
public void testDeleteTagById()

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.81</version>
<version>20.101</version>
</parent>
<dependencies>

View File

@@ -1,28 +1,28 @@
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.download;
import java.io.File;
@@ -31,6 +31,8 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.attribute.FileTime;
import java.util.Date;
import java.util.Deque;
import java.util.Iterator;
import java.util.LinkedList;
@@ -85,6 +87,8 @@ public class ZipDownloadExporter extends BaseExporter
private String currentName;
private OutputStream outputStream;
private Date zipTimestampCreated;
private Date zipTimestampModified;
/**
* Construct
@@ -137,6 +141,8 @@ public class ZipDownloadExporter extends BaseExporter
public void startNode(NodeRef nodeRef)
{
this.currentName = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
this.zipTimestampCreated = (Date)nodeService.getProperty(nodeRef, ContentModel.PROP_CREATED);
this.zipTimestampModified = (Date)nodeService.getProperty(nodeRef, ContentModel.PROP_MODIFIED);
path.push(new Pair<String, NodeRef>(currentName, nodeRef));
if (dictionaryService.isSubClass(nodeService.getType(nodeRef), ContentModel.TYPE_FOLDER))
{
@@ -144,6 +150,9 @@ public class ZipDownloadExporter extends BaseExporter
ZipArchiveEntry archiveEntry = new ZipArchiveEntry(path);
try
{
archiveEntry.setTime(zipTimestampCreated.getTime());
archiveEntry.setCreationTime(FileTime.fromMillis(zipTimestampCreated.getTime()));
archiveEntry.setLastModifiedTime(FileTime.fromMillis(zipTimestampModified.getTime()));
zipStream.putArchiveEntry(archiveEntry);
zipStream.closeArchiveEntry();
}
@@ -167,6 +176,9 @@ public class ZipDownloadExporter extends BaseExporter
{
// ALF-2016
ZipArchiveEntry zipEntry=new ZipArchiveEntry(getPath());
zipEntry.setTime(zipTimestampCreated.getTime());
zipEntry.setCreationTime(FileTime.fromMillis(zipTimestampCreated.getTime()));
zipEntry.setLastModifiedTime(FileTime.fromMillis(zipTimestampModified.getTime()));
zipStream.putArchiveEntry(zipEntry);
// copy export stream to zip

View File

@@ -1586,11 +1586,11 @@ public class TaggingServiceImpl implements TaggingService,
try
{
return tagNames.stream()
.map(String::toLowerCase)
.peek(tagName -> categoryService.getRootCategories(storeRef, ContentModel.ASPECT_TAGGABLE, tagName, false).stream()
.filter(association -> Objects.nonNull(association.getChildRef()))
.findAny()
.ifPresent(association -> { throw new DuplicateChildNodeNameException(association.getParentRef(), association.getTypeQName(), tagName, null); }))
.map(String::toLowerCase)
.map(tagName -> new Pair<>(tagName, getTagNodeRef(storeRef, tagName, true)))
.collect(Collectors.toList());
}

View File

@@ -1,140 +0,0 @@
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.urlshortening;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.service.cmr.urlshortening.UrlShortener;
import org.apache.commons.httpclient.HostConfiguration;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.protocol.Protocol;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* @deprecated as it is no longer used in the core repository code.
*/
@Deprecated
public class BitlyUrlShortenerImpl implements UrlShortener
{
private static final Log log = LogFactory.getLog(BitlyUrlShortenerImpl.class);
private int urlLength = 20;
private String username;
private String apiKey = "R_ca15c6c89e9b25ccd170bafd209a0d4f";
private HttpClient httpClient;
public BitlyUrlShortenerImpl()
{
httpClient = new HttpClient();
httpClient.setHttpConnectionManager(new MultiThreadedHttpConnectionManager());
HostConfiguration hostConfiguration = new HostConfiguration();
hostConfiguration.setHost("api-ssl.bitly.com", 443, Protocol.getProtocol("https"));
httpClient.setHostConfiguration(hostConfiguration);
}
@Override
public String shortenUrl(String longUrl)
{
if (log.isDebugEnabled())
{
log.debug("Shortening URL: " + longUrl);
}
String shortUrl = longUrl;
if (longUrl.length() > urlLength)
{
GetMethod getMethod = new GetMethod();
getMethod.setPath("/v3/shorten");
List<NameValuePair> args = new ArrayList<NameValuePair>();
args.add(new NameValuePair("login", username));
args.add(new NameValuePair("apiKey", apiKey));
args.add(new NameValuePair("longUrl", longUrl));
args.add(new NameValuePair("format", "txt"));
getMethod.setQueryString(args.toArray(new NameValuePair[args.size()]));
try
{
int resultCode = httpClient.executeMethod(getMethod);
if (resultCode == 200)
{
shortUrl = getMethod.getResponseBodyAsString();
}
else
{
log.warn("Failed to shorten URL " + longUrl + " - response code == " + resultCode);
log.warn(getMethod.getResponseBodyAsString());
}
}
catch (Exception ex)
{
log.error("Failed to shorten URL " + longUrl, ex);
}
if (log.isDebugEnabled())
{
log.debug("URL " + longUrl + " has been shortened to " + shortUrl);
}
}
return shortUrl.trim();
}
/**
* {@inheritDoc}
*/
@Override
public int getUrlLength()
{
return urlLength;
}
/**
* @param urlLength the urlLength to set
*/
public void setUrlLength(int urlLength)
{
this.urlLength = urlLength;
}
/**
* @param username the username to set
*/
public void setUsername(String username)
{
this.username = username;
}
/**
* @param apiKey the apiKey to set
*/
public void setApiKey(String apiKey)
{
this.apiKey = apiKey;
}
}

View File

@@ -813,13 +813,6 @@ solr6.store.mappings.value.solrMappingHistory.baseUrl=/solr/history
solr6.store.mappings.value.solrMappingHistory.protocol=workspace
solr6.store.mappings.value.solrMappingHistory.identifier=history
#
# URL Shortening Properties
#
urlshortening.bitly.username=brianalfresco
urlshortening.bitly.api.key=R_ca15c6c89e9b25ccd170bafd209a0d4f
urlshortening.bitly.url.length=20
#
# Bulk Filesystem Importer
#

View File

@@ -84,7 +84,6 @@ import org.junit.runners.Suite;
org.alfresco.repo.transfer.HttpClientTransmitterImplTest.class,
org.alfresco.repo.transfer.manifest.TransferManifestTest.class,
org.alfresco.repo.transfer.TransferVersionCheckerImplTest.class,
org.alfresco.repo.urlshortening.BitlyUrlShortenerTest.class,
org.alfresco.service.cmr.calendar.CalendarRecurrenceHelperTest.class,
org.alfresco.service.cmr.calendar.CalendarTimezoneHelperTest.class,
org.alfresco.tools.RenameUserTest.class,

View File

@@ -1,59 +0,0 @@
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.urlshortening;
import junit.framework.TestCase;
/**
* @deprecated as BitlyUrlShortenerImpl is no longer used in the core repository code.
*/
@Deprecated
public class BitlyUrlShortenerTest extends TestCase
{
private BitlyUrlShortenerImpl shortener;
public void testShorten()
{
String url = "http://www.alfresco.com/";
String shortUrl = shortener.shortenUrl(url);
assertNotNull(shortUrl);
assertFalse(shortUrl.isEmpty());
assertFalse(url.equals(shortUrl));
assertTrue(shortUrl.length() < url.length());
}
/**
* {@inheritDoc}
*/
@Override
protected void setUp() throws Exception
{
this.shortener = new BitlyUrlShortenerImpl();;
shortener.setApiKey("R_ca15c6c89e9b25ccd170bafd209a0d4f");
shortener.setUrlLength(20);
shortener.setUsername("brianalfresco");
}
}

21
scripts/prepare_buildx.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
BUILDER_NAME="${1}"
TARGET_REGISTRY="${2}"
TARGET_IMAGE="${3}"
IMAGE_TAG="${4}"
#Create a `docker-container` builder with host networking and required flags (quay.io)
docker --config target/docker/"${TARGET_REGISTRY}"/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
#Create a `docker-container` builder with host networking and required flags (docker.io)
docker --config target/docker/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
#Create a `docker-container` builder with host networking and required flags (local registry)
docker --config target/docker/127.0.0.1/5000/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'