Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #13791 #1297

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Feature #13791 #1297

wants to merge 2 commits into from

Conversation

mmoqui
Copy link
Member

@mmoqui mmoqui commented Oct 23, 2023

Done Work

Fix a bug with the Silverpeas server URL for each user domain. It is now correctly set by default from the httpServerBase URL.

Silverpeas uses now StringTemplate 4. With this new version of StringTemplate, a new way to define a template is now supported: the template descriptor. A template descriptor is a template definition in a file that satisfies the following schema:

<template_name>(<template_arguments>) ::= <% <template_body> %> | << <template_body> >> 

with <template_arguments> being a comma-list of attributes passed to the template. All the attributes set to a StringTemplate instance have to be declared here, even those not used in the template body. The advantage of the template descriptor is that it allows to write indented template code by surrounding the code with the following special tokens <% and %>.
For more information about the schema, please see the StringTemplate 4 documentation or the Javadoc of SilverpeasStringTemplate. The previous syntax of StringTemplate is supported as default syntax. The existing template files are taken as a raw template in a file by StringTemplate 4. There is no change otherwise the following one: indented template code isn't supported as such; each space, each tabulation, each line-feed, etc. are taken as such when rendering the text from the raw template. This require to adapt existing templates in customer dedicated projects.

Related PRs

The following PRs require to be treated before this one:

The following PRs require to be treated after this one:

@sonarcloud
Copy link

sonarcloud bot commented Oct 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.19) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@mmoqui mmoqui force-pushed the feature-13791 branch 3 times, most recently from 5b2a1ce to 7ebef4c Compare December 7, 2023 13:28
Copy link

sonarcloud bot commented Dec 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.19) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@mmoqui mmoqui force-pushed the feature-13791 branch 2 times, most recently from 2697d48 to 1602c32 Compare March 7, 2024 14:28
Fix a bug with the Silverpeas server URL for each user domain. It is now
correctly set by default from the httpServerBase URL.

Silverpeas uses now StringTemplate 4. With this new version of
StringTemplate, a new way to define a template is now supported: the
template descriptor. A template descriptor is a template definition in a
file that satisfies the following schema:
<template name>(<template arguments>) ::= <template body>
with template arguments being a comma-list of attributes passed to the
template. All the attributes set to a StringTemplate instance have to be
declared here, even thoses not used in the template body. The advantage
of the template descriptor is that it allows to write idented templating
code.
For more information about the schema, please see the StringTemplate 4
documentation or the Javadoc of SilverpeasStringTemplate.
The previous syntax of StringTemplate is supported as default syntax.
The existing template files are taken as a raw template in a file by
StringTemplate 4. There no change otherwise the following one:
idented templating code isn't supported as such; each space, each
tabulation, each line-feed, etc. are taken as such when rendering the
text from the raw template. This require to adapt existing templates in
customer dedicated projects.
A light improvment in the message building within the Notification API.
From now on, the modification of the message by the Notification API for
HTML rendering is removed as it's not the goal of this API to decide how
the text has to be rendered at the place of the templating; the layout
and the way the message is rendered is the goal of the templates used to
build any messages to send.

In the unit tests on the user notification API, replace the use of the
FieldMocker by NotificationSettingsMocker to mock the SettingsBundle
class instances of the NotificationManagerSettings static class.
Copy link

sonarcloud bot commented Apr 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant