From 44286f5b942b37ba14c23016b67a71b2132e46ff Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 17 Oct 2023 16:59:00 +0200 Subject: [PATCH] Add static fields for constant values --- .../flightlog/dao/ClubDatabaseDaoStub.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/external-system-connector/src/main/java/eu/profinit/education/flightlog/dao/ClubDatabaseDaoStub.java b/external-system-connector/src/main/java/eu/profinit/education/flightlog/dao/ClubDatabaseDaoStub.java index 7c7d18b..01fd512 100644 --- a/external-system-connector/src/main/java/eu/profinit/education/flightlog/dao/ClubDatabaseDaoStub.java +++ b/external-system-connector/src/main/java/eu/profinit/education/flightlog/dao/ClubDatabaseDaoStub.java @@ -9,15 +9,18 @@ import java.util.List; @Component @Profile("stub") public class ClubDatabaseDaoStub implements ClubDatabaseDao { + public static final String PILOT_ROLE = "PILOT"; + public static final String BACKOFFICE_ROLE = "BACKOFFICE"; + @Override public List getUsers() { return Arrays.asList( - new User(1L, "Kamila", "Spoustová", Arrays.asList("PILOT")), - new User(2L, "Naděžda", "Pavelková", Arrays.asList("PILOT")), - new User(3L, "Silvie", "Hronová", Arrays.asList("PILOT")), - new User(9L, "Miloš", "Korbel", Arrays.asList("PILOT", "BACKOFFICE")), - new User(10L, "Petr", "Hrubec", Arrays.asList("PILOT", "BACKOFFICE")), - new User(13L, "Michal", "Vyvlečka", Arrays.asList("BACKOFFICE")) + new User(1L, "Kamila", "Spoustová", Arrays.asList(PILOT_ROLE)), + new User(2L, "Naděžda", "Pavelková", Arrays.asList(PILOT_ROLE)), + new User(3L, "Silvie", "Hronová", Arrays.asList(PILOT_ROLE)), + new User(9L, "Miloš", "Korbel", Arrays.asList(PILOT_ROLE, BACKOFFICE_ROLE)), + new User(10L, "Petr", "Hrubec", Arrays.asList(PILOT_ROLE, BACKOFFICE_ROLE)), + new User(13L, "Michal", "Vyvlečka", Arrays.asList(BACKOFFICE_ROLE)) ); } }