mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge master into RefactorSecurityMark.
This commit is contained in:
@@ -32,6 +32,13 @@ Configuring a different DB other than H2 (e.g. MySQL or PostgreSQL):
|
|||||||
mvn clean install -Pstart-repo,use-mysql
|
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:
|
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:
|
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"
|
solr start -a "-Dcreate.alfresco.defaults=alfresco,archive"
|
||||||
|
|
||||||
Start your repository
|
Start your repository
|
||||||
|
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm</artifactId>
|
<artifactId>alfresco-rm</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.6-SNAPSHOT</version>
|
<version>2.7-SNAPSHOT</version>
|
||||||
<name>Alfresco Records Management</name>
|
<name>Alfresco Records Management</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm</artifactId>
|
<artifactId>alfresco-rm</artifactId>
|
||||||
<version>2.6-SNAPSHOT</version>
|
<version>2.7-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-automation</artifactId>
|
<artifactId>alfresco-rm-automation</artifactId>
|
||||||
<version>2.6-SNAPSHOT</version>
|
<version>2.7-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
4
rm-community/documentation/README.md
Normal file
4
rm-community/documentation/README.md
Normal file
@@ -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)
|
72
rm-community/documentation/overview.md
Normal file
72
rm-community/documentation/overview.md
Normal file
@@ -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 |
|
||||||
|
| --------------- |:--------------------------:| ------------:|
|
||||||
|
| | | |
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm</artifactId>
|
<artifactId>alfresco-rm</artifactId>
|
||||||
<version>2.6-SNAPSHOT</version>
|
<version>2.7-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-community</artifactId>
|
<artifactId>alfresco-rm-community</artifactId>
|
||||||
<version>2.6-SNAPSHOT</version>
|
<version>2.7-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -370,13 +370,13 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
|||||||
*/
|
*/
|
||||||
private String getDisplayPath(final NodeRef nodeRef)
|
private String getDisplayPath(final NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
return AuthenticationUtil.runAs(new RunAsWork<String>()
|
return AuthenticationUtil.runAsSystem(new RunAsWork<String>()
|
||||||
{
|
{
|
||||||
public String doWork() throws Exception
|
public String doWork() throws Exception
|
||||||
{
|
{
|
||||||
return PathUtil.getDisplayPath(nodeService.getPath(nodeRef), true);
|
return PathUtil.getDisplayPath(nodeService.getPath(nodeRef), true);
|
||||||
}
|
}
|
||||||
}, AuthenticationUtil.getAdminUserName());
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -283,7 +283,7 @@ public class RecordAspect extends AbstractDisposableItem
|
|||||||
isFilePlanComponent(oldChildAssocRef.getParentRef()))
|
isFilePlanComponent(oldChildAssocRef.getParentRef()))
|
||||||
{
|
{
|
||||||
final NodeRef record = newChildAssocRef.getChildRef();
|
final NodeRef record = newChildAssocRef.getChildRef();
|
||||||
authenticationUtil.runAs(new RunAsWork<Object>()
|
authenticationUtil.runAsSystem(new RunAsWork<Object>()
|
||||||
{
|
{
|
||||||
public Object doWork()
|
public Object doWork()
|
||||||
{
|
{
|
||||||
@@ -299,7 +299,7 @@ public class RecordAspect extends AbstractDisposableItem
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, authenticationUtil.getAdminUserName());
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-community</artifactId>
|
<artifactId>alfresco-rm-community</artifactId>
|
||||||
<version>2.6-SNAPSHOT</version>
|
<version>2.7-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
Reference in New Issue
Block a user