Compare commits

..

6 Commits

Author SHA1 Message Date
Namu
772c5d8452 Fix: Remove sonar job as java version is not compatible with sonarqube (I hate java) 2025-10-06 11:56:48 +02:00
Namu
d38a67e4f6 Fix: try fix the sonar job with java
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after 16s
2025-10-06 11:55:05 +02:00
Namu
501467b7d7 Fix: try fix the sonar job with java
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after 1m3s
2025-10-06 11:44:15 +02:00
Namu
addedcab4d Refactor: Remove non-relevant modificators on transformContent
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after 19s
2025-10-06 11:40:58 +02:00
Namu
5b1619f34e Refactor: Make NotificationDecoration an Interface
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after 18s
2025-10-06 11:37:56 +02:00
Namu
b841c81599 Fix: add missing methods in decorator
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after 19s
2025-10-06 11:31:32 +02:00
5 changed files with 17 additions and 36 deletions

View File

@@ -1,32 +0,0 @@
name: SonarQube Scan
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
sonarqube:
name: SonarQube Trigger
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download SonarQube Scanner
run: |
curl -sSLo sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip
unzip sonar-scanner.zip
- name: Run SonarQube Scan
run: |
./sonar-scanner-*/bin/sonar-scanner \
-Dsonar.projectKey=tp1-iaavancee \
-Dsonar.sources=. \
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} \
-Dsonar.login=${{ secrets.SONARQUBE_TOKEN }}

View File

@@ -1,6 +1,7 @@
package decorator;
import entities.Notification;
import notificationsDecorations.NotificationDecoration;
public abstract class BaseDecorator {
protected Notification notification;
@@ -9,5 +10,17 @@ public abstract class BaseDecorator {
this.notification = notification;
}
public void transitionState() {
notification.transitionState();
}
public void setKoState() {
notification.setKoState();
}
public void addDecoration(NotificationDecoration decoration) {
notification.addDecoration(decoration);
}
public abstract String getContent();
}

View File

@@ -2,7 +2,7 @@ package notificationsDecorations;
import java.util.Date;
public class DateNotificationDecoration extends NotificationDecoration {
public class DateNotificationDecoration implements NotificationDecoration {
private final Date date;
public DateNotificationDecoration(Date date) {

View File

@@ -1,9 +1,9 @@
package notificationsDecorations;
public abstract class NotificationDecoration {
public interface NotificationDecoration {
/**
* Each decoration apply a transformation on the content of the Notifications
* @return the content transformed
*/
public abstract String transformContent(String content);
String transformContent(String content);
}

View File

@@ -1,6 +1,6 @@
package notificationsDecorations;
public class WatermarkNotificationDecoration extends NotificationDecoration {
public class WatermarkNotificationDecoration implements NotificationDecoration {
private final String waterMark;
public WatermarkNotificationDecoration(String waterMark) {