Skip to content

Repository files navigation

Alfresco System Messages

This module displays system-wide messages to all users — for example when the system is going down for maintenance.

Built on Alfresco SDK 4.16.0 and targets Alfresco Content Services 26.1.

This module is sponsored by Redpill Linpro AB — https://www.redpill-linpro.com.

Usage

Messages are managed from a tool in the Share admin console.

Add a message

They are then shown on every page, colour-coded by priority.

How its presented

Modules

Module Contents
alfresco-systemmessages-platform Content model, data list bootstrap, service and repository webscripts
alfresco-systemmessages-share Admin console tool, the notification banner and its web resources
alfresco-systemmessages-platform-docker Docker image for the repository, used by the local environment
alfresco-systemmessages-share-docker Docker image for Share, used by the local environment
alfresco-systemmessages-integration-tests Integration tests run against the running containers

Building

Build with JDK 21. Newer JDKs are not supported by ACS 26.

JAVA_HOME=/usr/lib/jvm/java-21-openjdk mvn clean package

Both modules produce JAR files. To produce AMPs instead, uncomment the maven-assembly-plugin block in the root pom.xml.

Local development environment

The SDK ships a Docker Compose environment covering ACS, Share, Search and PostgreSQL.

./run.sh build_start        # build and start everything
./run.sh start              # start without rebuilding
./run.sh stop               # stop the containers
./run.sh reload_share       # rebuild and redeploy the Share module only
./run.sh reload_acs         # rebuild and redeploy the platform module only
./run.sh tail               # follow the logs
./run.sh purge              # remove the volumes and start clean

Once started:

Installation

Deploy the two module JARs into an existing installation:

  • alfresco-systemmessages-platform/target/alfresco-systemmessages-platform-<version>.jar into the repository webapp's WEB-INF/lib
  • alfresco-systemmessages-share/target/alfresco-systemmessages-share-<version>.jar into the Share webapp's WEB-INF/lib

Restart the webserver afterwards. The platform module bootstraps a data list under Data Dictionary on first start, so the repository must come up before the admin console tool has anything to write to.

Or resolve them from the GitLab Package Registry (see Publishing for the settings.xml blocks):

<dependency>
  <groupId>com.redpill-linpro.alfresco</groupId>
  <artifactId>alfresco-systemmessages-platform</artifactId>
  <version>5.0.0</version>
</dependency>
<dependency>
  <groupId>com.redpill-linpro.alfresco</groupId>
  <artifactId>alfresco-systemmessages-share</artifactId>
  <version>5.0.0</version>
</dependency>

For Alfresco 5.1 and older (pre SDK 3) use the pre-2.0 AMP releases from the support/pre-5.x-support branch.

Publishing

Artifacts go to the GitLab Package Registry under the alfresco-dependency group. Two endpoints are involved and they are not interchangeable:

Endpoint Used for
Project /api/v4/projects/3927/packages/maven Publishing (mvn deploy)
Group /api/v4/groups/2746/-/packages/maven Resolving dependencies

The group endpoint aggregates every project below it, so a single repository entry in settings.xml covers all packages the group will ever hold. You publish into one project; everyone resolves from the group.

The GitLab project must exist first. alfresco-dependency/alfresco-systemmessages only hosts packages, so it needs no source. If you point this at another project, change gitlab.project in the root pom.xml to match.

First time setup. Create a Personal Access Token with scope api, then copy the blocks from settings.xml.example into your ~/.m2/settings.xml.

The scope must be api. write_repository covers git push over HTTPS, not the package registry, and read_api alone only reads — a token with those two resolves dependencies fine and then fails on deploy with insufficient_scope, which Maven reports as a bare 400 Bad Request with no explanation.

Do not use a group deploy token either — those return 404 against the group Maven endpoint, a known GitLab bug that presents as a missing artifact.

Publishing.

JAVA_HOME=/usr/lib/jvm/java-21-openjdk mvn deploy

The target project is set by gitlab.project in the root pom.xml. It must be the numeric project id, not the path: Maven's HTTP client decodes %2F back into a slash before sending, so a URL-encoded project path arrives as /projects/alfresco-dependency/alfresco-systemmessages/... and GitLab answers 400 Bad Request. The id is on the project's overview page.

GitLab uses the same URL for releases and snapshots — the version suffix decides which you get. Snapshots can be overwritten; releases cannot.

Note on browsing. Opening the Maven endpoint in a browser always returns 404 Not Found, even when packages exist. It is not an index — Maven appends the artifact path to it. To see what is actually published, use /api/v4/groups/2746/packages or the Packages page in the GitLab UI.

Languages

Locale Share UI Content model
English
Swedish
French
Danish

Bundles live in two places:

File Used by
alfresco-systemmessages-share/.../web-extension/messages/systemmessages*.properties The admin console tool and the notification banner
alfresco-systemmessages-platform/.../messages/systemmessages-model*.properties Content model type and property labels

systemmessages.properties is the default bundle Java falls back to when a user's locale has no translation; it must stay in sync with systemmessages_en.properties. Files are plain ASCII with \uXXXX escapes, which is what java.util.Properties expects.

License

This application is licensed under the LGPLv3 License. See the LICENSE file for details.

Authors

Erik Billerby — Redpill Linpro AB Magnus Pedersen — Redpill Linpro AB

About

No description, website, or topics provided.

Resources

Stars

9 stars

Watchers

25 watching

Forks

Releases

Packages

Used by

Contributors

Languages