diff --git a/README.txt b/README.txt
index 9d1bfe30c3..1d260c7466 100644
--- a/README.txt
+++ b/README.txt
@@ -32,6 +32,13 @@ Configuring a different DB other than H2 (e.g. MySQL or PostgreSQL):
mvn clean install -Pstart-repo,use-mysql
+Technical documentation:
+------------------------
+
+Technical documentation is available at rm-community/documentation/README.md and rm-enterprise/documentation/README.md.
+This should be particularly useful for anyone wanting to integrate with or extend RM.
+
+
Running integration test:
-------------------------
@@ -145,4 +152,4 @@ Currently it's 1.0.0 (alfresco-search-services-1.0.0.zip)
Unzip it and change to the "solr" folder within it. Start the Solr server using the following command:
solr start -a "-Dcreate.alfresco.defaults=alfresco,archive"
-Start your repository
\ No newline at end of file
+Start your repository
diff --git a/pom.xml b/pom.xml
index ac30530b79..ef944bbd72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.alfrescoalfresco-rmpom
- 2.6-SNAPSHOT
+ 2.7-SNAPSHOTAlfresco Records Management
diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml
index d98b337c2a..9104de22fb 100644
--- a/rm-automation/pom.xml
+++ b/rm-automation/pom.xml
@@ -8,7 +8,7 @@
org.alfrescoalfresco-rm
- 2.6-SNAPSHOT
+ 2.7-SNAPSHOT
diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml
index a3a94a7b55..65d2d48dcd 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.alfrescoalfresco-rm-automation
- 2.6-SNAPSHOT
+ 2.7-SNAPSHOT
diff --git a/rm-community/documentation/README.md b/rm-community/documentation/README.md
new file mode 100644
index 0000000000..2ad570b4f3
--- /dev/null
+++ b/rm-community/documentation/README.md
@@ -0,0 +1,4 @@
+## Community Technical Documentation Index
+
+* [Enterprise Technical Documentation](../../rm-enterprise/documentation/README.md) (the link will only work if this repository contains the enterprise code)
+* [Overview of the design of RM](overview.md)
diff --git a/rm-community/documentation/overview.md b/rm-community/documentation/overview.md
new file mode 100644
index 0000000000..ed79baa2d3
--- /dev/null
+++ b/rm-community/documentation/overview.md
@@ -0,0 +1,72 @@
+## Records Management Technical Overview
+
+
+
+
+
+### Purpose
+The Alfresco Records Management (RM) modules are installed on top of Alfresco Content Services and use a similar REST API and service architecture. This document provides an overview of the standard patterns that have been used throughout the RM modules.
+
+***
+
+### Overview
+RM is split into two main parts - a repository integration and a Share integration. The Share module communicates with the repository module using REST API calls. The repository module includes integration with the Alfresco database.
+
+***
+
+### Artifacts and Guidance
+
+* [Community Source Code](https://github.com/Alfresco/records-management)
+* [Enterprise Source Code](https://gitlab.alfresco.com/records-management/records-management) (for partners and customers)
+* [Community License](../LICENSE.txt)
+* [Enterprise License](../../rm-enterprise/LICENSE.txt) (this file will only be present in clones of the Enterprise repository)
+* [Issue Tracker Link](https://issues.alfresco.com/jira/projects/RM)
+* [Community Documentation Link](http://docs.alfresco.com/rm-community/concepts/welcome-rm.html)
+* [Enterprise Documentation Link](http://docs.alfresco.com/rm/concepts/welcome-rm.html)
+* [Contribution Model](../../CONTRIBUTING.md)
+
+***
+
+### Prerequisite Knowledge
+An understanding of Alfresco Content Services is assumed. The following pages from the [developer documentation](http://docs.alfresco.com/5.2/concepts/dev-for-developers.html) give useful background information:
+
+* [ACS Architecture](http://docs.alfresco.com/5.2/concepts/dev-arch-overview.html)
+* [Platform Extensions](http://docs.alfresco.com/5.2/concepts/dev-platform-extensions.html)
+* [Share Extensions](http://docs.alfresco.com/5.2/concepts/dev-extensions-share.html)
+
+***
+
+### APIs and Interfaces
+The RM Share module communicates with the repository module via REST APIs. Internally the RM repository module uses a three layer model:
+
+* A REST API layer responsible for converting API requests into service calls.
+* A Java service layer responsible for handling business logic.
+* A DAO layer responsible for CRUD operations against the database.
+
+#### REST API
+The REST API endpoints fall into two main types - v0 (Webscripts) and v1. The [v0 API](http://docs.alfresco.com/5.2/references/dev-extension-points-webscripts.html) is older and not recommended for integrations. The [v1 API](http://docs.alfresco.com/5.1/pra/1/topics/pra-welcome-aara.html) is newer but isn't yet feature complete. If you are running RM locally then the GS API Explorer will be available at [this link](http://localhost:8080/gs-api-explorer/).
+
+Internally the GS v1 REST API is built on the [Alfresco v1 REST API framework](https://community.alfresco.com/community/ecm/blog/2016/10/11/v1-rest-api-part-1-introduction). It aims to be consistent with this in terms of behaviour and naming.
+
+#### Java Public API
+The Java service layer is fronted by a [Java Public API](http://docs.alfresco.com/5.2/concepts/java-public-api-list.html), which we will ensure backward compatible with previous releases. Before we remove any methods there will first be a release containing that method deprecated to allow third party integrations to migrate to a new method. The Java Public API also includes a set of POJO objects which are needed to communicate with the services. It is easy to identify classes that are part of the Java Public API as they are annotated `@AlfrescoPublicApi`.
+
+Each Java service will have at least four beans defined for it:
+
+* A 'lowerCase' inner bean, which is the actual service implementation.
+* An 'UpperCase' wrapper bean, which includes security and transaction management. This is the bean that should be used by third party integrations.
+* A bean to handle transactions on the service methods.
+* A bean to handle security restricting who can call different service methods.
+
+#### DAOs
+The DAOs are not part of the Java Public API, but handle CRUD operations against RM stored data. We have some custom queries to improve performance for particularly heavy operations.
+
+We use standard Alfresco [data modelling](http://docs.alfresco.com/5.2/references/dev-extension-points-content-model.html) to store RM metadata. We extend the [Alfresco patching mechanism](http://docs.alfresco.com/5.2/references/dev-extension-points-patch.html) to provide community and enterprise schema upgrades.
+
+***
+
+### Design Decisions
+
+| Decision | Rationale | Date |
+| --------------- |:--------------------------:| ------------:|
+| | | |
diff --git a/rm-community/pom.xml b/rm-community/pom.xml
index 8e9816ba62..d6952c6f7c 100644
--- a/rm-community/pom.xml
+++ b/rm-community/pom.xml
@@ -8,7 +8,7 @@
org.alfrescoalfresco-rm
- 2.6-SNAPSHOT
+ 2.7-SNAPSHOT
diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml
index 4a59bbbdb7..92ddc05f89 100644
--- a/rm-community/rm-community-repo/pom.xml
+++ b/rm-community/rm-community-repo/pom.xml
@@ -9,7 +9,7 @@
org.alfrescoalfresco-rm-community
- 2.6-SNAPSHOT
+ 2.7-SNAPSHOT
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java
index 63ca73867d..17c3b42ae7 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java
@@ -370,13 +370,13 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
*/
private String getDisplayPath(final NodeRef nodeRef)
{
- return AuthenticationUtil.runAs(new RunAsWork()
+ return AuthenticationUtil.runAsSystem(new RunAsWork()
{
public String doWork() throws Exception
{
return PathUtil.getDisplayPath(nodeService.getPath(nodeRef), true);
}
- }, AuthenticationUtil.getAdminUserName());
+ });
}
/**
diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/RecordAspect.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/RecordAspect.java
index b464dfd9d3..01544a50e8 100644
--- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/RecordAspect.java
+++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/RecordAspect.java
@@ -283,7 +283,7 @@ public class RecordAspect extends AbstractDisposableItem
isFilePlanComponent(oldChildAssocRef.getParentRef()))
{
final NodeRef record = newChildAssocRef.getChildRef();
- authenticationUtil.runAs(new RunAsWork