mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
Compare commits
49 Commits
fix/checki
...
23.4.0.3
Author | SHA1 | Date | |
---|---|---|---|
|
9b8ae96c2e | ||
|
adb8913b56 | ||
|
02237bd280 | ||
|
78001ed22c | ||
|
a568aeda17 | ||
|
f890e9f995 | ||
|
0ddeac79bb | ||
|
67ca73820b | ||
|
1df8702e16 | ||
|
12c4481ac2 | ||
|
0f572ec21a | ||
|
9c121743d9 | ||
|
c754eaeb93 | ||
|
1f3e08f439 | ||
|
5efa236cfe | ||
|
df658371cd | ||
|
65f6d0ee45 | ||
|
275c42014e | ||
|
d0135e4b76 | ||
|
d405be6273 | ||
|
b7862932e6 | ||
|
970bca464f | ||
|
f76d43eced | ||
|
e07c452cf0 | ||
|
64899ca358 | ||
|
de498664b6 | ||
|
46031feb52 | ||
|
a93686acd5 | ||
|
aa86d07738 | ||
|
553a8aae1c | ||
|
f1bf73c269 | ||
|
64fa671f33 | ||
|
70c1da0213 | ||
|
283fffef00 | ||
|
e99e3d69ba | ||
|
f826b08b2b | ||
|
3bd57adeef | ||
|
a4f8b8d4b9 | ||
|
6363c9e17a | ||
|
b8a94ff310 | ||
|
fd9e279715 | ||
|
6210ca95f9 | ||
|
7edba79f69 | ||
|
1eb24d2d85 | ||
|
3305eb91e5 | ||
|
0994545c65 | ||
|
94377f1e30 | ||
|
9c9d3dbbd5 | ||
|
7b4c210773 |
75
README.md
75
README.md
@@ -2,38 +2,57 @@
|
||||
|
||||
[](https://github.com/Alfresco/alfresco-community-repo/actions/workflows/master_release.yml)
|
||||
|
||||
#### Alfresco Core
|
||||
## Table of Contents
|
||||
1. [Content](#content)
|
||||
2. [Artifacts](#artifacts)
|
||||
3. [Setup](#setting-up-and-building-your-development-environment)
|
||||
4. [Branches](#branches)
|
||||
5. [Contributing](#contributing-guide)
|
||||
6. [Helpful links](#helpful-links)
|
||||
|
||||
|
||||
## Content
|
||||
Alfresco Community Repository contains following libraries:
|
||||
|
||||
### Alfresco Core
|
||||
Core is a library packaged as a jar file which contains the following:
|
||||
|
||||
Alfresco Core is a library packaged as a jar file which contains the following:
|
||||
* Various helpers and utils
|
||||
* Canned queries interface and supporting classes
|
||||
* Generic encryption supporting classes
|
||||
|
||||
#### Alfresco Data Model
|
||||
Data model is a library packaged as a jar file which contains the following:
|
||||
### Alfresco Data Model
|
||||
|
||||
Data Model is a library packaged as a jar file which contains the following:
|
||||
|
||||
* Dictionary, Repository and Search Services interfaces
|
||||
* Models for data types and Dictionary implementation
|
||||
* Parsers
|
||||
|
||||
#### Alfresco Repository
|
||||
### Alfresco Repository
|
||||
|
||||
Repository is a library packaged as a jar file which contains the following:
|
||||
|
||||
* DAOs and SQL scripts
|
||||
* Various Service implementations
|
||||
* Utility classes
|
||||
|
||||
#### Alfresco Remote API
|
||||
### Alfresco Remote API
|
||||
|
||||
Remote API is a library packaged as a jar file which contains the following:
|
||||
|
||||
* REST API framework
|
||||
* WebScript implementations including [V1 REST APIs](https://hub.alfresco.com/t5/alfresco-content-services-blog/v1-rest-api-10-things-you-should-know/ba-p/287692)
|
||||
* [OpenCMIS](https://chemistry.apache.org/java/opencmis.html) implementations
|
||||
|
||||
#### Artifacts
|
||||
## Artifacts
|
||||
|
||||
The artifacts can be obtained by:
|
||||
* downloading from [Alfresco maven repository](https://artifacts.alfresco.com/nexus/content/groups/public)
|
||||
* downloading from [Alfresco maven repository](https://artifacts.alfresco.com/nexus/#browse/browse:public)
|
||||
* as Maven dependency by adding the dependency to your pom file:
|
||||
~~~
|
||||
|
||||
~~~xml
|
||||
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-core</artifactId>
|
||||
@@ -64,34 +83,46 @@ The artifacts can be obtained by:
|
||||
<version>version</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
|
||||
~~~
|
||||
|
||||
and Alfresco maven repository:
|
||||
~~~
|
||||
|
||||
~~~xml
|
||||
|
||||
<repository>
|
||||
<id>alfresco-maven-repo</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
|
||||
~~~
|
||||
|
||||
The SNAPSHOT versions of the artifact are not published.
|
||||
|
||||
## Setting up and building your development environment
|
||||
See the [Development Tomcat Environment](https://github.com/Alfresco/acs-community-packaging/tree/master/dev/README.md)
|
||||
page which will show you how to try out your repository changes in a local tomcat instance.
|
||||
If you wish to use Docker images, take a look at the aliases ending in `D` and the docker-compose files in this
|
||||
project's test modules.
|
||||
|
||||
See the [**Development Tomcat Environment**](https://github.com/Alfresco/acs-community-packaging/tree/master/dev/README.md)
|
||||
page which will show you how to try out your repository changes in a local Tomcat instance or using Docker containers.
|
||||
|
||||
## Branches
|
||||
This project has a branch for each ACS release. For example the code in ACS 6.2.1 is a
|
||||
branch called `releases/6.2.2`. In addition to the original 6.2.2 release it will also contain Hot Fixes
|
||||
added later. The latest unreleased code is on the `master` branch. There are also `.N` branches, such as
|
||||
`releases/7.1.N` on which we gather unreleased fixes for future service pack releases. They do not indicate
|
||||
|
||||
This project has a branch for each ACS release. For example the code in ACS 6.2.2 is a
|
||||
branch called **`release/6.2.2`**. In addition to the original 6.2.2 release it will also contain Hot Fixes
|
||||
added later. The latest unreleased code is on the **`master`** branch. There are also **`.N`** branches, such as
|
||||
**`release/7.1.N`** on which we gather unreleased fixes for future service pack releases. They do not indicate
|
||||
that one is planned.
|
||||
|
||||
For historic reasons the version of artifacts created on each branch do not match the ACS version.
|
||||
For example artifact in ACS 7.2.0 will be `14.<something>`.
|
||||
For example artifact in ACS 7.2.0 will be **`14.<something>`**.
|
||||
|
||||
The enterprise projects which extend the `alfresco-community-repo` use the same branch names and leading
|
||||
The enterprise projects which extend the **`alfresco-community-repo`** use the same branch names and leading
|
||||
artifact version number.
|
||||
|
||||
### Contributing guide
|
||||
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.
|
||||
## Contributing guide
|
||||
|
||||
Please use [**this guide**](CONTRIBUTING.md) to make a contribution to the project.
|
||||
|
||||
## Helpful links
|
||||
|
||||
- [Alfresco Content Services Documentation](https://docs.alfresco.com/content-services/latest/)
|
||||
- [Alfresco Platform](https://www.hyland.com/en/products/alfresco-platform)
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
# Version label
|
||||
version.major=23
|
||||
version.minor=3
|
||||
version.minor=4
|
||||
version.revision=0
|
||||
version.label=
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2023 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2024 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -67,4 +67,14 @@ public interface TransactionListener
|
||||
* be used only for cleaning up resources after a rollback has occurred.
|
||||
*/
|
||||
void afterRollback();
|
||||
|
||||
/**
|
||||
* Allows to provide a custom listener's order.
|
||||
* See {@link org.alfresco.repo.transaction.AlfrescoTransactionSupport#COMMIT_ORDER_NORMAL}
|
||||
* @return custom order or null for the default one
|
||||
*/
|
||||
default Integer getCustomOrder()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -9,6 +9,6 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
</project>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
# Fetch image based on Tomcat 9.0, Java 17 and Rocky Linux 8
|
||||
# More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat
|
||||
FROM alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux8-202306291245
|
||||
FROM alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux9@sha256:395664f9d9be0c9f73d3b722a58fd559ee7231609b263dfe19502617652740e3
|
||||
|
||||
# Set default docker_context.
|
||||
ARG resource_path=target
|
||||
@@ -14,6 +13,9 @@ ARG USERID=33000
|
||||
# Set default environment args
|
||||
ARG TOMCAT_DIR=/usr/local/tomcat
|
||||
|
||||
# Needed for installation but make sure another USER directive is added after
|
||||
# this with a non-root user
|
||||
USER root
|
||||
|
||||
# Create prerequisite to store tools and properties
|
||||
RUN mkdir -p ${TOMCAT_DIR}/shared/classes/alfresco/extension/mimetypes && \
|
||||
@@ -61,13 +63,7 @@ RUN sed -i -e "s_appender.rolling.fileName\=alfresco.log_appender.rolling.fileNa
|
||||
sed -i -e "\$a\grant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/alfresco\/-\" \{\n\ permission\ java.security.AllPermission\;\n\};\ngrant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/_vti_bin\/-\" \{\n\ permission\ java.security.AllPermission\;\n\};\ngrant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/ROOT\/-\" \{\n\ permission org.apache.catalina.security.DeployXmlPermission \"ROOT\";\n\};" ${TOMCAT_DIR}/conf/catalina.policy
|
||||
|
||||
# fontconfig is required by Activiti worflow diagram generator
|
||||
# installing pinned dependencies as well
|
||||
RUN yum install -y fontconfig-2.13.1-4.el8 \
|
||||
dejavu-fonts-common-2.35-7.el8 \
|
||||
fontpackages-filesystem-1.44-22.el8 \
|
||||
freetype-2.9.1-9.el8 \
|
||||
libpng-1.6.34-5.el8 \
|
||||
dejavu-sans-fonts-2.35-7.el8 && \
|
||||
RUN yum install -y fontconfig-2.14.0-2.el9_1 && \
|
||||
yum clean all
|
||||
|
||||
# The standard configuration is to have all Tomcat files owned by root with group GROUPNAME and whilst owner has read/write privileges,
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<organization>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
18
pom.xml
18
pom.xml
@@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Community Repo Parent</name>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<properties>
|
||||
<acs.version.major>23</acs.version.major>
|
||||
<acs.version.minor>3</acs.version.minor>
|
||||
<acs.version.minor>4</acs.version.minor>
|
||||
<acs.version.revision>0</acs.version.revision>
|
||||
<acs.version.label />
|
||||
<amp.min.version>${acs.version.major}.0.0</amp.min.version>
|
||||
@@ -51,8 +51,8 @@
|
||||
<dependency.alfresco-server-root.version>7.0.1</dependency.alfresco-server-root.version>
|
||||
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
|
||||
<dependency.activiti.version>5.23.0</dependency.activiti.version>
|
||||
<dependency.alfresco-transform-core.version>5.1.3</dependency.alfresco-transform-core.version>
|
||||
<dependency.alfresco-transform-service.version>4.1.3</dependency.alfresco-transform-service.version>
|
||||
<dependency.alfresco-transform-core.version>5.1.4</dependency.alfresco-transform-core.version>
|
||||
<dependency.alfresco-transform-service.version>4.1.4</dependency.alfresco-transform-service.version>
|
||||
<dependency.alfresco-greenmail.version>7.0</dependency.alfresco-greenmail.version>
|
||||
<dependency.acs-event-model.version>0.0.27</dependency.acs-event-model.version>
|
||||
|
||||
@@ -113,13 +113,13 @@
|
||||
<dependency.jakarta-json-path.version>2.9.0</dependency.jakarta-json-path.version>
|
||||
<dependency.json-smart.version>2.5.1</dependency.json-smart.version>
|
||||
<alfresco.googledrive.version>4.1.0</alfresco.googledrive.version>
|
||||
<alfresco.aos-module.version>3.1.0-A1</alfresco.aos-module.version>
|
||||
<alfresco.api-explorer.version>23.2.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
||||
<alfresco.aos-module.version>3.1.0</alfresco.aos-module.version>
|
||||
<alfresco.api-explorer.version>23.3.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
||||
|
||||
<alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version>
|
||||
<license-maven-plugin.version>2.0.1</license-maven-plugin.version>
|
||||
|
||||
<dependency.postgresql.version>42.6.0</dependency.postgresql.version>
|
||||
<dependency.postgresql.version>42.7.3</dependency.postgresql.version>
|
||||
<dependency.mysql.version>8.0.30</dependency.mysql.version>
|
||||
<dependency.mysql-image.version>8</dependency.mysql-image.version>
|
||||
<dependency.mariadb.version>2.7.4</dependency.mariadb.version>
|
||||
@@ -151,7 +151,7 @@
|
||||
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||
<tag>HEAD</tag>
|
||||
<tag>23.4.0.3</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
@@ -1004,7 +1004,7 @@
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.43.4</version>
|
||||
<version>0.45.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.3.0.87-SNAPSHOT</version>
|
||||
<version>23.4.0.3</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -157,9 +157,10 @@ public class DownloadStorage
|
||||
|
||||
if (log.isDebugEnabled())
|
||||
{
|
||||
String downloadNodeRefString = "Download-NodeRef=" + downloadNodeRef;
|
||||
StringBuilder msg = new StringBuilder();
|
||||
msg.append("Created Download. ")
|
||||
.append("', Download-NodeRef=");
|
||||
.append(downloadNodeRefString);
|
||||
log.debug(msg.toString());
|
||||
}
|
||||
return downloadNodeRef;
|
||||
@@ -221,6 +222,11 @@ public class DownloadStorage
|
||||
Long total = (Long)properties.get(DownloadModel.PROP_TOTAL);
|
||||
Long filesAdded = (Long)properties.get(DownloadModel.PROP_FILES_ADDED);
|
||||
Long totalFiles = (Long)properties.get(DownloadModel.PROP_TOTAL_FILES);
|
||||
|
||||
if (log.isDebugEnabled())
|
||||
{
|
||||
log.debug("Status for Download-NodeRef: "+downloadNodeRef+": done: "+done+", total: "+total+", filesAdded: "+filesAdded+", totalFiles: "+totalFiles);
|
||||
}
|
||||
|
||||
return new DownloadStatus(DownloadStatus.Status.valueOf((String)properties.get(DownloadModel.PROP_STATUS)),
|
||||
done != null ? done.longValue() : 0l,
|
||||
@@ -239,6 +245,10 @@ public class DownloadStorage
|
||||
|
||||
public void updateStatus(NodeRef nodeRef, DownloadStatus status)
|
||||
{
|
||||
if (log.isDebugEnabled())
|
||||
{
|
||||
log.debug("Updating status for Download-NodeRef: "+nodeRef+" to status: "+status.getStatus());
|
||||
}
|
||||
validateNode(nodeRef);
|
||||
|
||||
nodeService.setProperty(nodeRef, DownloadModel.PROP_STATUS, status.getStatus().toString());
|
||||
|
@@ -174,6 +174,10 @@ public class ZipDownloadExporter extends BaseExporter
|
||||
|
||||
try
|
||||
{
|
||||
if (log.isDebugEnabled())
|
||||
{
|
||||
log.debug("Archiving content for nodeRef: "+nodeRef+" with contentURL: "+contentData.getContentUrl());
|
||||
}
|
||||
// ALF-2016
|
||||
ZipArchiveEntry zipEntry=new ZipArchiveEntry(getPath());
|
||||
zipEntry.setTime(zipTimestampCreated.getTime());
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2024 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -166,6 +166,11 @@ public class EventGenerator extends AbstractLifecycleBean implements Initializin
|
||||
setAssociationBehaviour(BeforeDeleteAssociationPolicy.QNAME, "beforeDeleteAssociation");
|
||||
}
|
||||
|
||||
private boolean isSendingEventBeforeCommitRequired()
|
||||
{
|
||||
return eventSender.shouldParticipateInTransaction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable Events2 generated events
|
||||
*/
|
||||
@@ -546,23 +551,40 @@ public class EventGenerator extends AbstractLifecycleBean implements Initializin
|
||||
|
||||
protected class EventTransactionListener extends TransactionListenerAdapter
|
||||
{
|
||||
@Override
|
||||
public void beforeCommit(boolean readOnly)
|
||||
{
|
||||
if (isSendingEventBeforeCommitRequired())
|
||||
{
|
||||
sendAllEvents();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterCommit()
|
||||
{
|
||||
if (isTransactionCommitted())
|
||||
if (!isSendingEventBeforeCommitRequired())
|
||||
{
|
||||
try
|
||||
{
|
||||
sendEvents();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Must consume the exception to protect other TransactionListeners
|
||||
LOGGER.error("Unexpected error while sending repository events", e);
|
||||
}
|
||||
sendAllEvents();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCustomOrder()
|
||||
{
|
||||
return isSendingEventBeforeCommitRequired() ? getBeforeCommitOrder() : getAfterCommitOrder();
|
||||
}
|
||||
|
||||
protected Integer getBeforeCommitOrder()
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
protected Integer getAfterCommitOrder()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if a node transaction is not only active, but also committed with modifications.
|
||||
* This means that a {@link TransactionEntity} object was created.
|
||||
@@ -572,6 +594,21 @@ public class EventGenerator extends AbstractLifecycleBean implements Initializin
|
||||
return nodeDAO.getCurrentTransactionCommitTime() != null;
|
||||
}
|
||||
|
||||
protected void sendAllEvents()
|
||||
{
|
||||
if (isTransactionCommitted())
|
||||
{
|
||||
try
|
||||
{
|
||||
sendEvents();
|
||||
} catch (Exception e)
|
||||
{
|
||||
// Must consume the exception to protect other TransactionListeners
|
||||
LOGGER.error("Unexpected error while sending repository events", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendEvents()
|
||||
{
|
||||
final Consolidators consolidators = getTxnConsolidators(this);
|
||||
@@ -623,10 +660,17 @@ public class EventGenerator extends AbstractLifecycleBean implements Initializin
|
||||
final REF entityReference, final CON eventConsolidator, final TriPredicate<REF, CON, EventInfo> entityToEventEligibilityVerifier)
|
||||
{
|
||||
final EventInfo eventInfo = getEventInfo(AuthenticationUtil.getFullyAuthenticatedUser());
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction((RetryingTransactionCallback<Void>) () -> {
|
||||
if (isSendingEventBeforeCommitRequired())
|
||||
{
|
||||
eventSender.accept(() -> createEvent(entityReference, eventConsolidator, eventInfo, entityToEventEligibilityVerifier));
|
||||
return null;
|
||||
}, true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction((RetryingTransactionCallback<Void>) () -> {
|
||||
eventSender.accept(() -> createEvent(entityReference, eventConsolidator, eventInfo, entityToEventEligibilityVerifier));
|
||||
return null;
|
||||
}, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -49,4 +49,9 @@ public interface EventSender
|
||||
{
|
||||
//no initialization by default
|
||||
}
|
||||
|
||||
default boolean shouldParticipateInTransaction()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2024 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.repo.rendition2.script;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.repo.jscript.BaseScopableProcessorExtension;
|
||||
import org.alfresco.repo.jscript.ScriptNode;
|
||||
import org.alfresco.repo.rendition2.RenditionService2;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* The {@code ScriptRenditionService2} class provides a scripting interface for working with Rendition Service 2.
|
||||
* It allows rendering source nodes with specified rendition definitions and retrieving renditions associated with a node.
|
||||
*/
|
||||
@SuppressWarnings({"PMD.ProperLogger", "PMD.FieldNamingConventions"})
|
||||
public class ScriptRenditionService2 extends BaseScopableProcessorExtension
|
||||
{
|
||||
private static final Log logger = LogFactory.getLog(ScriptRenditionService2.class);
|
||||
|
||||
private ServiceRegistry serviceRegistry;
|
||||
private RenditionService2 renditionService;
|
||||
|
||||
/**
|
||||
* Sets the {@link ServiceRegistry} to be used by this script object.
|
||||
*
|
||||
* @param serviceRegistry The ServiceRegistry to be set.
|
||||
*/
|
||||
public void setServiceRegistry(ServiceRegistry serviceRegistry)
|
||||
{
|
||||
this.serviceRegistry = serviceRegistry;
|
||||
this.renditionService = serviceRegistry.getRenditionService2();
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the specified source node with the given rendition definition.
|
||||
* Since renditionService2 is designed to asynchronous, no result is returned.
|
||||
*
|
||||
* @param sourceNode The source node to be rendered.
|
||||
* @param renditionName The name of the rendition definition, like "pdf".
|
||||
*/
|
||||
public void render(ScriptNode sourceNode, String renditionName)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
String msg = "Rendering source node '" +
|
||||
sourceNode +
|
||||
"' with renditionDef '" + renditionName +
|
||||
"'";
|
||||
logger.debug(msg);
|
||||
}
|
||||
this.renditionService.render(sourceNode.getNodeRef(), renditionName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves an array of {@link ScriptNode} objects representing renditions associated with the specified node.
|
||||
*
|
||||
* @param node The node for which to retrieve renditions.
|
||||
* @return An array of {@code ScriptNode} objects representing renditions.
|
||||
*/
|
||||
public ScriptNode[] getRenditions(ScriptNode node)
|
||||
{
|
||||
List<ChildAssociationRef> renditions = this.renditionService.getRenditions(node.getNodeRef());
|
||||
|
||||
ScriptNode[] renditionObjs = new ScriptNode[renditions.size()];
|
||||
for (int i = 0; i < renditions.size(); i++)
|
||||
{
|
||||
renditionObjs[i] = new ScriptNode(renditions.get(i).getChildRef(), serviceRegistry);
|
||||
}
|
||||
|
||||
return renditionObjs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a {@link ScriptNode} object representing the rendition with the specified name associated with the given node.
|
||||
*
|
||||
* @param node The node for which to retrieve the rendition.
|
||||
* @param renditionName The name of the rendition.
|
||||
* @return A {@code ScriptNode} object representing the specified rendition, or {@code null} if not found.
|
||||
*/
|
||||
public ScriptNode getRenditionByName(ScriptNode node, String renditionName)
|
||||
{
|
||||
ChildAssociationRef result = this.renditionService.getRenditionByName(node.getNodeRef(), renditionName);
|
||||
return result == null ? null : new ScriptNode(result.getChildRef(), serviceRegistry);
|
||||
}
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2024 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -253,6 +253,10 @@ public abstract class AlfrescoTransactionSupport extends TransactionSupportUtil
|
||||
{
|
||||
bound = bindListener(listener, COMMIT_ORDER_CACHE);
|
||||
}
|
||||
else if (listener.getCustomOrder() != null)
|
||||
{
|
||||
bound = bindListener(listener, listener.getCustomOrder());
|
||||
}
|
||||
else
|
||||
{
|
||||
bound = bindListener(listener, COMMIT_ORDER_NORMAL);
|
||||
|
@@ -176,4 +176,11 @@
|
||||
|
||||
<!-- The definitions are read from json files (possibly added to a volume via k8 ConfigMaps) -->
|
||||
|
||||
</beans>
|
||||
<!-- JavaScript API support -->
|
||||
<bean id="renditionService2Script"
|
||||
class="org.alfresco.repo.rendition2.script.ScriptRenditionService2"
|
||||
parent="baseJavaScriptExtension">
|
||||
<property name="extensionName" value="renditionService2" />
|
||||
<property name="serviceRegistry" ref="ServiceRegistry" />
|
||||
</bean>
|
||||
</beans>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
repository.name=Main Repository
|
||||
|
||||
# Schema number
|
||||
version.schema=19200
|
||||
version.schema=19300
|
||||
|
||||
# Directory configuration
|
||||
|
||||
|
Reference in New Issue
Block a user