Compare commits
6 Commits
ca88a009a0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
772c5d8452 | ||
|
|
d38a67e4f6 | ||
|
|
501467b7d7 | ||
|
|
addedcab4d | ||
|
|
5b1619f34e | ||
|
|
b841c81599 |
@@ -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 }}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package notificationsDecorations;
|
||||
|
||||
public class WatermarkNotificationDecoration extends NotificationDecoration {
|
||||
public class WatermarkNotificationDecoration implements NotificationDecoration {
|
||||
private final String waterMark;
|
||||
|
||||
public WatermarkNotificationDecoration(String waterMark) {
|
||||
|
||||
Reference in New Issue
Block a user