diff --git a/pom.xml b/pom.xml
index 4f62ecd4d4..dd82a82d1f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,15 +4,9 @@
org.alfresco
alfresco-rm
pom
- 2.7.1-SNAPSHOT
+ 3.0.0-SNAPSHOT
Alfresco Records Management
-
- org.alfresco.maven
- alfresco-sdk-parent
- 2.1.1
-
-
http://www.alfresco.org/
2005
@@ -24,8 +18,7 @@
scm:git:https://git.alfresco.com/records-management/records-management.git
scm:git:https://git.alfresco.com/records-management/records-management.git
https://git.alfresco.com/records-management/records-management
- HEAD
-
+
JIRA
@@ -41,17 +34,39 @@
+
+ alfresco-internal
+ Alfresco Internal Repository
+ https://artifacts.alfresco.com/nexus/content/groups/internal/
+
alfresco-public
https://artifacts.alfresco.com/nexus/content/groups/public
+
+ alfresco-public-snapshots
+ https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
+
+
+ alfresco-private
+ Alfresco Internal Repository
+ https://artifacts.alfresco.com/nexus/content/groups/private
+
alfresco-public
https://artifacts.alfresco.com/nexus/content/groups/public
+
+ alfresco-plugin-public
+ https://artifacts.alfresco.com/nexus/content/groups/public
+
+
+ alfresco-plugin-public-snapshots
+ https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
+
@@ -186,18 +201,277 @@
+
+
+
+ enable-test-properties-filtering
+
+
+
+ src/test/properties
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${maven.buildhelper.version}
+
+
+ add-env-test-properties
+ generate-resources
+
+ add-test-resource
+
+
+
+
+ ${app.properties.test.folder}
+
+ ${app.properties.test.include}
+
+ ${app.filtering.enabled}
+
+
+
+
+
+
+
+
+
+
+
+
+ buildDockerImage
+
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+ ${fabric8.maven.version}
+
+
+
+ ${image.name}
+
+ ${project.basedir}/
+
+
+
+
+
+
+ build-image
+ install
+
+ build
+
+
+
+ build-image-verify
+ verify
+
+ build
+
+
+
+
+
+
+
+
+
+
+
+ internal
+
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+ ${fabric8.maven.version}
+
+
+
+ ${image.name}:${image.tag}
+ ${image.registry}
+
+ ${project.basedir}/
+
+
+
+
+
+
+ build-push-image
+ deploy
+
+ build
+ push
+
+
+
+
+
+
+
+
+
+
+
+ master
+
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+ ${fabric8.maven.version}
+
+
+
+ ${image.name}
+ ${image.registry}
+
+ ${project.basedir}/
+
+
+
+ ${image.name}
+
+ ${project.basedir}/
+
+
+
+
+
+
+ build-push-image
+ deploy
+
+ build
+ push
+
+
+
+
+
+
+
+
+
+
+
+ release
+
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+ ${fabric8.maven.version}
+
+
+
+ ${image.name}:${project.version}
+ ${image.registry}
+
+ ${project.basedir}/
+
+
+
+ ${image.name}:${project.version}
+
+ ${project.basedir}/
+
+
+
+
+
+
+ build-push-image
+ deploy
+
+ build
+ push
+
+
+
+
+
+
+
+
+ /alfresco
+ ${session.executionRootDirectory}/alf_data_dev
+ org.gjt.mm.mysql.Driver
+ alf_dev
AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0;IGNORECASE=TRUE
+ alfresco
+ jdbc:mysql://${alfresco.db.host}:${alfresco.db.port}/${alfresco.db.name}
+ alfresco
+ org.alfresco
+ share
+ 6.19
+ 6.0.7-ga
+
+ 0.0
+
+ /share
+
false
1.8
1.8
+ 1.9.1
+ 3.2
+ 1.4
+ 2.7
+ 8080
+
+ 0.25.0
+ 1.10.19
+ 42.2.1
+ 5432
+ 5.1.40
+ 3306
+
+ 5431
+
UTF-8
UTF-8
-Xmx1024m -XX:MaxPermSize=256m -Duser.language=en -Dcom.sun.management.jmxremote
+
true
false
+
+ ${project.build.directory}/${project.build.finalName}-war
+ src/main/amp
+ ../${project.build.finalName}
+ true
+ ${project.build.directory}/
+ WARN
+ **
+ src/main/properties/local
+ **
+ src/test/properties/local
+
+ 3.5.37
+ imageNameNotSet
+ latest
+ quay.io
@@ -207,6 +481,27 @@
guava
18.0
+
+ org.mockito
+ mockito-all
+ ${mockito.version}
+
+
+ org.alfresco.surf
+ spring-webscripts
+ ${alfresco-spring-webscripts.version}
+ tests
+
+
+ postgresql
+ postgresql
+ ${alfresco.postgres.version}
+
+
+ mysql
+ mysql-connector-java
+ ${mysql.version}
+
@@ -223,8 +518,8 @@
${project.artifactId}-${project.version}
- org.apache.maven.plugins
maven-enforcer-plugin
+ 1.4
enforce-java
@@ -255,8 +550,8 @@
rm.module.repo.version.min
${alfresco.version}
- (\d+)\.(\d+).*
- $1.$2
+ (\d+)\.(\d+).*
+ $1.$2
false
@@ -283,8 +578,8 @@
- org.apache.maven.plugins
maven-surefire-plugin
+ 2.18
**/*UnitTest.java
@@ -292,7 +587,6 @@
- org.apache.maven.plugins
maven-source-plugin
3.0.1
@@ -305,7 +599,6 @@
- org.apache.maven.plugins
maven-javadoc-plugin
2.10.4
@@ -314,12 +607,155 @@
jar
+
+ -Xdoclint:none
+
+
+
+
+ -Xdoclint:none
+
+
+
+ maven-clean-plugin
+ 2.6.1
+
+
+ default-clean
+ clean
+
+ clean
+
+
+ maven-install-plugin
+ 2.5.2
+
+
+ default-install
+ install
+
+ install
+
+
+
+
+
+ maven-deploy-plugin
+ 2.7
+
+
+ default-deploy
+ deploy
+
+ deploy
+
+
+
+
+
+ maven-site-plugin
+ 3.3
+
+
+ default-site
+ site
+
+ site
+
+
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+
+
+
+
+
+ default-deploy
+ site-deploy
+
+ deploy
+
+
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+
+
+
+
+
+
+ org.apache.maven.archetype
+ archetype-packaging
+ 2.2
+
+
+ org.apache.maven.wagon
+ wagon-webdav-jackrabbit
+ 2.2
+
+
+
+
+ src/main/resources
+ ${app.filtering.enabled}
+
+
+ ${app.amp.folder}
+ ${app.amp.output.folder}
+ ${app.filtering.enabled}
+
+
+
+
+ src/test/resources
+ ${app.filtering.enabled}
+
+
+
+ maven-surefire-plugin
+ 2.18
+
+
+ maven-install-plugin
+ 2.5.2
+
+
+ maven-jar-plugin
+ 2.5
+
+
+ maven-assembly-plugin
+ 2.2-beta-5
+
+
+ org.alfresco.maven.plugin
+ alfresco-maven-plugin
+ 2.1.1
+ true
+
+ true
+
+
maven-compiler-plugin
${maven.compiler.version}
@@ -362,7 +798,7 @@
-
+
org.codehaus.mojo
@@ -372,20 +808,19 @@
[1.9.1,)
-
- regex-properties
-
-
-
-
-
+
+ regex-properties
+
+
+
+
+
- org.apache.maven.plugins
maven-enforcer-plugin
${maven.enforcer.plugin}
@@ -395,12 +830,10 @@
1.0-alpha-2
- org.apache.maven.plugins
maven-failsafe-plugin
2.19
- org.apache.maven.plugins
maven-antrun-plugin
1.8
@@ -417,76 +850,73 @@
- org.apache.maven.plugins
- maven-release-plugin
- 2.5.3
-
- V@{project.version}
-
+ maven-release-plugin
+ 2.5.3
+
+ V@{project.version}
+
- org.apache.maven.plugins
- maven-javadoc-plugin
-
- -Xdoclint:none
-
+ maven-javadoc-plugin
+
+ -Xdoclint:none
+
- org.codehaus.mojo
- license-maven-plugin
- 1.8
-
+ org.codehaus.mojo
+ license-maven-plugin
+ 1.8
+
${license.verbose}
- false
- false
+ false
+ false
- Alfresco Software Limited
- ${project.parent.parent.basedir}/license/description.ftl
- true
- true
+ Alfresco Software Limited
+ ${project.parent.parent.basedir}/license/description.ftl
+ true
+ true
- file:${project.parent.parent.basedir}/license
+ file:${project.parent.parent.basedir}/license
${license.update.dryrun}
- true
- true
+ true
+ true
-
- src
-
+
+ src
+
-
- **/package-info.java
- **/*.properties
- **/*.css
- **/*.xml
- **/*.json
- **/*.txt
- **/*.html
-
+
+ **/package-info.java
+ **/*.properties
+ **/*.css
+ **/*.xml
+ **/*.json
+ **/*.txt
+ **/*.html
+
-
-
-
- first
-
- update-file-header
-
- process-sources
-
-
+
+
+
+ first
+
+ update-file-header
+
+ process-sources
+
+
- org.apache.maven.plugins
maven-resources-plugin
${maven.resources.version}
@@ -496,6 +926,108 @@
3.1.1
+
+ UTF-8
+
+ ftl
+ acp
+ jpg
+ png
+ gif
+ svg
+ pdf
+ doc
+ docx
+ xls
+ xlsx
+ ppt
+ pptx
+ bin
+ lic
+ swf
+ zip
+ msg
+ jar
+ ttf
+ eot
+ woff
+ woff2
+ css
+ ico
+ psd
+
+
+
+
+ maven-war-plugin
+ 2.5
+
+
+ org.alfresco.maven.plugin
+ alfresco-maven-plugin
+ 2.1.1
+
+
+
+ false
+
+
+ true
+
+
+
+
+
+ maven-clean-plugin
+ 2.6.1
+
+
+ maven-dependency-plugin
+ 2.9
+
+
+ maven-archetype-plugin
+ 2.2
+
+ ${skipTests}
+
+
+
+ com.google.code.maven-replacer-plugin
+ replacer
+ 1.5.3
+
+
+ org.apache.tomcat.maven
+ tomcat7-maven-plugin
+ 2.2
+
+ true
+
+
+
+ net.alchim31.maven
+ yuicompressor-maven-plugin
+ 1.5.1
+
+
+ compress-js
+ process-resources
+
+ compress
+
+
+
+ **/webscripts/**
+ **/site-webscripts/**
+ **/*.lib.js
+ **/*.css
+
+ src/main/resources/META-INF
+ false
+
+
+
diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml
index 9537d46a7d..1033c353a4 100644
--- a/rm-automation/pom.xml
+++ b/rm-automation/pom.xml
@@ -8,7 +8,7 @@
org.alfresco
alfresco-rm
- 2.7.1-SNAPSHOT
+ 3.0.0-SNAPSHOT
diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml
index 630c15608d..36080c3d8e 100644
--- a/rm-automation/rm-automation-community-rest-api/pom.xml
+++ b/rm-automation/rm-automation-community-rest-api/pom.xml
@@ -8,7 +8,7 @@
org.alfresco
alfresco-rm-automation
- 2.7.1-SNAPSHOT
+ 3.0.0-SNAPSHOT
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/common/IdNamePair.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/common/IdNamePair.java
index 6110395dc3..c8f1bdedda 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/common/IdNamePair.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/common/IdNamePair.java
@@ -26,6 +26,8 @@
*/
package org.alfresco.rest.rm.community.model.common;
+import java.util.List;
+
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
@@ -50,4 +52,10 @@ public class IdNamePair
@JsonProperty (required = true)
private String name;
+
+ @JsonProperty (required = true)
+ private List aspectNames;
+
+ @JsonProperty (required = true)
+ private String nodeType;
}
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/SearchAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/SearchAPI.java
index edbcf75d40..d940639e8e 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/SearchAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/SearchAPI.java
@@ -136,6 +136,7 @@ public class SearchAPI extends BaseAPI
{
String searchFilterParamaters = MessageFormat.format(RM_DEFAULT_NODES_FILTERS, Boolean.toString(includeFolders),
Boolean.toString(includeCategories));
+
return getItemNames(rmSearch(username, password, "rm", query, searchFilterParamaters, sortby));
}
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java
index bbf001ae3e..e37f3088eb 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java
@@ -710,6 +710,7 @@ public class BaseRMRestTest extends RestTest
{
}
}
+
results = searchApi.searchForNodeNamesAsUser(user.getUsername(), user.getPassword(), term, sortby,
includeFolders, includeCategories);
if (!results.isEmpty() && results.containsAll(expectedResults))
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java
new file mode 100644
index 0000000000..deb51e284d
--- /dev/null
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java
@@ -0,0 +1,96 @@
+/*
+ * #%L
+ * Alfresco Records Management Module
+ * %%
+ * Copyright (C) 2005 - 2018 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * -
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * 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 .
+ * #L%
+ */
+package org.alfresco.rest.rm.community.recordcategories;
+
+import static org.alfresco.utility.data.RandomData.getRandomName;
+import static org.alfresco.utility.report.log.Step.STEP;
+import static org.testng.Assert.assertTrue;
+
+import java.util.List;
+
+import org.alfresco.rest.rm.community.base.BaseRMRestTest;
+import org.alfresco.rest.rm.community.model.record.Record;
+import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
+import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
+
+import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
+import org.alfresco.rest.v0.service.DispositionScheduleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+
+public class AutomaticDispositionTest extends BaseRMRestTest
+{
+ private static final String CUT_OFF_ASPECT = "rma:cutOff";
+
+ @Autowired
+ private DispositionScheduleService dispositionScheduleService;
+
+ private RecordCategory categoryWithRSOnRecords;
+
+ /**
+ * Given there is a complete record eligible for cut off
+ * When the correct duration of time passes
+ * Then the record will be automatically cut off
+ */
+ @Test(enabled = false)
+ public void testAutomaticCutOff() throws Exception
+ {
+ STEP("Create record category with retention schedule and apply it to records.");
+ categoryWithRSOnRecords = createRootCategory(getRandomName("categoryWithRSOnRecords"));
+ dispositionScheduleService.createCategoryRetentionSchedule(categoryWithRSOnRecords.getName(), true);
+
+ STEP("Add retention schedule cut off step with immediate period.");
+ dispositionScheduleService.addCutOffAfterPeriodStep(categoryWithRSOnRecords.getName(), "immediately");
+
+ STEP("Create a record folder with a record");
+ RecordCategoryChild recordFolder = createRecordFolder(categoryWithRSOnRecords.getId(), getRandomName
+ ("recordFolder"));
+ Record record = createElectronicRecord(recordFolder.getId(), getRandomName("elRecord"));
+
+ STEP("Complete the record and wait upon to 5 minutes for automatic job to execute");
+ completeRecord(record.getId());
+
+ RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
+ List aspects = recordsAPI.getRecord(record.getId()).getAspectNames();
+ int count = 0;
+ while (!aspects.contains(CUT_OFF_ASPECT) && count < 30)
+ {
+ // sleep .. allowing the job time to execute
+ Thread.sleep(10000);
+ count++;
+ aspects = recordsAPI.getRecord(record.getId()).getAspectNames();
+ }
+ assertTrue(aspects.contains(CUT_OFF_ASPECT), "Record should now be cut off");
+ }
+
+ @AfterClass (alwaysRun = true)
+ public void deleteCategory()
+ {
+ deleteRecordCategory(categoryWithRSOnRecords.getId());
+ }
+}
diff --git a/rm-community/documentation/README.md b/rm-community/documentation/README.md
index b4b7911330..8e5cf85337 100644
--- a/rm-community/documentation/README.md
+++ b/rm-community/documentation/README.md
@@ -11,14 +11,14 @@
* Easy Access Records
* Physical Records
* Record Import and Export
- * Version Records
+ * [Version Records](./versionRecords)
* Retention
* [Destruction](./destruction)
* Retention Schedules and Events
* Transfer and Accession
* Security
- * [Extended permission service](extendedPermissionService.md)
- * Roles, Capabilities and Permissions
+ * [Extended permission service](security/extendedPermissionService.md)
+ * [Roles and Capabilities](security/rolesAndCapabilities.md)
* Discovery
* Governance Search
* Legal Holds
@@ -27,3 +27,5 @@
* Governance Rules
* Core Module Services
* [RM Patch Service](./PatchService.md)
+* Build and Release
+ * [Build](./build)
diff --git a/rm-community/documentation/build/README.md b/rm-community/documentation/build/README.md
new file mode 100644
index 0000000000..8a50c3219a
--- /dev/null
+++ b/rm-community/documentation/build/README.md
@@ -0,0 +1,6 @@
+## GS Build 
+
+Build location: https://bamboo.alfresco.com/bamboo/browse/RM (not externally accessible.)
+
+Build Flow:
+
\ No newline at end of file
diff --git a/rm-community/documentation/build/resource/build.png b/rm-community/documentation/build/resource/build.png
new file mode 100644
index 0000000000..902e37424b
Binary files /dev/null and b/rm-community/documentation/build/resource/build.png differ
diff --git a/rm-community/documentation/build/resource/build.puml b/rm-community/documentation/build/resource/build.puml
new file mode 100644
index 0000000000..7c56bef154
--- /dev/null
+++ b/rm-community/documentation/build/resource/build.puml
@@ -0,0 +1,66 @@
+@startuml
+
+Title: Governance Services Build Pipeline (RM HEAD)
+
+'build plans:
+'Ent UI: Automated UI Tests Enterprise
+'Com API: Automation Community REST API
+'Ent API: Automation Enterprise REST API
+'Community
+'Com UI: Community Automated UI Tests
+'Enterprise
+'Ent L1: Enterprise Level 1 Automated UI Tests
+'Ent L2: Level 2 Automated UI Tests Enterprise
+'RM Benchmark Driver
+
+
+start
+
+if(Trigger) then (commit to path)
+ if (rm-community/*)
+ :Community;
+ fork
+ :Ent L1;
+ fork again
+ :Enterprise;
+ fork
+ :Ent L2;
+ fork again
+ :Ent UI;
+ end fork
+ end fork
+ elseif (rm-enterprise/*)
+ :Enterprise;
+ fork
+ :Ent L2;
+ fork again
+ :Ent UI;
+ end fork
+ elseif (rm-automation/*)
+ fork
+ :Ent L1;
+ fork again
+ :Ent L2;
+ fork again
+ :Ent UI;
+ end fork
+ stop
+ elseif (rm-community-rest-api/*)
+ :Com API;
+ stop
+ elseif (rm-enterprise-rest-api/*)
+ :Ent API;
+ stop
+ elseif (rm-benchmark-driver/*)
+ :Benchmark;
+ stop
+ else
+ end
+ endif
+else (Time: 1am)
+ :Community UI;
+ stop
+endif
+:Release Step;
+end
+@enduml
\ No newline at end of file
diff --git a/rm-community/documentation/resource/class/governance-services.png b/rm-community/documentation/resource/class/governance-services.png
new file mode 100644
index 0000000000..8237410429
Binary files /dev/null and b/rm-community/documentation/resource/class/governance-services.png differ
diff --git a/rm-community/documentation/resource/class/governance-services.puml b/rm-community/documentation/resource/class/governance-services.puml
new file mode 100644
index 0000000000..82089ab649
--- /dev/null
+++ b/rm-community/documentation/resource/class/governance-services.puml
@@ -0,0 +1,196 @@
+@startuml
+
+class RecordCategory {
+}
+
+class Record {
+}
+
+class NonElectronicRecord {
+}
+
+class FilePlanComponent {
+}
+
+class Transfer {
+ location : String
+ pdfIndicator : boolean
+}
+
+note bottom of Transfer {
+ A holding pen for records
+ that are being transferred
+ out of the system
+}
+
+class Hold {
+}
+
+class EasyAccessRecord {
+}
+
+class RetentionSchedule {
+}
+
+class SecurityGroup {
+ enum groupType
+ {HIERARCHICAL,
+ USER_REQUIRES_ANY,
+ USER_REQUIRES_ALL}
+ unmarkedMark: SecurityMark
+}
+
+class SecurityMark {
+}
+
+class SecurityClassification {
+}
+
+class Event {
+}
+
+class Role {
+}
+
+class Capability {
+ name:String
+}
+
+class RmSite {
+}
+
+class FilePlan {
+}
+
+class UnfiledRecordContainer {
+}
+
+class UnfiledRecordFolder {
+}
+
+class HoldContainer {
+}
+
+class TransferContainer {
+}
+
+class RecordsManagementContainer {
+}
+
+class RecordFolder {
+}
+
+class ClassificationReason {
+}
+
+class ClassificationExemption {
+}
+
+class Content {
+}
+
+class Folder {
+}
+
+class File {
+}
+
+class User {
+}
+
+class Group {
+}
+
+class ClassificationInfo {
+ classification: SecurityClassification
+ reason:ClassificationReason[]
+ classifiedBy: String
+ agency:String
+}
+
+class SourceReference {
+ name:String
+ originatingOrg:String
+ publicationDate:Date
+}
+
+class DowngradeSchedule {
+ date:Date
+ event:String
+ instructions:String
+}
+
+class DeclassificationSchedule {
+ date:Date
+ event:String
+ exemption:Exemption[]
+}
+
+class ClassificationGuide <> {
+}
+
+class DeclassificationTimeframe {
+}
+
+
+ClassificationInfo *-- "*" SourceReference
+ClassificationInfo *-- "0..1" DowngradeSchedule
+
+Folder <|-- RecordFolder
+
+FilePlanComponent <|-- RecordsManagementContainer
+FilePlanComponent <|-- RecordFolder
+FilePlanComponent <|-- NonElectronicRecord
+FilePlanComponent <|-- Record
+RecordsManagementContainer <|-- Hold
+RecordsManagementContainer <|-- UnfiledRecordContainer
+RecordsManagementContainer <|-- HoldContainer
+RecordsManagementContainer <|-- TransferContainer
+RecordsManagementContainer <|-- FilePlan
+RecordsManagementContainer <|-- RecordCategory
+
+Hold "*" o- "*" FilePlanComponent : contains
+
+SecurityGroup "1" *- "*" SecurityMark
+
+Content o-- "*" SecurityMark : securityControls
+User o-- "*" SecurityMark : clearance
+Group o-- "*" SecurityMark : clearance
+
+RecordCategory "1" *- "*" RecordFolder
+RecordCategory *- "*" RecordCategory
+
+note bottom of RecordCategory {
+ A RecordCategory may contain either RecordFolders or
+ RecordCategories but not both. A RecordCategory may only exist
+ as the child of either another RecordCategory or the FilePlan
+}
+
+FilePlan *- "*" RecordsManagementContainer
+HoldContainer *- "*" Hold
+UnfiledRecordContainer *-- "*" UnfiledRecordFolder
+UnfiledRecordFolder *-- "*" Record
+RecordFolder *- "*" Record : contains
+RecordFolder *-- "*" NonElectronicRecord : contains
+
+File <|-- Record
+
+TransferContainer *- "*" Transfer
+Transfer *- "*" Record
+
+Role o- "*" Capability
+User o- "*" Role
+Group o- "*" Role
+
+SecurityMark <|-- SecurityClassification
+Content o- "0..1" SecurityClassification
+
+Record <|- EasyAccessRecord
+Folder "1" o-- "*" EasyAccessRecord
+
+Content <|-- Folder
+Content <|-- File
+
+(Content, SecurityClassification) .. ClassificationInfo
+
+@enduml
\ No newline at end of file
diff --git a/rm-community/documentation/resource/image/CapabilitiesAndRoles.png b/rm-community/documentation/resource/image/CapabilitiesAndRoles.png
new file mode 100644
index 0000000000..606a7d3a73
Binary files /dev/null and b/rm-community/documentation/resource/image/CapabilitiesAndRoles.png differ
diff --git a/rm-community/documentation/extendedPermissionService.md b/rm-community/documentation/security/extendedPermissionService.md
similarity index 100%
rename from rm-community/documentation/extendedPermissionService.md
rename to rm-community/documentation/security/extendedPermissionService.md
diff --git a/rm-community/documentation/security/rolesAndCapabilities.md b/rm-community/documentation/security/rolesAndCapabilities.md
new file mode 100644
index 0000000000..c3372d5b1c
--- /dev/null
+++ b/rm-community/documentation/security/rolesAndCapabilities.md
@@ -0,0 +1,41 @@
+## Alfresco Governance Services' Roles and Capabilities
+
+
+
+
+
+### Purpose
+
+Roles and capabilities allow the GS system to provide a finer grain security evaluation, determining whether an authority has the capability to perform a perticular action on a node.
+
+### Overview
+
+Roles are defined as a collection of capabilities. A capability, generally, has a one to one relationship with an action within the system.
+
+Authorities are assigned roles. If an authority is assigned to a role then it that authority has the capabilities contained within that role, allowing them to perform the related actions.
+
+An authority can be assigned many roles, with the associated capabilities being additive.
+
+Capabilties are evaluated in addition to any ACLs attached to a node, but they are mutally exclusive. A authority may have the capability, but not the permissions on a node and vice versa.
+
+### Design
+
+Roles are implementented as groups. So for every role that is created, there is a corresponding group within the system.
+
+Capabilities are implemented as permissions. In order add a new capability to the system, the extended RM permission model needs to be extended.
+
+When a capability is added to a role, then the capability group is assigned the capability role on the root file plan node.
+
+In this way the permissions of the systems roles reflect their capabilities on the file plan via the capability permissions assigned.
+
+When an authority is assigned to a role, that authority is added as a member of the corresponding role group. In this way they inherit the capability permissions on the file plan that relate to that role group.
+
+If a user attempts to perform an action on a records management artifact which has a related capability. Assuming the user has permission to see the artifact in the first place, then the users capability to perform the action is evaluated.
+
+This is done by firstly determining whether the capability is relevant for this 'kind' of records management artifact. For example the addHold capability is not relevant for a record category.
+
+Then the capability permission is evaluated by traversing to the file plan node and checking whether the current user has the capabilty permission byt virtue of it's membership of the right role group.
+
+Finally any further conditions attached to the capability are evaluated.
+
+
\ No newline at end of file
diff --git a/rm-community/documentation/versionRecords/README.md b/rm-community/documentation/versionRecords/README.md
new file mode 100644
index 0000000000..405827ed13
--- /dev/null
+++ b/rm-community/documentation/versionRecords/README.md
@@ -0,0 +1,20 @@
+## Version Records 
+
+### Notes:
+
+NodesService varies depending on store. Version Service has a different service that hydrates effectively fake nodes (which contain url, version details, associations, aspects, as denormalised meta data) back into a full node
+
+Recorded Versions take content out of version store and create a record by version store implementation extension.
+
+Declaring record as version - standard use case is auto declaring or via records. Head version is extracted to a record, rather than a new version being created
+
+Records are linked by association
+
+Disposition events can be triggered automatically from versioning events.
+
+### Diagram:
+
+
+
+
+
diff --git a/rm-community/documentation/versionRecords/RecordedVersions.png b/rm-community/documentation/versionRecords/RecordedVersions.png
new file mode 100644
index 0000000000..7ac208b9e2
Binary files /dev/null and b/rm-community/documentation/versionRecords/RecordedVersions.png differ
diff --git a/rm-community/pom.xml b/rm-community/pom.xml
index af2b7ee9ec..d20b147c15 100644
--- a/rm-community/pom.xml
+++ b/rm-community/pom.xml
@@ -8,7 +8,7 @@
org.alfresco
alfresco-rm
- 2.7.1-SNAPSHOT
+ 3.0.0-SNAPSHOT
@@ -27,7 +27,7 @@
${alfresco.groupId}
- alfresco-parent
+ acs-community-packaging
${alfresco.version}
pom
import
@@ -39,11 +39,46 @@
pom
import
+
+ org.springframework
+ spring-test
+ ${spring.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-joda
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-yaml
+ ${jackson.version}
+
- 5.2.g
- 5.2.f
+ 2.9.5
+ 5.0.4.RELEASE
+
+ 6.0.7-ga
+ 6.0.b
+
+ true
diff --git a/rm-community/rm-community-repo/.maven-dockerignore b/rm-community/rm-community-repo/.maven-dockerignore
new file mode 100644
index 0000000000..18bb2a12d0
--- /dev/null
+++ b/rm-community/rm-community-repo/.maven-dockerignore
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/Dockerfile b/rm-community/rm-community-repo/Dockerfile
new file mode 100644
index 0000000000..1ffc5a1ecb
--- /dev/null
+++ b/rm-community/rm-community-repo/Dockerfile
@@ -0,0 +1,6 @@
+FROM alfresco/alfresco-content-repository-community:6.0.7-ga
+
+COPY target/alfresco-rm-community-repo-*.amp /usr/local/tomcat/amps/
+
+RUN java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install \
+ /usr/local/tomcat/amps/alfresco-rm-community-repo-*.amp /usr/local/tomcat/webapps/alfresco -nobackup
diff --git a/rm-community/rm-community-repo/config/alfresco/extension/subsystems/imap/default/default/rm-imap-server-context.xml b/rm-community/rm-community-repo/config/alfresco/extension/subsystems/imap/default/default/rm-imap-server-context.xml
index 8c76027779..16728d43c7 100644
--- a/rm-community/rm-community-repo/config/alfresco/extension/subsystems/imap/default/default/rm-imap-server-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/extension/subsystems/imap/default/default/rm-imap-server-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/action-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/action-context.xml
index d1dda0a2e9..45fa00a4f2 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/action-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/action-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/groups/rm-capability-groups-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/groups/rm-capability-groups-context.xml
index 0e940d34ef..cd2480e1f4 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/groups/rm-capability-groups-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/groups/rm-capability-groups-context.xml
@@ -1,7 +1,8 @@
-
-
-
+
-
-
-
+
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-config-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-config-context.xml
index 5cc9dffd5b..62ab932604 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-config-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-config-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-disposition-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-disposition-context.xml
index 3dc524bfe4..fc8b3cd0e9 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-disposition-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-disposition-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-event-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-event-context.xml
index c9362ed9d6..4059dbb88a 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-event-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-event-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-fileplan-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-fileplan-context.xml
index c285a9fb16..a5dfa0f8fc 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-fileplan-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-fileplan-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-freeze-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-freeze-context.xml
index 3de1c78472..c07f8bf69f 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-freeze-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-freeze-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-group-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-group-context.xml
index 7560098bbc..955c4f6548 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-group-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-group-context.xml
@@ -1,7 +1,9 @@
-
+
-
-
+
-
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-reference-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-reference-context.xml
index 2ddba0e1ea..3f2e5174c4 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-reference-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-reference-context.xml
@@ -1,7 +1,8 @@
-
-
-
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-rule-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-rule-context.xml
index 1ad04ef1d7..2a6e997bcf 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-rule-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-rule-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-security-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-security-context.xml
index 2d390542d8..8eb23e4180 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-security-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/capability/rm-capabilities-security-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/content-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/content-context.xml
index d7d9999f20..7e9807e15b 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/content-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/content-context.xml
@@ -5,11 +5,11 @@
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.0.xsd
+ http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-3.0.xsd ">
+ http://www.springframework.org/schema/aop/spring-aop.xsd ">
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-capabilities-classification-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-capabilities-classification-context.xml
index 38866ec77a..2cafcf36a1 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-capabilities-classification-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-capabilities-classification-context.xml
@@ -1,11 +1,13 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-context.xml
index 5d1b5768c0..f5649b294d 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml
index 939392423c..482af53384 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml
@@ -1,7 +1,8 @@
-
-
-
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/rm-model-security-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/rm-model-security-context.xml
index d97f736648..4ad1f6d179 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/rm-model-security-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/rm-model-security-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module-context.xml
index 63242f2ab1..a10096030a 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module-context.xml
@@ -4,9 +4,9 @@
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-3.0.xsd ">
+ http://www.springframework.org/schema/aop/spring-aop.xsd ">
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module.properties b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module.properties
index 011b9d2820..d315370d7b 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module.properties
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module.properties
@@ -7,5 +7,4 @@ module.aliases=org_alfresco_module_dod5015
module.title=Records Management
module.description=Alfresco Record Management Extension
module.version=${rm.module.version}
-
module.repo.version.min=${rm.module.repo.version.min}
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-context.xml
index 6d4c60152e..09b4a74ae5 100755
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v20-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v20-context.xml
index 985a809082..03af26dfad 100755
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v20-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v20-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v21-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v21-context.xml
index aa0a740c59..578fc799bf 100755
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v21-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v21-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v22-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v22-context.xml
index 039ab39125..1cf1af9cde 100755
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v22-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v22-context.xml
@@ -1,7 +1,9 @@
-
+
-
-
+
-
-
-
+
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/query/rm-query-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/query/rm-query-context.xml
index 5bb4a8b094..28b518d348 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/query/rm-query-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/query/rm-query-context.xml
@@ -2,7 +2,8 @@
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-action-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-action-context.xml
index 9d658f65cc..57332900c7 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-action-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-action-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-audit-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-audit-context.xml
index b7c7ce514e..f7bb0bc2cc 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-audit-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-audit-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-capabilities-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-capabilities-context.xml
index b2491bc092..59c1e1b9a9 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-capabilities-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-capabilities-context.xml
@@ -1,9 +1,11 @@
-
+
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-deprecated-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-deprecated-context.xml
index cc663d4f93..5e2b7d389d 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-deprecated-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-deprecated-context.xml
@@ -1,7 +1,10 @@
-
+
+
-
@@ -22,9 +25,9 @@
-
+
-
+
@@ -76,9 +79,9 @@
-
+
-
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-disposition-properties-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-disposition-properties-context.xml
index 6577e35e1f..a3056f1f0b 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-disposition-properties-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-disposition-properties-context.xml
@@ -1,7 +1,9 @@
-
+
-
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-job-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-job-context.xml
index c8cb9b668f..047aaa4a70 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-job-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-job-context.xml
@@ -1,9 +1,15 @@
-
+
-
-
-
+
@@ -13,19 +19,26 @@
-
-
- org.alfresco.module.org_alfresco_module_rm.job.RecordsManagementJob
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -38,35 +51,15 @@
-
-
-
-
-
-
-
-
-
- ${rm.notifyOfRecordsDueForReview.cronExpression}
-
-
-
-
-
-
- org.alfresco.module.org_alfresco_module_rm.job.RecordsManagementJob
-
+
+
@@ -89,45 +82,42 @@
-
-
-
-
-
-
-
-
-
-
-
-
- ${rm.dispositionlifecycletrigger.cronexpression}
-
+
+
+
+
+
+
+
+
+
+
+
-
-
- org.alfresco.module.org_alfresco_module_rm.job.RecordsManagementJob
-
+
+
-
-
+
-
-
- 0/30 * * * * ?
+
+
+
+
+
+
+ 0/30 * * * * ?
+
+
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-model-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-model-context.xml
index ddd303c982..4a02699bf4 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-model-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-model-context.xml
@@ -1,7 +1,9 @@
-
+
-
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml
index 8d16ade1a0..900c93fba3 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml
@@ -2,8 +2,8 @@
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
@@ -202,7 +202,7 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-services-security-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-services-security-context.xml
index 6d90759e2b..ce4d04e6f8 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-services-security-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-services-security-context.xml
@@ -1,5 +1,8 @@
-
+
@@ -10,7 +13,6 @@
-
@@ -63,7 +65,7 @@
-
+
@@ -126,7 +128,8 @@
-
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-report-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-report-context.xml
index 5df936757b..a2486705dd 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-report-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-report-context.xml
@@ -1,7 +1,8 @@
-
-
-
+
@@ -39,9 +40,9 @@
-
+
-
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml
index 1d2f094680..ae1b30d344 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml
@@ -6,13 +6,13 @@
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.0.xsd
+ http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+ http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util-3.0.xsd">
+ http://www.springframework.org/schema/util/spring-util.xsd">
@@ -66,9 +66,9 @@
-
+
-
+
@@ -117,9 +117,9 @@
-
+
-
+
@@ -187,9 +187,9 @@
-
+
-
+
@@ -232,9 +232,9 @@
-
+
-
+
@@ -353,9 +353,9 @@
-
+
-
+
@@ -410,9 +410,9 @@
-
+
-
+
@@ -475,9 +475,9 @@
-
+
-
+
@@ -531,9 +531,9 @@
-
+
-
+
@@ -598,9 +598,9 @@
-
+
-
+
@@ -636,9 +636,9 @@
-
+
-
+
@@ -680,9 +680,9 @@
-
+
-
+
@@ -737,9 +737,9 @@
-
+
-
+
@@ -808,9 +808,9 @@
-
+
-
+
@@ -885,9 +885,9 @@
-
+
-
+
@@ -959,9 +959,9 @@
-
+
-
+
@@ -1019,9 +1019,9 @@
-
+
-
+
@@ -1113,9 +1113,9 @@
-
+
-
+
@@ -1185,9 +1185,9 @@
-
+
-
+
@@ -1228,9 +1228,9 @@
-
+
-
+
@@ -1306,8 +1306,8 @@
-
-
+
+
@@ -1439,8 +1439,8 @@
-
-
+
+
@@ -1484,9 +1484,9 @@
-
+
-
+
@@ -1546,9 +1546,9 @@
-
+
-
+
@@ -1594,9 +1594,9 @@
-
+
-
+
@@ -1647,9 +1647,9 @@
-
+
-
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml
index 2cc9710263..6be1b778bb 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml
@@ -1,7 +1,8 @@
-
-
-
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-version-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-version-context.xml
index 91c2f622ea..7548a52afa 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-version-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-version-context.xml
@@ -1,9 +1,10 @@
-
+
-
-
-
+
@@ -64,9 +65,9 @@
-
+
-
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml
index c922181ba7..30cddbbeee 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml
@@ -1,7 +1,8 @@
-
-
-
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-workflow-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-workflow-context.xml
index 5b6dab5093..defbe811fc 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-workflow-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-workflow-context.xml
@@ -1,6 +1,9 @@
-
-
+
+
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/security/rm-method-security-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/security/rm-method-security-context.xml
index 1d500571ab..5bd3b02433 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/security/rm-method-security-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/security/rm-method-security-context.xml
@@ -1,7 +1,8 @@
-
-
-
+
diff --git a/rm-community/rm-community-repo/docker-compose.yml b/rm-community/rm-community-repo/docker-compose.yml
new file mode 100644
index 0000000000..05ab6bd24a
--- /dev/null
+++ b/rm-community/rm-community-repo/docker-compose.yml
@@ -0,0 +1,59 @@
+version: "3"
+
+# For remote debug we need the CATALINA_OPTS and to expose port 8000.
+
+services:
+ alfresco:
+ # acs repo community image with ags repo community amp applied
+ image: alfresco/ags-repo-community:latest
+ environment:
+ CATALINA_OPTS : "
+ -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
+ "
+ JAVA_OPTS : "
+ -Ddb.driver=org.postgresql.Driver
+ -Ddb.username=alfresco
+ -Ddb.password=alfresco
+ -Ddb.url=jdbc:postgresql://postgres:5432/alfresco
+ -Dsolr.host=solr6
+ -Dsolr.port=8983
+ -Dsolr.secureComms=none
+ -Dsolr.base.url=/solr
+ -Dindex.subsystem.name=solr6
+ -Dalfresco.restApi.basicAuthScheme=true
+ -Dimap.server.enabled=true
+ -Dftp.enabled=true
+ -Dftp.dataPortFrom=30000
+ -Dftp.dataPortTo=30099
+ -Dcifs.enabled=true
+ "
+ ports:
+ - 8080:8080
+ - 8000:8000
+ - 445:445
+ - 143:143
+ - "21:21"
+ - "30000-30099:30000-30099"
+
+ postgres:
+ image: library/postgres:10.1
+ environment:
+ - POSTGRES_PASSWORD=alfresco
+ - POSTGRES_USER=alfresco
+ - POSTGRES_DB=alfresco
+ ports:
+ - 5432:5432
+
+ solr6:
+ image: alfresco/alfresco-search-services:1.1.1
+ environment:
+ #Solr needs to know how to register itself with Alfresco
+ - SOLR_ALFRESCO_HOST=alfresco
+ - SOLR_ALFRESCO_PORT=8080
+ #Alfresco needs to know how to call solr
+ - SOLR_SOLR_HOST=solr6
+ - SOLR_SOLR_PORT=8983
+ #Create the default alfresco and archive cores
+ - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
+ ports:
+ - 8083:8983 #Browser port
diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml
index 8de405183e..7c7b7ddfb5 100644
--- a/rm-community/rm-community-repo/pom.xml
+++ b/rm-community/rm-community-repo/pom.xml
@@ -9,23 +9,30 @@
org.alfresco
alfresco-rm-community
- 2.7.1-SNAPSHOT
+ 3.0.0-SNAPSHOT
+
${basedir}/target/alf_test_data
- org.hibernate.dialect.H2Dialect
+ org.alfresco.repo.domain.dialect.MySQLInnoDBDialect
alfresco
alfresco
alfresco
localhost
+ alfresco-test
alfresco-platform
9.1-901.jdbc4
- 5.1.31
alfresco-rm-community-repo
true
- ${project.build.directory}/solr/home
- 1.4
+
+
+ 7.3
+ 6.55
+ 6.38
+ 6.0.b
+ alfresco/ags-repo-community
+
@@ -120,17 +127,71 @@
+
+
+ io.fabric8
+ docker-maven-plugin
+ ${fabric8.docker.version}
+
+
+
+ test-database
+ postgres:9.4.12
+
+
+ ${database.port}:${postgresql.port}
+
+
+ ${alfresco.db.password}
+ ${alfresco.db.username}
+ ${alfresco.test.db.name}
+
+
+ -c max_connections=300
+
+
+ database system is ready to accept connections
+
+
+
+
+
+ ${skip.integrationtests}
+
+
+
+ start
+ pre-integration-test
+
+ start
+
+
+
+ stop
+ post-integration-test
+
+ stop
+
+
+
+
org.apache.maven.plugins
maven-failsafe-plugin
integration-tests
+ integration-test
integration-test
- verify
+
+ ${alfresco.test.db.name}
+ org.postgresql.Driver
+ jdbc:postgresql://localhost:${database.port}/${alfresco.test.db.name}
+ ${project.build.directory}/alf-data-test
+
${skip.integrationtests}
**/AllTestSuite.class
@@ -157,7 +218,7 @@
org.alfresco
alfresco-share-services
- ${share.version}
+ ${alfresco.alfresco-share-services.version}
amp
@@ -175,7 +236,7 @@
${alfresco.groupId}
- ${app.amp.client.war.artifactId}
+ content-services-community
war
${alfresco.version}
@@ -214,7 +275,7 @@
prepare-package
true
- ${project.build.directory}/alfresco-share-services-${share.version}.amp
+ ${project.build.directory}/alfresco-share-services-${alfresco.alfresco-share-services.version}.amp
${app.amp.client.war.folder}
@@ -298,14 +359,47 @@
${alfresco.groupId}
alfresco-remote-api
- ${alfresco.version}
+ ${dependency.alfresco-remote-api.version}
provided
+
+ ${alfresco.groupId}
+ alfresco-repository
+ ${dependency.alfresco-repository.version}
+ provided
+
+
+ ${alfresco.groupId}
+ alfresco-repository
+ ${dependency.alfresco-repository.version}
+ tests
+ test
+
+
+ ${alfresco.groupId}
+ alfresco-remote-api
+ ${dependency.alfresco-remote-api.version}
+ tests
+ test
+
+
+ ${alfresco.groupId}
+ alfresco-core
+ ${dependency.alfresco-core.version}
+ tests
+ test
+
javax.servlet
javax.servlet-api
provided
+
+ org.alfresco.surf
+ spring-webscripts
+ tests
+ test
+
io.takari.junit
takari-cpsuite
@@ -317,41 +411,9 @@
junit
test
-
- org.alfresco.surf
- spring-webscripts
- tests
- test
-
-
- org.mockito
- mockito-all
- test
-
-
- org.springframework
- spring-test
- 2.5
- test
-
-
- ${alfresco.groupId}
- alfresco-repository
- ${alfresco.version}
- tests
- test
-
-
- ${alfresco.groupId}
- alfresco-remote-api
- ${alfresco.version}
- tests
- test
-
postgresql
postgresql
- ${alfresco.postgres.version}
test
@@ -359,19 +421,6 @@
mysql-connector-java
test
-
- ${alfresco.groupId}
- alfresco-repository
- ${alfresco.version}
- h2scripts
-
-
- *
- *
-
-
- test
-
org.reflections
reflections
@@ -382,25 +431,61 @@
io.swagger
swagger-parser
- 1.0.23
+ 1.0.35
test
-
+
com.github.fge
json-schema-validator
2.2.6
test
+
+ org.mockito
+ mockito-all
+ test
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ provided
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ provided
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ provided
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-joda
+ provided
+
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-yaml
+ provided
+
+
+ org.springframework
+ spring-test
+ test
+
+
use-mysql
${my.db.name}
${my.db.port}
- org.hibernate.dialect.MySQLInnoDBDialect
+ org.alfresco.repo.domain.dialect.MySQLInnoDBDialect
jdbc:mysql://${alfresco.db.host}:${alfresco.db.port}/${alfresco.db.name}
jdbc:mysql://${alfresco.db.host}:${alfresco.db.port}/${alfresco.db.name}
@@ -412,7 +497,7 @@
${my.db.name}
${my.db.port}
- org.hibernate.dialect.PostgreSQLDialect
+ org.alfresco.repo.domain.dialect.PostgreSQLDialect
jdbc:postgresql:template1
jdbc:postgresql:${alfresco.db.name}
@@ -438,32 +523,13 @@
${alfresco.groupId}
- ${alfresco.repo.artifactId}
+ content-services-community
war
${alfresco.version}
-
- unpack-alfresco-config
-
- unpack
-
- generate-resources
-
- ${alfresco.solr.home}
-
-
- alfresco-solr4
- ${alfresco.groupId}
- config
- ${alfresco.version}
- zip
-
-
-
-
@@ -482,74 +548,6 @@
false
-
- org.codehaus.mojo
- build-helper-maven-plugin
-
-
- regex-property
- generate-resources
-
- regex-property
-
-
- solrHomePath
- ${alfresco.solr.home}
- \\
- \\\\
- false
-
-
-
-
-
- com.google.code.maven-replacer-plugin
- replacer
-
-
- setup-solr-config
- generate-resources
-
- replace
-
-
-
-
- false
-
- ${alfresco.solr.home}/context.xml
- ${alfresco.solr.home}/archive-SpacesStore/conf/solrcore.properties
- ${alfresco.solr.home}/workspace-SpacesStore/conf/solrcore.properties
- ${app.amp.client.war.folder}/WEB-INF/web.xml
-
-
-
- @@ALFRESCO_SOLR4_DIR@@
- ${solrHomePath}/
-
-
- @@ALFRESCO_SOLR4_MODEL_DIR@@
- ${solrHomePath}/alfrescoModels/
-
-
- @@ALFRESCO_SOLR4_CONTENT_DIR@@
- ${solrHomePath}/data/content/
-
-
- @@ALFRESCO_SOLR4_DATA_DIR@@
- ${solrHomePath}/data/index/
-
-
- ]]>
-
-
-
- ]]>
- ]]>
-
-
-
-
org.apache.tomcat.maven
tomcat7-maven-plugin
@@ -570,15 +568,6 @@
false
${project.basedir}/tomcat/context.xml
-
- ${alfresco.groupId}
- alfresco-solr4
- ${alfresco.version}
- war
- true
- /solr4
- ${alfresco.solr.home}/context.xml
-
org.alfresco
api-explorer
@@ -608,26 +597,13 @@
mysql
mysql-connector-java
- ${alfresco.mysql.version}
-
-
- ${alfresco.groupId}
- alfresco-repository
- ${alfresco.version}
- h2scripts
-
-
- *
- *
-
-
+ ${mysql.version}
-
wipeDB
@@ -651,7 +627,7 @@
mysql
mysql-connector-java
- ${alfresco.mysql.version}
+ ${mysql.version}
@@ -680,5 +656,50 @@
+
+
+ buildDockerImage
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+
+
+
+
+
+ internal
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+
+
+
+
+
+ master
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+
+
+
+
+
+ release
+
+
+
+ io.fabric8
+ fabric8-maven-plugin
+
+
+
+
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/ApiNodesModelFactory.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/ApiNodesModelFactory.java
index 7e81647f8c..1a35c42c69 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/ApiNodesModelFactory.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/ApiNodesModelFactory.java
@@ -237,7 +237,7 @@ public class ApiNodesModelFactory
}
if (includeParam.contains(RMNode.PARAM_PATH))
{
- rmNode.setPath(apiUtils.lookupPathInfo(info.getNodeRef()));
+ rmNode.setPath(nodes.lookupPathInfo(info.getNodeRef(), null));
}
if (isMinimalInfo && includeParam.contains(RMNode.PARAM_ASPECT_NAMES))
{
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/FilePlanComponentsApiUtils.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/FilePlanComponentsApiUtils.java
index f93e87ed2c..506128ea3b 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/FilePlanComponentsApiUtils.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/FilePlanComponentsApiUtils.java
@@ -39,12 +39,14 @@ import java.io.Serializable;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
+import net.sf.acegisecurity.vote.AccessDecisionVoter;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
@@ -108,9 +110,6 @@ import org.alfresco.util.ParameterCheck;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.social.InternalServerErrorException;
-
-import net.sf.acegisecurity.vote.AccessDecisionVoter;
/**
* Utility class that handles common api endpoint tasks
@@ -611,7 +610,7 @@ public class FilePlanComponentsApiUtils
else
{
// Throw internal error as this method should not be called for other types
- throw new InternalServerErrorException("Creating relative path of type '" + nodesType + "' not suported for this endpoint");
+ throw new InvalidArgumentException("Creating relative path of type '" + nodesType + "' not suported for this endpoint");
}
return lastNodeRef;
@@ -949,56 +948,6 @@ public class FilePlanComponentsApiUtils
return allowableOperations;
}
- protected PathInfo lookupPathInfo(NodeRef nodeRefIn)
- {
- List pathElements = new ArrayList<>();
- Boolean isComplete = Boolean.TRUE;
- final Path nodePath = nodeService.getPath(nodeRefIn);;
- final int pathIndex = 2;
-
- for (int i = nodePath.size() - pathIndex; i >= 0; i--)
- {
- Element element = nodePath.get(i);
- if (element instanceof Path.ChildAssocElement)
- {
- ChildAssociationRef elementRef = ((Path.ChildAssocElement) element).getRef();
- if (elementRef.getParentRef() != null)
- {
- NodeRef childNodeRef = elementRef.getChildRef();
- if (permissionService.hasPermission(childNodeRef, PermissionService.READ) == AccessStatus.ALLOWED)
- {
- Serializable nameProp = nodeService.getProperty(childNodeRef, ContentModel.PROP_NAME);
- pathElements.add(0, new ElementInfo(childNodeRef.getId(), nameProp.toString()));
- }
- else
- {
- // Just return the pathInfo up to the location where the user has access
- isComplete = Boolean.FALSE;
- break;
- }
- }
- }
- }
-
- String pathStr = null;
- if (!pathElements.isEmpty())
- {
- StringBuilder sb = new StringBuilder(120);
- for (PathInfo.ElementInfo e : pathElements)
- {
- sb.append("/").append(e.getName());
- }
- pathStr = sb.toString();
- }
- else
- {
- // There is no path element, so set it to null in order to be
- // ignored by Jackson during serialisation
- isComplete = null;
- }
- return new PathInfo(pathStr, isComplete, pathElements);
- }
-
/**
* Helper method to obtain file plan type or null if the rm site does not exist.
*
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/RMNode.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/RMNode.java
index a18818e85e..b9d583476d 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/RMNode.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/RMNode.java
@@ -31,6 +31,8 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
import org.alfresco.rest.api.model.Assoc;
import org.alfresco.rest.api.model.PathInfo;
import org.alfresco.rest.api.model.UserInfo;
@@ -103,6 +105,7 @@ public abstract class RMNode
}
+ @JsonProperty ("id")
@UniqueId
public NodeRef getNodeRef()
{
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/Transfer.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/Transfer.java
index f50df50d16..be6da6966f 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/Transfer.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/Transfer.java
@@ -31,6 +31,8 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
import org.alfresco.rest.api.model.UserInfo;
import org.alfresco.rest.framework.resource.UniqueId;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -67,6 +69,7 @@ public class Transfer
{
}
+ @JsonProperty ("id")
@UniqueId
public NodeRef getNodeRef()
{
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/TransferContainer.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/TransferContainer.java
index 58441d34fc..dcc9192603 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/TransferContainer.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/TransferContainer.java
@@ -31,6 +31,8 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
import org.alfresco.rest.api.model.UserInfo;
import org.alfresco.rest.framework.resource.UniqueId;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -60,6 +62,7 @@ public class TransferContainer
{
}
+ @JsonProperty ("id")
@UniqueId
public NodeRef getNodeRef()
{
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/UnfiledChild.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/UnfiledChild.java
index 5329439aaf..5ab14d5417 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/UnfiledChild.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/model/UnfiledChild.java
@@ -28,6 +28,7 @@
package org.alfresco.rm.rest.api.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Abstract class carrying information for an unfiled container or unfiled record folder child
@@ -43,6 +44,7 @@ public abstract class UnfiledChild extends RMNode
protected Boolean isUnfiledRecordFolder;
protected Boolean isRecord;
+ @JsonProperty (PARAM_IS_UNFILED_RECORD_FOLDER)
public Boolean getIsUnfiledRecordFolder()
{
return isUnfiledRecordFolder;
@@ -54,6 +56,7 @@ public abstract class UnfiledChild extends RMNode
this.isUnfiledRecordFolder = isUnfiledRecordFolder;
}
+ @JsonProperty (PARAM_IS_RECORD)
public Boolean getIsRecord()
{
return isRecord;
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/util/CustomDateTimeSerializer.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/util/CustomDateTimeSerializer.java
new file mode 100644
index 0000000000..631ccee679
--- /dev/null
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/util/CustomDateTimeSerializer.java
@@ -0,0 +1,73 @@
+/*
+ * #%L
+ * Alfresco Records Management Module
+ * %%
+ * Copyright (C) 2005 - 2018 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * -
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * 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 .
+ * #L%
+ */
+package org.alfresco.rm.rest.api.util;
+
+import java.io.IOException;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+
+import org.joda.time.DateTime;
+import org.joda.time.format.DateTimeFormatter;
+import org.joda.time.format.ISODateTimeFormat;
+
+/**
+ * Custom Date Time serializer for formatting org.joda.time.DateTime
+ *
+ * @author Rodica Sutu
+ * @since 3.0
+ */
+public class CustomDateTimeSerializer extends StdSerializer
+{
+ /** Date time format */
+ private final static DateTimeFormatter DATE_TIME_FORMAT = ISODateTimeFormat.dateTime();
+
+ public CustomDateTimeSerializer()
+ {
+ super(DateTime.class);
+ }
+
+ protected CustomDateTimeSerializer(Class t)
+ {
+ super(t);
+ }
+
+ /**
+ * Custom serialize method to convert the org.joda.time.DateTime into string value using the DATE_TIME_FORMAT
+ *
+ * @param value datetime value
+ * @param jgen
+ * @param provider
+ * @throws IOException
+ */
+ @Override
+ public void serialize(DateTime value, JsonGenerator jgen, SerializerProvider provider) throws IOException
+ {
+ jgen.writeString(DATE_TIME_FORMAT.print(value));
+ }
+}
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/util/CustomLocalDateDeserializer.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/util/CustomLocalDateDeserializer.java
new file mode 100644
index 0000000000..ef8133a114
--- /dev/null
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/util/CustomLocalDateDeserializer.java
@@ -0,0 +1,74 @@
+/*
+ * #%L
+ * Alfresco Records Management Module
+ * %%
+ * Copyright (C) 2005 - 2018 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * -
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * 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 .
+ * #L%
+ */
+package org.alfresco.rm.rest.api.util;
+
+import java.io.IOException;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+
+import org.joda.time.LocalDate;
+import org.joda.time.format.DateTimeFormatter;
+import org.joda.time.format.ISODateTimeFormat;
+
+
+/**
+ * Custom Local Date deserializer converting a string to org.joda.time.LocalDate when the time is optional;
+ *
+ * @author Rodica Sutu
+ * @since 3.0
+ */
+public class CustomLocalDateDeserializer extends StdDeserializer
+{
+ /** Date time format with time optional */
+ private final static DateTimeFormatter LOCAL_DATE_OPTIONAL_TIME_PARSER = ISODateTimeFormat.localDateOptionalTimeParser();
+
+ public CustomLocalDateDeserializer()
+ {
+ super(LocalDate.class);
+ }
+
+ /**
+ * Custom deserialize method to convert string to the org.joda.time.LocalDate type with LOCAL_DATE_OPTIONAL_TIME_PARSER
+ *
+ * @param jp local date value
+ * @param ctxt
+ * @throws IOException
+ */
+ @Override
+ public LocalDate deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException
+ {
+ String str = jp.getText().trim();
+ if (str.length() == 0)
+ {
+ return null;
+ }
+ return LOCAL_DATE_OPTIONAL_TIME_PARSER.parseLocalDate(str);
+ }
+}
+
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/util/CustomLocalDateSerializer.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/util/CustomLocalDateSerializer.java
new file mode 100644
index 0000000000..b3aa93c66a
--- /dev/null
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/util/CustomLocalDateSerializer.java
@@ -0,0 +1,73 @@
+/*
+ * #%L
+ * Alfresco Records Management Module
+ * %%
+ * Copyright (C) 2005 - 2018 Alfresco Software Limited
+ * %%
+ * This file is part of the Alfresco software.
+ * -
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * 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 .
+ * #L%
+ */
+package org.alfresco.rm.rest.api.util;
+
+import java.io.IOException;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+
+import org.joda.time.LocalDate;
+import org.joda.time.format.DateTimeFormatter;
+import org.joda.time.format.ISODateTimeFormat;
+
+/**
+ * Custom Local Date serializer for formatting org.joda.time.LocalDate
+ *
+ * @author Rodica Sutu
+ * @since 3.0
+ */
+public class CustomLocalDateSerializer extends StdSerializer
+{
+ /** Local date format yyyy-MM-dd*/
+ private final static DateTimeFormatter DATE_FORMAT = ISODateTimeFormat.date();
+
+ public CustomLocalDateSerializer()
+ {
+ super(LocalDate.class);
+ }
+
+ protected CustomLocalDateSerializer(Class t)
+ {
+ super(t);
+ }
+
+ /**
+ * Custom serialize method to convert the org.joda.time.LocalDate into string value using the DATE_FORMAT
+ *
+ * @param value local date value
+ * @param jgen
+ * @param provider
+ * @throws IOException
+ */
+ @Override
+ public void serialize(LocalDate value, JsonGenerator jgen, SerializerProvider provider) throws IOException
+ {
+ jgen.writeString(DATE_FORMAT.print(value));
+ }
+}
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/src/test/properties/local/alfresco-global.properties b/rm-community/rm-community-repo/src/test/properties/local/alfresco-global.properties
index 06249c5121..956533c7fe 100644
--- a/rm-community/rm-community-repo/src/test/properties/local/alfresco-global.properties
+++ b/rm-community/rm-community-repo/src/test/properties/local/alfresco-global.properties
@@ -65,5 +65,9 @@ cifs.enabled=false
ftp.enabled=false
# Solr config
-index.subsystem.name=solr4
-solr.secureComms=none
\ No newline at end of file
+index.subsystem.name=solr6
+solr.secureComms=none
+solr.port=8983
+
+#By default the basic auth is on false - REPO-2575
+alfresco.restApi.basicAuthScheme=true
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/job/AutomaticDispositionTest.java b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/job/AutomaticDispositionTest.java
deleted file mode 100644
index 6230fc6a4b..0000000000
--- a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/job/AutomaticDispositionTest.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * #%L
- * Alfresco Records Management Module
- * %%
- * Copyright (C) 2005 - 2018 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * -
- * If the software was purchased under a paid Alfresco license, the terms of
- * 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 .
- * #L%
- */
-
-package org.alfresco.module.org_alfresco_module_rm.test.integration.job;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.alfresco.module.org_alfresco_module_rm.action.impl.CutOffAction;
-import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService;
-import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
-import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
-import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
-import org.alfresco.module.org_alfresco_module_rm.test.util.CommonRMTestUtils;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.namespace.QName;
-import org.alfresco.util.GUID;
-import org.apache.commons.lang3.ArrayUtils;
-
-/**
- * Test automatic disposition via scheduled job.
- *
- * @author Roy Wetherall
- * @since 2.2
- */
-public class AutomaticDispositionTest extends BaseRMTestCase
-{
- @SuppressWarnings("unused")
- private RecordsManagementAuditService auditService;
-
- /** additional job context to override job frequency */
- protected String[] getConfigLocations()
- {
- return ArrayUtils.add(super.getConfigLocations(), "classpath:test-job-context.xml");
- }
-
- /**
- * @see org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase#initServices()
- */
- @Override
- protected void initServices()
- {
- super.initServices();
- auditService = (RecordsManagementAuditService)applicationContext.getBean("recordsManagementAuditService");
- }
-
- /**
- * Given there is a complete record eligible for cut off, when the correct frequency of time passes, then
- * the record will be automatically cut off
- */
- public void testAutomaticCutOff()
- {
- doBehaviourDrivenTest(new BehaviourDrivenTest()
- {
- NodeRef sourceCategory;
- NodeRef sourceRecordFolder;
- NodeRef record;
-
- public void given()
- {
- // create test data
- sourceCategory = filePlanService.createRecordCategory(filePlan, GUID.generate());
- DispositionSchedule dis = utils.createBasicDispositionSchedule(sourceCategory, GUID.generate(), GUID.generate(), true, false);
- Map adParams = new HashMap(3);
- adParams.put(PROP_DISPOSITION_ACTION_NAME, CutOffAction.NAME);
- adParams.put(PROP_DISPOSITION_DESCRIPTION, GUID.generate());
- adParams.put(PROP_DISPOSITION_PERIOD, CommonRMTestUtils.PERIOD_IMMEDIATELY);
- dispositionService.addDispositionActionDefinition(dis, adParams);
- sourceRecordFolder = recordFolderService.createRecordFolder(sourceCategory, GUID.generate());
-
- // create and complete record
- record = utils.createRecord(sourceRecordFolder, GUID.generate());
- utils.completeRecord(record);
-
- // check the disposition action details
- DispositionAction dispositionAction = dispositionService.getNextDispositionAction(record);
- assertNotNull(dispositionAction);
- assertNotNull(CutOffAction.NAME, dispositionAction.getName());
- assertTrue(dispositionService.isNextDispositionActionEligible(record));
- }
-
- public void when() throws Exception
- {
- // sleep .. allowing the job time to execute
- Thread.sleep(30000);
- }
-
- public void then()
- {
- // record should now be cut off
- assertTrue(dispositionService.isDisposableItemCutoff(record));
-
- // TODO .. automatic dispoistion does not log entry in audit
- // .. the following test checks for this, but is currently commented out
- // .. because it doesn't work!
-// RecordsManagementAuditQueryParameters params = new RecordsManagementAuditQueryParameters();
-// params.setEvent(CutOffAction.NAME);
-// params.setMaxEntries(1);
-// List entries = auditService.getAuditTrail(params);
-// assertNotNull(entries);
-// assertEquals(1, entries.size());
-//
-// RecordsManagementAuditEntry entry = entries.get(0);
-// assertEquals(record, entry.getNodeRef());
- }
- });
- }
-
- // TODO automatic retain
-
- // TODO automatic destroy
-}
diff --git a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RMCaveatConfigServiceImplTest.java b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RMCaveatConfigServiceImplTest.java
deleted file mode 100644
index d4f7201bfc..0000000000
--- a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RMCaveatConfigServiceImplTest.java
+++ /dev/null
@@ -1,621 +0,0 @@
-/*
- * #%L
- * Alfresco Records Management Module
- * %%
- * Copyright (C) 2005 - 2018 Alfresco Software Limited
- * %%
- * This file is part of the Alfresco software.
- * -
- * If the software was purchased under a paid Alfresco license, the terms of
- * 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 .
- * #L%
- */
-
-package org.alfresco.module.org_alfresco_module_rm.test.legacy.service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.transaction.UserTransaction;
-
-import org.alfresco.model.ContentModel;
-import org.alfresco.module.org_alfresco_module_rm.caveat.RMCaveatConfigService;
-import org.alfresco.module.org_alfresco_module_rm.caveat.RMCaveatConfigServiceImpl;
-import org.alfresco.module.org_alfresco_module_rm.dod5015.DOD5015Model;
-import org.alfresco.repo.security.authentication.AuthenticationUtil;
-import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.cmr.repository.NodeService;
-import org.alfresco.service.cmr.repository.StoreRef;
-import org.alfresco.service.cmr.security.AuthorityService;
-import org.alfresco.service.cmr.security.AuthorityType;
-import org.alfresco.service.cmr.security.MutableAuthenticationService;
-import org.alfresco.service.cmr.security.PersonService;
-import org.alfresco.service.transaction.TransactionService;
-import org.alfresco.util.BaseSpringTest;
-import org.alfresco.util.PropertyMap;
-
-/**
- * Test of RM Caveat (Admin facing scripts)
- *
- * @author Mark Rogers
- */
-public class RMCaveatConfigServiceImplTest extends BaseSpringTest implements DOD5015Model
-{
- protected static StoreRef SPACES_STORE = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
-
- private NodeRef filePlan;
-
- private NodeService nodeService;
- private TransactionService transactionService;
- private RMCaveatConfigService caveatConfigService;
-
- private MutableAuthenticationService authenticationService;
- private PersonService personService;
- private AuthorityService authorityService;
-
-
- // example base test data for supplemental markings list
- protected final static String NOFORN = "NOFORN"; // Not Releasable to Foreign Nationals/Governments/Non-US Citizens
- protected final static String NOCONTRACT = "NOCONTRACT"; // Not Releasable to Contractors or Contractor/Consultants
- protected final static String FOUO = "FOUO"; // For Official Use Only
- protected final static String FGI = "FGI"; // Foreign Government Information
-
- protected final static String RM_LIST = "rmc:smList"; // existing pre-defined list
- protected final static String RM_LIST_ALT = "rmc:anoList";
-
- @Override
- protected void onSetUpInTransaction() throws Exception
- {
- super.onSetUpInTransaction();
-
- // Get the service required in the tests
- this.nodeService = (NodeService)this.applicationContext.getBean("NodeService"); // use upper 'N'odeService (to test access config interceptor)
- this.authenticationService = (MutableAuthenticationService)this.applicationContext.getBean("AuthenticationService");
- this.personService = (PersonService)this.applicationContext.getBean("PersonService");
- this.authorityService = (AuthorityService)this.applicationContext.getBean("AuthorityService");
- this.caveatConfigService = (RMCaveatConfigServiceImpl)this.applicationContext.getBean("caveatConfigService");
- this.transactionService = (TransactionService)this.applicationContext.getBean("TransactionService");
-
-
- // Set the current security context as admin
- AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
-
- // Get the test data
- setUpTestData();
- }
-
- private void setUpTestData()
- {
- }
-
- @Override
- protected void onTearDownInTransaction() throws Exception
- {
- try
- {
- UserTransaction txn = transactionService.getUserTransaction(false);
- txn.begin();
- this.nodeService.deleteNode(filePlan);
- txn.commit();
- }
- catch (Exception e)
- {
- // Nothing
- //System.out.println("DID NOT DELETE FILE PLAN!");
- }
- }
-
- @Override
- protected void onTearDownAfterTransaction() throws Exception
- {
- // TODO Auto-generated method stub
- super.onTearDownAfterTransaction();
- }
-
- public void testSetup()
- {
- // NOOP
- }
-
-
- /**
- * Test of Caveat Config
- *
- * @throws Exception
- */
- public void testAddRMConstraintList() throws Exception
- {
- setComplete();
- endTransaction();
-
- cleanCaveatConfigData();
-
- startNewTransaction();
-
- /**
- * Now remove the entire list (rma:smList);
- */
- logger.debug("test remove entire list rmc:smList");
- caveatConfigService.deleteRMConstraint(RM_LIST);
-
- /**
- * Now add the list again
- */
- logger.debug("test add back rmc:smList");
- caveatConfigService.addRMConstraint(RM_LIST, "my title", new String[0]);
-
- /**
- * Negative test - add a list that already exists
- */
- logger.debug("try to create duplicate list rmc:smList");
- caveatConfigService.addRMConstraint(RM_LIST, "my title", new String[0]);
-
- /**
- * Negative test - remove a list that does not exist
- */
- logger.debug("test remove entire list rmc:smList");
- caveatConfigService.deleteRMConstraint(RM_LIST);
- try
- {
- caveatConfigService.deleteRMConstraint(RM_LIST);
- fail("unknown constraint should have thrown an exception");
- }
- catch (Exception e)
- {
- // expect to go here
- }
-
-
- /**
- * Negative test - add a constraint to property that does not exist
- */
- logger.debug("test property does not exist");
- try
- {
- caveatConfigService.addRMConstraint("rma:mer", "", new String[0]);
- fail("unknown property should have thrown an exception");
- }
- catch (Exception e)
- {
- // expect to go here
- }
- endTransaction();
- cleanCaveatConfigData();
-
- }
-
- /**
- * Test of addRMConstraintListValue
- *
- * @throws Exception
- */
- public void testAddRMConstraintListValue() throws Exception
- {
- setComplete();
- endTransaction();
-
- cleanCaveatConfigData();
- setupCaveatConfigData();
-
- startNewTransaction();
- caveatConfigService.addRMConstraint(RM_LIST, "my title", new String[0]);
-
- /**
- * Add a user to the list
- */
- List values = new ArrayList();
- values.add(NOFORN);
- values.add(NOCONTRACT);
- caveatConfigService.updateRMConstraintListAuthority(RM_LIST, "jrogers", values);
-
- /**
- * Add another value to that list
- */
- caveatConfigService.addRMConstraintListValue(RM_LIST, "jrogers", FGI);
-
- /**
- * Negative test - attempt to add a duplicate value
- */
- caveatConfigService.addRMConstraintListValue(RM_LIST, "jrogers", FGI);
-
- /**
- * Negative test - attempt to add to a list that does not exist
- */
- try
- {
- caveatConfigService.addRMConstraintListValue(RM_LIST_ALT, "mhouse", FGI);
- fail("exception not thrown");
- }
- catch (Exception re)
- {
- // should go here
-
- }
-
- /**
- * Negative test - attempt to add to a list that does exist and user that does not exist
- */
- try
- {
- caveatConfigService.addRMConstraintListValue(RM_LIST, "mhouse", FGI);
- fail("exception not thrown");
- }
- catch (Exception e)
- {
- // should go here
- }
-
- }
-
-
- /**
- * Test of UpdateRMConstraintListAuthority
- *
- * @throws Exception
- */
- public void testUpdateRMConstraintListAuthority() throws Exception
- {
- setComplete();
- endTransaction();
-
- cleanCaveatConfigData();
- setupCaveatConfigData();
-
- startNewTransaction();
-
- caveatConfigService.addRMConstraint(RM_LIST, "my title", new String[0]);
-
- /**
- * Add a user to the list
- */
- List values = new ArrayList();
- values.add(NOFORN);
- values.add(NOCONTRACT);
- caveatConfigService.updateRMConstraintListAuthority(RM_LIST, "jrogers", values);
-
- /**
- * Add to a authority that already exists
- * Should replace existing authority
- */
- List updatedValues = new ArrayList();
- values.add(FGI);
- caveatConfigService.updateRMConstraintListAuthority(RM_LIST, "jrogers", updatedValues);
-
- /**
- * Add a group to the list
- */
- caveatConfigService.updateRMConstraintListAuthority(RM_LIST, "Engineering", values);
-
- /**
- * Add to a list that does not exist
- * Should create a new list
- */
- caveatConfigService.deleteRMConstraint(RM_LIST);
- caveatConfigService.updateRMConstraintListAuthority(RM_LIST, "jrogers", values);
-
-
- /**
- * Add to a authority that already exists
- * Should replace existing authority
- */
-
- endTransaction();
- cleanCaveatConfigData();
-
- }
-
- /**
- * Test of RemoveRMConstraintListAuthority
- *
- * @throws Exception
- */
- public void testRemoveRMConstraintListAuthority() throws Exception
- {
- setComplete();
- endTransaction();
-
- cleanCaveatConfigData();
- setupCaveatConfigData();
-
- startNewTransaction();
- caveatConfigService.addRMConstraint(RM_LIST, "my title", new String[0]);
-
- List values = new ArrayList();
- values.add(FGI);
- caveatConfigService.updateRMConstraintListAuthority(RM_LIST, "jrogers", values);
-
- /**
- * Remove a user from a list
- */
- caveatConfigService.removeRMConstraintListAuthority(RM_LIST, "jrogers");
-
- /**
- * Negative test - remove a user that does not exist
- */
- caveatConfigService.removeRMConstraintListAuthority(RM_LIST, "jrogers");
-
- /**
- * Negative test - remove a user from a list that does not exist.
- * Should create a new list
- */
-
- caveatConfigService.addRMConstraint(RM_LIST, "my title", new String[0]);
- caveatConfigService.updateRMConstraintListAuthority(RM_LIST, "jrogers", values);
-
- endTransaction();
- cleanCaveatConfigData();
-
- }
-
-
-
-
- /**
- * Test of Caveat Config
- *
- * @throws Exception
- */
- public void testRMCaveatConfig() throws Exception
- {
- setComplete();
- endTransaction();
-
- cleanCaveatConfigData();
-
- startNewTransaction();
-
- caveatConfigService.addRMConstraint(RM_LIST, "my title", new String[0]);
-
- List values = new ArrayList();
- values.add(NOFORN);
- values.add(FOUO);
- caveatConfigService.updateRMConstraintListAuthority(RM_LIST, "dfranco", values);
-
- values.add(FGI);
- values.add(NOCONTRACT);
- caveatConfigService.updateRMConstraintListAuthority(RM_LIST, "dmartinz", values);
-
- // Test list of allowed values for caveats
-
- List allowedValues = AuthenticationUtil.runAs(new RunAsWork>()
- {
- public List doWork()
- {
- // get allowed values for given caveat (for current user)
- return caveatConfigService.getRMAllowedValues(RM_LIST);
- }
- }, "dfranco");
-
- assertEquals(2, allowedValues.size());
- assertTrue(allowedValues.contains(NOFORN));
- assertTrue(allowedValues.contains(FOUO));
-
-
- allowedValues = AuthenticationUtil.runAs(new RunAsWork>()
- {
- public List doWork()
- {
- // get allowed values for given caveat (for current user)
- return caveatConfigService.getRMAllowedValues(RM_LIST);
- }
- }, "dmartinz");
-
- assertEquals(4, allowedValues.size());
- assertTrue(allowedValues.contains(NOFORN));
- assertTrue(allowedValues.contains(NOCONTRACT));
- assertTrue(allowedValues.contains(FOUO));
- assertTrue(allowedValues.contains(FGI));
-
- /**
- //
- * Now remove the entire list (rma:smList);
- */
- logger.debug("test remove entire list rmc:smList");
- caveatConfigService.deleteRMConstraint(RM_LIST);
-
-
- /**
- * Now add the list again
- */
- logger.debug("test add back rmc:smList");
- caveatConfigService.addRMConstraint(RM_LIST, "my title", new String[0]);
-
- /**
- * Negative test - add a list that already exists
- */
- logger.debug("try to create duplicate list rmc:smList");
- caveatConfigService.addRMConstraint(RM_LIST, "my title", new String[0]);
-
- /**
- * Negative test - remove a list that does not exist
- */
- logger.debug("test remove entire list rmc:smList");
- caveatConfigService.deleteRMConstraint(RM_LIST);
- try
- {
- caveatConfigService.deleteRMConstraint(RM_LIST);
- fail("unknown constraint should have thrown an exception");
- }
- catch (Exception e)
- {
- // expect to go here
- }
-
-
- /**
- * Negative test - add a constraint to property that does not exist
- */
- logger.debug("test property does not exist");
- try
- {
- caveatConfigService.addRMConstraint("rma:mer", "", new String[0]);
- fail("unknown property should have thrown an exception");
- }
- catch (Exception e)
- {
- // expect to go here
- }
- endTransaction();
- cleanCaveatConfigData();
- }
-
- private void cleanCaveatConfigData()
- {
- startNewTransaction();
-
- AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
-
- deleteUser("jrangel");
- deleteUser("dmartinz");
- deleteUser("jrogers");
- deleteUser("hmcneil");
- deleteUser("dfranco");
- deleteUser("gsmith");
- deleteUser("eharris");
- deleteUser("bbayless");
- deleteUser("mhouse");
- deleteUser("aly");
- deleteUser("dsandy");
- deleteUser("driggs");
- deleteUser("test1");
-
- deleteGroup("Engineering");
- deleteGroup("Finance");
- deleteGroup("test1");
-
- caveatConfigService.updateOrCreateCaveatConfig("{}"); // empty config !
-
- setComplete();
- endTransaction();
- }
-
- private void setupCaveatConfigData()
- {
- startNewTransaction();
-
- // Switch to admin
- AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
-
- // Create test users/groups (if they do not already exist)
-
- createUser("jrangel");
- createUser("dmartinz");
- createUser("jrogers");
- createUser("hmcneil");
- createUser("dfranco");
- createUser("gsmith");
- createUser("eharris");
- createUser("bbayless");
- createUser("mhouse");
- createUser("aly");
- createUser("dsandy");
- createUser("driggs");
- createUser("test1");
-
- createGroup("Engineering");
- createGroup("Finance");
- createGroup("test1");
-
- addToGroup("jrogers", "Engineering");
- addToGroup("dfranco", "Finance");
-
- // not in grouo to start with - added later
- //addToGroup("gsmith", "Engineering");
-
-
- //URL url = AbstractContentTransformerTest.class.getClassLoader().getResource("testCaveatConfig2.json"); // from test-resources
- //assertNotNull(url);
- //File file = new File(url.getFile());
- //assertTrue(file.exists());
-
- //caveatConfigService.updateOrCreateCaveatConfig(file);
-
- setComplete();
- endTransaction();
- }
-
- protected void createUser(String userName)
- {
- if (! authenticationService.authenticationExists(userName))
- {
- authenticationService.createAuthentication(userName, "PWD".toCharArray());
- }
-
- if (! personService.personExists(userName))
- {
- PropertyMap ppOne = new PropertyMap(4);
- ppOne.put(ContentModel.PROP_USERNAME, userName);
- ppOne.put(ContentModel.PROP_FIRSTNAME, "firstName");
- ppOne.put(ContentModel.PROP_LASTNAME, "lastName");
- ppOne.put(ContentModel.PROP_EMAIL, "email@email.com");
- ppOne.put(ContentModel.PROP_JOBTITLE, "jobTitle");
-
- personService.createPerson(ppOne);
- }
- }
-
- protected void deleteUser(String userName)
- {
- if (personService.personExists(userName))
- {
- personService.deletePerson(userName);
- }
- }
-
- protected void createGroup(String groupShortName)
- {
- createGroup(null, groupShortName);
- }
-
- protected void createGroup(String parentGroupShortName, String groupShortName)
- {
- if (parentGroupShortName != null)
- {
- String parentGroupFullName = authorityService.getName(AuthorityType.GROUP, parentGroupShortName);
- if (!authorityService.authorityExists(parentGroupFullName))
- {
- authorityService.createAuthority(AuthorityType.GROUP, groupShortName, groupShortName, null);
- authorityService.addAuthority(parentGroupFullName, groupShortName);
- }
- }
- else
- {
- authorityService.createAuthority(AuthorityType.GROUP, groupShortName, groupShortName, null);
- }
- }
-
- protected void deleteGroup(String groupShortName)
- {
- String groupFullName = authorityService.getName(AuthorityType.GROUP, groupShortName);
- if (authorityService.authorityExists(groupFullName))
- {
- authorityService.deleteAuthority(groupFullName);
- }
- }
-
- protected void addToGroup(String authorityName, String groupShortName)
- {
- authorityService.addAuthority(authorityService.getName(AuthorityType.GROUP, groupShortName), authorityName);
- }
-
- protected void removeFromGroup(String authorityName, String groupShortName)
- {
- authorityService.removeAuthority(authorityService.getName(AuthorityType.GROUP, groupShortName), authorityName);
- }
-
-}
diff --git a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RecordsManagementSearchServiceImplTest.java b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RecordsManagementSearchServiceImplTest.java
index 42e2005b0b..a0c68e2a7a 100644
--- a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RecordsManagementSearchServiceImplTest.java
+++ b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RecordsManagementSearchServiceImplTest.java
@@ -35,8 +35,6 @@ import org.alfresco.module.org_alfresco_module_rm.search.RecordsManagementSearch
import org.alfresco.module.org_alfresco_module_rm.search.SavedSearchDetails;
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.util.Pair;
/**
* Search service implementation unit test.
@@ -45,22 +43,12 @@ import org.alfresco.util.Pair;
*/
public class RecordsManagementSearchServiceImplTest extends BaseRMTestCase
{
- @Override
- protected boolean isMultiHierarchyTest()
- {
- return true;
- }
-
private static final String SEARCH1 = "search1";
private static final String SEARCH2 = "search2";
private static final String SEARCH3 = "search3";
private static final String SEARCH4 = "search4";
private String user;
-
- private NodeRef folderLevelRecordFolder;
- private NodeRef recordLevelRecordFolder;
-
private int numberOfReports;
/**
@@ -89,58 +77,6 @@ public class RecordsManagementSearchServiceImplTest extends BaseRMTestCase
}, AuthenticationUtil.getSystemUserName());
}
- /**
- * @see org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase#setupMultiHierarchyTestData()
- */
- @Override
- protected void setupMultiHierarchyTestData()
- {
- super.setupMultiHierarchyTestData();
-
- doTestInTransaction(new Test()
- {
- @Override
- public Void run()
- {
- folderLevelRecordFolder = mhRecordFolder42;
- recordLevelRecordFolder = mhRecordFolder43;
-
- utils.createRecord(folderLevelRecordFolder, "recordOne.txt", null, "record one - folder level - elephant");
- utils.createRecord(folderLevelRecordFolder, "recordTwo.txt", null, "record two - folder level - snake");
- utils.createRecord(folderLevelRecordFolder, "recordThree.txt", null, "record three - folder level - monkey");
- utils.createRecord(recordLevelRecordFolder, "recordFour.txt", null, "record four - record level - elephant");
- utils.createRecord(recordLevelRecordFolder, "recordFive.txt", null, "record five - record level - snake");
- utils.createRecord(recordLevelRecordFolder, "recordSix.txt", null, "record six - record level - monkey");
-
- return null;
- }
- }, AuthenticationUtil.getSystemUserName());
- }
-
- public void testSearch()
- {
- // Full text search
- doTestInTransaction(new Test()
- {
- @Override
- public Void run()
- {
- String query = "keywords:\"elephant\"";
- RecordsManagementSearchParameters params = new RecordsManagementSearchParameters();
- params.setIncludeUndeclaredRecords(true);
- List> results = rmSearchService.search(siteId, query, params);
- assertNotNull(results);
- assertEquals(2, results.size());
-
- return null;
- }
- }, AuthenticationUtil.getSystemUserName());
-
- // Property search
-
- //
- }
-
public void testSaveSearch()
{
// Add some saved searches (as admin user)
diff --git a/rm-community/rm-community-repo/test/resources/alfresco/version.properties b/rm-community/rm-community-repo/test/resources/alfresco/version.properties
new file mode 100644
index 0000000000..06128c2e04
--- /dev/null
+++ b/rm-community/rm-community-repo/test/resources/alfresco/version.properties
@@ -0,0 +1,18 @@
+#
+# Alfresco version information
+#
+
+# Version label
+version.major=6
+version.minor=0
+version.revision=0
+version.label=
+
+# Edition label
+version.edition=Community
+
+# SCM Revision number
+version.scmrevision=@scm-path@-r@scm-revision@
+
+# Build number
+version.build=r@scm-revision@-b@build-number@
\ No newline at end of file
diff --git a/rm-community/rm-community-repo/test/resources/test-context.xml b/rm-community/rm-community-repo/test/resources/test-context.xml
index 58b4aa0fee..0e6459074d 100644
--- a/rm-community/rm-community-repo/test/resources/test-context.xml
+++ b/rm-community/rm-community-repo/test/resources/test-context.xml
@@ -1,7 +1,8 @@
-
-
-
+
@@ -115,15 +116,18 @@
-
-
-
-
-
-
-
-
- 0 30 3 * * ?
+
+
+
+
+
+
+
+ 0 30 3 * * ?
+
+
+
@@ -188,9 +192,9 @@
-
+
-
+
@@ -233,7 +237,7 @@
Search
- buildonly
+ ${index.subsystem.name}
diff --git a/rm-community/rm-community-repo/test/resources/test-job-context.xml b/rm-community/rm-community-repo/test/resources/test-job-context.xml
index ea535d5f17..2e93fcc1fb 100644
--- a/rm-community/rm-community-repo/test/resources/test-job-context.xml
+++ b/rm-community/rm-community-repo/test/resources/test-job-context.xml
@@ -1,17 +1,18 @@
-
+
-
-
-
-
-
-
-
-
-
-
- 0/30 * * * * ?
+
+
+
+
+
+
+
diff --git a/rm-community/rm-community-repo/test/resources/test-rm3314-context.xml b/rm-community/rm-community-repo/test/resources/test-rm3314-context.xml
index a01ac698f5..f425ebb658 100644
--- a/rm-community/rm-community-repo/test/resources/test-rm3314-context.xml
+++ b/rm-community/rm-community-repo/test/resources/test-rm3314-context.xml
@@ -1,7 +1,7 @@
-
-
-
-
+
diff --git a/rm-community/rm-community-repo/unit-test/java/org/alfresco/module/org_alfresco_module_rm/test/util/BaseYamlUnitTest.java b/rm-community/rm-community-repo/unit-test/java/org/alfresco/module/org_alfresco_module_rm/test/util/BaseYamlUnitTest.java
index c964765352..59f4c1a7b7 100644
--- a/rm-community/rm-community-repo/unit-test/java/org/alfresco/module/org_alfresco_module_rm/test/util/BaseYamlUnitTest.java
+++ b/rm-community/rm-community-repo/unit-test/java/org/alfresco/module/org_alfresco_module_rm/test/util/BaseYamlUnitTest.java
@@ -27,8 +27,8 @@
package org.alfresco.module.org_alfresco_module_rm.test.util;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -39,14 +39,15 @@ import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Collection;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
-import com.fasterxml.jackson.dataformat.yaml.snakeyaml.parser.ParserException;
import com.github.fge.jackson.JsonLoader;
import com.github.fge.jsonschema.core.exceptions.ProcessingException;
+import com.github.fge.jsonschema.core.report.ProcessingMessage;
import com.github.fge.jsonschema.core.report.ProcessingReport;
import com.github.fge.jsonschema.main.JsonSchema;
import com.github.fge.jsonschema.main.JsonSchemaFactory;
@@ -105,11 +106,11 @@ public class BaseYamlUnitTest
assertEquals("Failed to obtain Swagger version from yaml file " + yamlFilePath,
swagger.getSwagger(), OPEN_API_SPECIFICATION);
}
- catch (ParserException ex)
+ catch (ProcessingException ex)
{
// ensure the yaml filename is included in the message
- String context = String.format(yamlFilePath + ": %n" + ex.getContext());
- throw new ParserException(context, ex.getContextMark(), ex.getProblem(), ex.getProblemMark()) ;
+ String context = String.format(yamlFilePath + ": %n" + ex.getMessage());
+ throw new ProcessingException(context) ;
}
}
}
@@ -155,6 +156,15 @@ public class BaseYamlUnitTest
{
final JsonNode dataNode = JsonLoader.fromString(jsonData);
final ProcessingReport report = schema.validate(dataNode);
- return report.isSuccess();
+ boolean isOk = report.isSuccess();
+ if (!isOk)
+ {
+ Iterator messages = report.iterator();
+ if (messages.hasNext())
+ {
+ throw new ProcessingException(messages.next().toString());
+ }
+ }
+ return isOk;
}
}
diff --git a/rm-community/rm-community-rest-api-explorer/pom.xml b/rm-community/rm-community-rest-api-explorer/pom.xml
index bb55ff6dd1..3dad123d3c 100644
--- a/rm-community/rm-community-rest-api-explorer/pom.xml
+++ b/rm-community/rm-community-rest-api-explorer/pom.xml
@@ -7,11 +7,10 @@
org.alfresco
alfresco-rm-community
- 2.7.1-SNAPSHOT
+ 3.0.0-SNAPSHOT
- 5.2.0.1
1.8
1.8
UTF-8
@@ -70,7 +69,7 @@
org.alfresco
api-explorer
- ${alfresco.api.explorer.version}
+ ${api.explorer.version}
war
diff --git a/scripts/cleanImages.sh b/scripts/cleanImages.sh
new file mode 100644
index 0000000000..874723aa6f
--- /dev/null
+++ b/scripts/cleanImages.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -x
+
+echo $imagesToBeDeleted
+echo "List all images:"
+docker images -a
+
+docker_images_list=$(docker images | grep $imagesToBeDeleted | awk '{print $3}' | uniq)
+if [ "$docker_images_list" == "" ]; then
+ echo "No docker images on the agent"
+else
+ echo "Clearing images: $docker_images_list"
+ docker rmi -f $docker_images_list
+fi
diff --git a/scripts/startAlfresco.sh b/scripts/startAlfresco.sh
new file mode 100644
index 0000000000..85dc63a9ff
--- /dev/null
+++ b/scripts/startAlfresco.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+set -e # exit if commands fails
+set -x # trace what gets exe
+
+docker info
+docker-compose --version
+echo "Starting Alfresco with AGS amps applied in Docker container"
+docker-compose ps
+docker-compose up -d
+
+WAIT_INTERVAL=1
+COUNTER=0
+TIMEOUT=300
+t0=`date +%s`
+
+echo "Waiting for alfresco to start"
+until $(curl --output /dev/null --silent --head --fail http://localhost:8080/alfresco) || [ "$COUNTER" -eq "$TIMEOUT" ]; do
+ printf '.'
+ sleep $WAIT_INTERVAL
+ COUNTER=$(($COUNTER+$WAIT_INTERVAL))
+done
+
+if (("$COUNTER" < "$TIMEOUT")) ; then
+ t1=`date +%s`
+ delta=$((($t1 - $t0)/60))
+ echo "Alfresco Started in $delta minutes"
+else
+ echo "Waited $COUNTER seconds"
+ echo "Alfresco Could not start in time."
+ exit 1
+fi
\ No newline at end of file
diff --git a/scripts/stopDockerContainers.sh b/scripts/stopDockerContainers.sh
new file mode 100644
index 0000000000..bc5b56b2ff
--- /dev/null
+++ b/scripts/stopDockerContainers.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+set -e # exit if commands fails
+set -x # trace what gets exe
+
+docker-compose ps
+docker-compose kill
+docker-compose rm -fv
\ No newline at end of file