From 7c974370593d15366068b7171f53997a31d6ecc9 Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Fri, 20 Dec 2024 11:28:29 +0100 Subject: [PATCH] apply formatter --- .../okr/dto/keyresult/KeyResultMetricDto.java | 4 +- .../dto/keyresult/KeyResultOrdinalDto.java | 4 +- .../exception/OkrResponseStatusException.java | 4 +- .../java/ch/puzzle/okr/models/Action.java | 52 ++++++++--- .../java/ch/puzzle/okr/models/Completed.java | 24 +++-- .../java/ch/puzzle/okr/models/Objective.java | 88 ++++++++++++++----- .../java/ch/puzzle/okr/models/Quarter.java | 28 ++++-- .../main/java/ch/puzzle/okr/models/Team.java | 32 +++++-- .../main/java/ch/puzzle/okr/models/User.java | 48 +++++++--- .../java/ch/puzzle/okr/models/UserTeam.java | 40 ++++++--- .../okr/models/alignment/Alignment.java | 16 +++- .../models/alignment/AlignmentSelection.java | 20 +++-- .../alignment/AlignmentSelectionId.java | 8 +- .../models/alignment/KeyResultAlignment.java | 8 +- .../models/alignment/ObjectiveAlignment.java | 8 +- .../ch/puzzle/okr/models/checkin/CheckIn.java | 76 ++++++++++++---- .../okr/models/checkin/CheckInMetric.java | 8 +- .../okr/models/checkin/CheckInOrdinal.java | 8 +- .../okr/models/keyresult/KeyResult.java | 80 ++++++++++++----- .../okr/models/keyresult/KeyResultMetric.java | 24 +++-- .../models/keyresult/KeyResultOrdinal.java | 24 +++-- .../puzzle/okr/models/overview/Overview.java | 88 ++++++++++++++----- .../okr/models/overview/OverviewId.java | 16 +++- .../okr/multitenancy/HibernateContext.java | 4 +- .../SchemaMultiTenantConnectionProvider.java | 8 +- .../multitenancy/TenantConfigProvider.java | 4 +- .../AuthorizationServiceBase.java | 8 +- .../business/QuarterBusinessService.java | 8 +- .../service/business/UserBusinessService.java | 4 +- .../persistence/ActionPersistenceService.java | 4 +- .../AlignmentPersistenceService.java | 4 +- .../CheckInPersistenceService.java | 4 +- .../CompletedPersistenceService.java | 4 +- .../KeyResultPersistenceService.java | 4 +- .../ObjectivePersistenceService.java | 4 +- .../service/persistence/PersistenceBase.java | 4 +- .../QuarterPersistenceService.java | 8 +- .../persistence/TeamPersistenceService.java | 4 +- .../persistence/UserPersistenceService.java | 4 +- .../UserTeamPersistenceService.java | 4 +- .../service/validation/ValidationBase.java | 4 +- ...ayMultitenantMigrationInitializerTest.java | 8 +- ...TenantConnectionProviderInternalsTest.java | 4 +- .../security/TenantJWSKeySelectorTest.java | 12 ++- .../AuthorizationServiceTest.java | 24 +++-- .../AuthorizationCriteriaParametersTest.java | 4 +- .../persistence/PersistenceBaseTestIT.java | 4 +- 47 files changed, 639 insertions(+), 213 deletions(-) diff --git a/backend/src/main/java/ch/puzzle/okr/dto/keyresult/KeyResultMetricDto.java b/backend/src/main/java/ch/puzzle/okr/dto/keyresult/KeyResultMetricDto.java index 1108cd6d01..69c0d18153 100644 --- a/backend/src/main/java/ch/puzzle/okr/dto/keyresult/KeyResultMetricDto.java +++ b/backend/src/main/java/ch/puzzle/okr/dto/keyresult/KeyResultMetricDto.java @@ -12,5 +12,7 @@ public record KeyResultMetricDto(Long id, int version, String keyResultType, Str KeyResultLastCheckInMetricDto lastCheckIn, LocalDateTime createdOn, LocalDateTime modifiedOn, boolean writeable, List actionList) implements KeyResultDto { @Override - public List getActionList() { return actionList; } + public List getActionList() { + return actionList; + } } diff --git a/backend/src/main/java/ch/puzzle/okr/dto/keyresult/KeyResultOrdinalDto.java b/backend/src/main/java/ch/puzzle/okr/dto/keyresult/KeyResultOrdinalDto.java index e48980a636..44d622ea35 100644 --- a/backend/src/main/java/ch/puzzle/okr/dto/keyresult/KeyResultOrdinalDto.java +++ b/backend/src/main/java/ch/puzzle/okr/dto/keyresult/KeyResultOrdinalDto.java @@ -11,5 +11,7 @@ public record KeyResultOrdinalDto(Long id, int version, String keyResultType, St KeyResultObjectiveDto objective, KeyResultLastCheckInOrdinalDto lastCheckIn, LocalDateTime createdOn, LocalDateTime modifiedOn, boolean writeable, List actionList) implements KeyResultDto { @Override - public List getActionList() { return actionList; } + public List getActionList() { + return actionList; + } } \ No newline at end of file diff --git a/backend/src/main/java/ch/puzzle/okr/exception/OkrResponseStatusException.java b/backend/src/main/java/ch/puzzle/okr/exception/OkrResponseStatusException.java index 298b83c621..712b292ecd 100644 --- a/backend/src/main/java/ch/puzzle/okr/exception/OkrResponseStatusException.java +++ b/backend/src/main/java/ch/puzzle/okr/exception/OkrResponseStatusException.java @@ -54,5 +54,7 @@ public OkrResponseStatusException(HttpStatus status, List errors) { this.errors = errors; } - public List getErrors() { return errors; } + public List getErrors() { + return errors; + } } diff --git a/backend/src/main/java/ch/puzzle/okr/models/Action.java b/backend/src/main/java/ch/puzzle/okr/models/Action.java index e10ca96c1e..793f7ec297 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/Action.java +++ b/backend/src/main/java/ch/puzzle/okr/models/Action.java @@ -44,37 +44,63 @@ private Action(Builder builder) { keyResult = builder.keyResult; } - public Long getId() { return id; } + public Long getId() { + return id; + } public void resetId() { id = null; } - public String getAction() { return action; } + public String getAction() { + return action; + } - public void setAction(String action) { this.action = action; } + public void setAction(String action) { + this.action = action; + } - public int getPriority() { return priority; } + public int getPriority() { + return priority; + } - public void setPriority(int priority) { this.priority = priority; } + public void setPriority(int priority) { + this.priority = priority; + } - public boolean isChecked() { return isChecked; } + public boolean isChecked() { + return isChecked; + } - public void setChecked(boolean checked) { isChecked = checked; } + public void setChecked(boolean checked) { + isChecked = checked; + } - public KeyResult getKeyResult() { return keyResult; } + public KeyResult getKeyResult() { + return keyResult; + } - public void setKeyResult(KeyResult keyResult) { this.keyResult = keyResult; } + public void setKeyResult(KeyResult keyResult) { + this.keyResult = keyResult; + } - public int getVersion() { return version; } + public int getVersion() { + return version; + } - public void setVersion(int version) { this.version = version; } + public void setVersion(int version) { + this.version = version; + } @Override - public boolean isWriteable() { return writeable; } + public boolean isWriteable() { + return writeable; + } @Override - public void setWriteable(boolean writeable) { this.writeable = writeable; } + public void setWriteable(boolean writeable) { + this.writeable = writeable; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/Completed.java b/backend/src/main/java/ch/puzzle/okr/models/Completed.java index 19e0de22ac..ea77c1d780 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/Completed.java +++ b/backend/src/main/java/ch/puzzle/okr/models/Completed.java @@ -32,17 +32,29 @@ private Completed(Builder builder) { setComment(builder.comment); } - public Long getId() { return id; } + public Long getId() { + return id; + } - public int getVersion() { return version; } + public int getVersion() { + return version; + } - public Objective getObjective() { return objective; } + public Objective getObjective() { + return objective; + } - public void setObjective(Objective objective) { this.objective = objective; } + public void setObjective(Objective objective) { + this.objective = objective; + } - public String getComment() { return comment; } + public String getComment() { + return comment; + } - public void setComment(String comment) { this.comment = comment; } + public void setComment(String comment) { + this.comment = comment; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/Objective.java b/backend/src/main/java/ch/puzzle/okr/models/Objective.java index 281c0d7353..99baa745db 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/Objective.java +++ b/backend/src/main/java/ch/puzzle/okr/models/Objective.java @@ -69,51 +69,95 @@ private Objective(Builder builder) { setModifiedBy(builder.modifiedBy); } - public Long getId() { return id; } + public Long getId() { + return id; + } - public int getVersion() { return version; } + public int getVersion() { + return version; + } - public String getTitle() { return title; } + public String getTitle() { + return title; + } - public void setTitle(String title) { this.title = title; } + public void setTitle(String title) { + this.title = title; + } - public User getCreatedBy() { return createdBy; } + public User getCreatedBy() { + return createdBy; + } - public void setCreatedBy(User createdBy) { this.createdBy = createdBy; } + public void setCreatedBy(User createdBy) { + this.createdBy = createdBy; + } - public Team getTeam() { return team; } + public Team getTeam() { + return team; + } - public void setTeam(Team team) { this.team = team; } + public void setTeam(Team team) { + this.team = team; + } - public Quarter getQuarter() { return quarter; } + public Quarter getQuarter() { + return quarter; + } - public void setQuarter(Quarter quarter) { this.quarter = quarter; } + public void setQuarter(Quarter quarter) { + this.quarter = quarter; + } - public String getDescription() { return description; } + public String getDescription() { + return description; + } - public void setDescription(String description) { this.description = description; } + public void setDescription(String description) { + this.description = description; + } - public LocalDateTime getModifiedOn() { return modifiedOn; } + public LocalDateTime getModifiedOn() { + return modifiedOn; + } - public void setModifiedOn(LocalDateTime modifiedOn) { this.modifiedOn = modifiedOn; } + public void setModifiedOn(LocalDateTime modifiedOn) { + this.modifiedOn = modifiedOn; + } - public State getState() { return state; } + public State getState() { + return state; + } - public void setState(State state) { this.state = state; } + public void setState(State state) { + this.state = state; + } - public LocalDateTime getCreatedOn() { return createdOn; } + public LocalDateTime getCreatedOn() { + return createdOn; + } - public void setCreatedOn(LocalDateTime createdOn) { this.createdOn = createdOn; } + public void setCreatedOn(LocalDateTime createdOn) { + this.createdOn = createdOn; + } - public User getModifiedBy() { return modifiedBy; } + public User getModifiedBy() { + return modifiedBy; + } - public void setModifiedBy(User modifiedBy) { this.modifiedBy = modifiedBy; } + public void setModifiedBy(User modifiedBy) { + this.modifiedBy = modifiedBy; + } @Override - public boolean isWriteable() { return writeable; } + public boolean isWriteable() { + return writeable; + } @Override - public void setWriteable(boolean writeable) { this.writeable = writeable; } + public void setWriteable(boolean writeable) { + this.writeable = writeable; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/Quarter.java b/backend/src/main/java/ch/puzzle/okr/models/Quarter.java index 244a76e965..7c008cf3b3 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/Quarter.java +++ b/backend/src/main/java/ch/puzzle/okr/models/Quarter.java @@ -30,19 +30,33 @@ private Quarter(Builder builder) { setEndDate(builder.endDate); } - public Long getId() { return id; } + public Long getId() { + return id; + } - public String getLabel() { return label; } + public String getLabel() { + return label; + } - public void setLabel(String label) { this.label = label; } + public void setLabel(String label) { + this.label = label; + } - public LocalDate getStartDate() { return startDate; } + public LocalDate getStartDate() { + return startDate; + } - public void setStartDate(LocalDate startDate) { this.startDate = startDate; } + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } - public LocalDate getEndDate() { return endDate; } + public LocalDate getEndDate() { + return endDate; + } - public void setEndDate(LocalDate endDate) { this.endDate = endDate; } + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/Team.java b/backend/src/main/java/ch/puzzle/okr/models/Team.java index a2bbadb7bf..dd81ba7f35 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/Team.java +++ b/backend/src/main/java/ch/puzzle/okr/models/Team.java @@ -37,23 +37,39 @@ private Team(Builder builder) { setUserTeamList(builder.userTeamList); } - public Long getId() { return id; } + public Long getId() { + return id; + } - public int getVersion() { return version; } + public int getVersion() { + return version; + } - public String getName() { return name; } + public String getName() { + return name; + } - public void setName(String name) { this.name = name; } + public void setName(String name) { + this.name = name; + } - public List getUserTeamList() { return userTeamList; } + public List getUserTeamList() { + return userTeamList; + } - public void setUserTeamList(List userTeamList) { this.userTeamList = userTeamList; } + public void setUserTeamList(List userTeamList) { + this.userTeamList = userTeamList; + } @Override - public boolean isWriteable() { return writeable; } + public boolean isWriteable() { + return writeable; + } @Override - public void setWriteable(boolean writeable) { this.writeable = writeable; } + public void setWriteable(boolean writeable) { + this.writeable = writeable; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/User.java b/backend/src/main/java/ch/puzzle/okr/models/User.java index b9267ad9ac..e92d9b2e3d 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/User.java +++ b/backend/src/main/java/ch/puzzle/okr/models/User.java @@ -57,29 +57,53 @@ private User(Builder builder) { setOkrChampion(builder.isOkrChampion); } - public Long getId() { return id; } + public Long getId() { + return id; + } - public int getVersion() { return version; } + public int getVersion() { + return version; + } - public String getFirstname() { return firstname; } + public String getFirstname() { + return firstname; + } - public void setFirstname(String firstname) { this.firstname = firstname; } + public void setFirstname(String firstname) { + this.firstname = firstname; + } - public String getLastname() { return lastname; } + public String getLastname() { + return lastname; + } - public void setLastname(String lastname) { this.lastname = lastname; } + public void setLastname(String lastname) { + this.lastname = lastname; + } - public String getEmail() { return email; } + public String getEmail() { + return email; + } - public void setEmail(String email) { this.email = email; } + public void setEmail(String email) { + this.email = email; + } - public List getUserTeamList() { return userTeamList; } + public List getUserTeamList() { + return userTeamList; + } - public void setUserTeamList(List userTeamList) { this.userTeamList = userTeamList; } + public void setUserTeamList(List userTeamList) { + this.userTeamList = userTeamList; + } - public boolean isOkrChampion() { return isOkrChampion; } + public boolean isOkrChampion() { + return isOkrChampion; + } - public void setOkrChampion(boolean okrChampion) { isOkrChampion = okrChampion; } + public void setOkrChampion(boolean okrChampion) { + isOkrChampion = okrChampion; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/UserTeam.java b/backend/src/main/java/ch/puzzle/okr/models/UserTeam.java index eefce72615..281f02faf6 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/UserTeam.java +++ b/backend/src/main/java/ch/puzzle/okr/models/UserTeam.java @@ -37,25 +37,45 @@ private UserTeam(Builder builder) { this.isTeamAdmin = builder.isTeamAdmin; } - public Long getId() { return id; } + public Long getId() { + return id; + } - public void setId(Long id) { this.id = id; } + public void setId(Long id) { + this.id = id; + } - public int getVersion() { return version; } + public int getVersion() { + return version; + } - public void setVersion(int version) { this.version = version; } + public void setVersion(int version) { + this.version = version; + } - public User getUser() { return user; } + public User getUser() { + return user; + } - public void setUser(User user) { this.user = user; } + public void setUser(User user) { + this.user = user; + } - public Team getTeam() { return team; } + public Team getTeam() { + return team; + } - public void setTeam(Team team) { this.team = team; } + public void setTeam(Team team) { + this.team = team; + } - public boolean isTeamAdmin() { return isTeamAdmin; } + public boolean isTeamAdmin() { + return isTeamAdmin; + } - public void setTeamAdmin(boolean teamAdmin) { isTeamAdmin = teamAdmin; } + public void setTeamAdmin(boolean teamAdmin) { + isTeamAdmin = teamAdmin; + } @Override public boolean equals(Object o) { diff --git a/backend/src/main/java/ch/puzzle/okr/models/alignment/Alignment.java b/backend/src/main/java/ch/puzzle/okr/models/alignment/Alignment.java index 56a09b20b1..2c6ae48992 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/alignment/Alignment.java +++ b/backend/src/main/java/ch/puzzle/okr/models/alignment/Alignment.java @@ -29,13 +29,21 @@ protected Alignment(Alignment.Builder builder) { setAlignedObjective(builder.alignedObjective); } - public Long getId() { return id; } + public Long getId() { + return id; + } - public int getVersion() { return version; } + public int getVersion() { + return version; + } - public Objective getAlignedObjective() { return alignedObjective; } + public Objective getAlignedObjective() { + return alignedObjective; + } - public void setAlignedObjective(Objective alignedObjective) { this.alignedObjective = alignedObjective; } + public void setAlignedObjective(Objective alignedObjective) { + this.alignedObjective = alignedObjective; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/alignment/AlignmentSelection.java b/backend/src/main/java/ch/puzzle/okr/models/alignment/AlignmentSelection.java index 27afd767cb..562b5a4fc0 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/alignment/AlignmentSelection.java +++ b/backend/src/main/java/ch/puzzle/okr/models/alignment/AlignmentSelection.java @@ -32,15 +32,25 @@ private AlignmentSelection(Builder builder) { keyResultTitle = builder.keyResultTitle; } - public AlignmentSelectionId getAlignmentSelectionId() { return alignmentSelectionId; } + public AlignmentSelectionId getAlignmentSelectionId() { + return alignmentSelectionId; + } - public Long getTeamId() { return teamId; } + public Long getTeamId() { + return teamId; + } - public String getObjectiveTitle() { return objectiveTitle; } + public String getObjectiveTitle() { + return objectiveTitle; + } - public Long getQuarterId() { return quarterId; } + public Long getQuarterId() { + return quarterId; + } - public String getKeyResultTitle() { return keyResultTitle; } + public String getKeyResultTitle() { + return keyResultTitle; + } @Override public boolean equals(Object o) { diff --git a/backend/src/main/java/ch/puzzle/okr/models/alignment/AlignmentSelectionId.java b/backend/src/main/java/ch/puzzle/okr/models/alignment/AlignmentSelectionId.java index 612ae992cb..e99a7c5611 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/alignment/AlignmentSelectionId.java +++ b/backend/src/main/java/ch/puzzle/okr/models/alignment/AlignmentSelectionId.java @@ -26,9 +26,13 @@ public static AlignmentSelectionId of(Long objectiveId, Long keyResultId) { return new AlignmentSelectionId(objectiveId, keyResultId); } - public Long getObjectiveId() { return objectiveId; } + public Long getObjectiveId() { + return objectiveId; + } - public Long getKeyResultId() { return keyResultId; } + public Long getKeyResultId() { + return keyResultId; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/alignment/KeyResultAlignment.java b/backend/src/main/java/ch/puzzle/okr/models/alignment/KeyResultAlignment.java index cc08c09024..72ef8f21d7 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/alignment/KeyResultAlignment.java +++ b/backend/src/main/java/ch/puzzle/okr/models/alignment/KeyResultAlignment.java @@ -21,10 +21,14 @@ private KeyResultAlignment(Builder builder) { } @Override - public KeyResult getAlignmentTarget() { return targetKeyResult; } + public KeyResult getAlignmentTarget() { + return targetKeyResult; + } @Override - public void setAlignmentTarget(KeyResult alignmentTarget) { this.targetKeyResult = alignmentTarget; } + public void setAlignmentTarget(KeyResult alignmentTarget) { + this.targetKeyResult = alignmentTarget; + } @Override public boolean equals(Object o) { diff --git a/backend/src/main/java/ch/puzzle/okr/models/alignment/ObjectiveAlignment.java b/backend/src/main/java/ch/puzzle/okr/models/alignment/ObjectiveAlignment.java index 0c15ff93e2..7225c08176 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/alignment/ObjectiveAlignment.java +++ b/backend/src/main/java/ch/puzzle/okr/models/alignment/ObjectiveAlignment.java @@ -23,10 +23,14 @@ private ObjectiveAlignment(Builder builder) { } @Override - public Objective getAlignmentTarget() { return targetObjective; } + public Objective getAlignmentTarget() { + return targetObjective; + } @Override - public void setAlignmentTarget(Objective alignmentTarget) { targetObjective = alignmentTarget; } + public void setAlignmentTarget(Objective alignmentTarget) { + targetObjective = alignmentTarget; + } @Override public boolean equals(Object o) { diff --git a/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckIn.java b/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckIn.java index d657e784ec..8c408ff99b 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckIn.java +++ b/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckIn.java @@ -51,45 +51,83 @@ public abstract class CheckIn implements WriteableInterface { private transient boolean writeable; /* Getter and Setter */ - public Long getId() { return id; } + public Long getId() { + return id; + } - public int getVersion() { return version; } + public int getVersion() { + return version; + } - public String getChangeInfo() { return changeInfo; } + public String getChangeInfo() { + return changeInfo; + } - public void setChangeInfo(String changeInfo) { this.changeInfo = changeInfo; } + public void setChangeInfo(String changeInfo) { + this.changeInfo = changeInfo; + } - public String getInitiatives() { return initiatives; } + public String getInitiatives() { + return initiatives; + } - public void setInitiatives(String initiatives) { this.initiatives = initiatives; } + public void setInitiatives(String initiatives) { + this.initiatives = initiatives; + } - public Integer getConfidence() { return confidence; } + public Integer getConfidence() { + return confidence; + } - public void setConfidence(Integer confidence) { this.confidence = confidence; } + public void setConfidence(Integer confidence) { + this.confidence = confidence; + } - public KeyResult getKeyResult() { return keyResult; } + public KeyResult getKeyResult() { + return keyResult; + } - public void setKeyResult(KeyResult keyResult) { this.keyResult = keyResult; } + public void setKeyResult(KeyResult keyResult) { + this.keyResult = keyResult; + } - public User getCreatedBy() { return createdBy; } + public User getCreatedBy() { + return createdBy; + } - public void setCreatedBy(User createdBy) { this.createdBy = createdBy; } + public void setCreatedBy(User createdBy) { + this.createdBy = createdBy; + } - public LocalDateTime getCreatedOn() { return createdOn; } + public LocalDateTime getCreatedOn() { + return createdOn; + } - public void setCreatedOn(LocalDateTime createdOn) { this.createdOn = createdOn; } + public void setCreatedOn(LocalDateTime createdOn) { + this.createdOn = createdOn; + } - public LocalDateTime getModifiedOn() { return modifiedOn; } + public LocalDateTime getModifiedOn() { + return modifiedOn; + } - public void setModifiedOn(LocalDateTime modifiedOn) { this.modifiedOn = modifiedOn; } + public void setModifiedOn(LocalDateTime modifiedOn) { + this.modifiedOn = modifiedOn; + } - public String getCheckInType() { return checkInType; } + public String getCheckInType() { + return checkInType; + } @Override - public boolean isWriteable() { return writeable; } + public boolean isWriteable() { + return writeable; + } @Override - public void setWriteable(boolean writeable) { this.writeable = writeable; } + public void setWriteable(boolean writeable) { + this.writeable = writeable; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckInMetric.java b/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckInMetric.java index e2ae268b30..b26834e455 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckInMetric.java +++ b/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckInMetric.java @@ -15,9 +15,13 @@ public class CheckInMetric extends CheckIn { private Double valueMetric; /* Getter and Setter */ - public Double getValue() { return valueMetric; } + public Double getValue() { + return valueMetric; + } - public void setValue(Double value) { this.valueMetric = value; } + public void setValue(Double value) { + this.valueMetric = value; + } /* Constructor */ public CheckInMetric() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckInOrdinal.java b/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckInOrdinal.java index 14e87cdbe4..be7deba8e6 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckInOrdinal.java +++ b/backend/src/main/java/ch/puzzle/okr/models/checkin/CheckInOrdinal.java @@ -18,9 +18,13 @@ public class CheckInOrdinal extends CheckIn { private Zone zone; /* Getter and Setter */ - public Zone getZone() { return zone; } + public Zone getZone() { + return zone; + } - public void setZone(Zone zone) { this.zone = zone; } + public void setZone(Zone zone) { + this.zone = zone; + } /* Constructor */ public CheckInOrdinal() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResult.java b/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResult.java index d23582c27b..fa579e899c 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResult.java +++ b/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResult.java @@ -53,51 +53,91 @@ public abstract class KeyResult implements WriteableInterface { private transient boolean writeable; - public Long getId() { return id; } + public Long getId() { + return id; + } - public int getVersion() { return version; } + public int getVersion() { + return version; + } - public Objective getObjective() { return objective; } + public Objective getObjective() { + return objective; + } - public void setObjective(Objective objective) { this.objective = objective; } + public void setObjective(Objective objective) { + this.objective = objective; + } - public String getTitle() { return title; } + public String getTitle() { + return title; + } - public void setTitle(String title) { this.title = title; } + public void setTitle(String title) { + this.title = title; + } - public String getDescription() { return description; } + public String getDescription() { + return description; + } - public void setDescription(String description) { this.description = description; } + public void setDescription(String description) { + this.description = description; + } - public User getOwner() { return owner; } + public User getOwner() { + return owner; + } - public void setOwner(User owner) { this.owner = owner; } + public void setOwner(User owner) { + this.owner = owner; + } - public User getCreatedBy() { return createdBy; } + public User getCreatedBy() { + return createdBy; + } - public void setCreatedBy(User createdBy) { this.createdBy = createdBy; } + public void setCreatedBy(User createdBy) { + this.createdBy = createdBy; + } - public LocalDateTime getCreatedOn() { return createdOn; } + public LocalDateTime getCreatedOn() { + return createdOn; + } - public void setCreatedOn(LocalDateTime createdOn) { this.createdOn = createdOn; } + public void setCreatedOn(LocalDateTime createdOn) { + this.createdOn = createdOn; + } - public LocalDateTime getModifiedOn() { return modifiedOn; } + public LocalDateTime getModifiedOn() { + return modifiedOn; + } - public void setModifiedOn(LocalDateTime modifiedOn) { this.modifiedOn = modifiedOn; } + public void setModifiedOn(LocalDateTime modifiedOn) { + this.modifiedOn = modifiedOn; + } - public String getKeyResultType() { return keyResultType; } + public String getKeyResultType() { + return keyResultType; + } public void resetId() { this.id = null; } - private void setKeyResultType(String keyResultType) { this.keyResultType = keyResultType; } + private void setKeyResultType(String keyResultType) { + this.keyResultType = keyResultType; + } @Override - public boolean isWriteable() { return writeable; } + public boolean isWriteable() { + return writeable; + } @Override - public void setWriteable(boolean writeable) { this.writeable = writeable; } + public void setWriteable(boolean writeable) { + this.writeable = writeable; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResultMetric.java b/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResultMetric.java index 85ec1cb19e..ece94d53f9 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResultMetric.java +++ b/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResultMetric.java @@ -21,17 +21,29 @@ public class KeyResultMetric extends KeyResult { @Enumerated(EnumType.STRING) private Unit unit; - public Double getBaseline() { return baseline; } + public Double getBaseline() { + return baseline; + } - public void setBaseline(Double baseline) { this.baseline = baseline; } + public void setBaseline(Double baseline) { + this.baseline = baseline; + } - public Double getStretchGoal() { return stretchGoal; } + public Double getStretchGoal() { + return stretchGoal; + } - public void setStretchGoal(Double stretchGoal) { this.stretchGoal = stretchGoal; } + public void setStretchGoal(Double stretchGoal) { + this.stretchGoal = stretchGoal; + } - public Unit getUnit() { return unit; } + public Unit getUnit() { + return unit; + } - public void setUnit(Unit unit) { this.unit = unit; } + public void setUnit(Unit unit) { + this.unit = unit; + } public KeyResultMetric() { super(); diff --git a/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResultOrdinal.java b/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResultOrdinal.java index c13d0f1bf1..2f98b0e962 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResultOrdinal.java +++ b/backend/src/main/java/ch/puzzle/okr/models/keyresult/KeyResultOrdinal.java @@ -23,17 +23,29 @@ public class KeyResultOrdinal extends KeyResult { @Size(max = 400, message = "Attribute stretchZone has a max length of 400 characters") private String stretchZone; - public String getCommitZone() { return commitZone; } + public String getCommitZone() { + return commitZone; + } - public void setCommitZone(String commitZone) { this.commitZone = commitZone; } + public void setCommitZone(String commitZone) { + this.commitZone = commitZone; + } - public String getTargetZone() { return targetZone; } + public String getTargetZone() { + return targetZone; + } - public void setTargetZone(String targetZone) { this.targetZone = targetZone; } + public void setTargetZone(String targetZone) { + this.targetZone = targetZone; + } - public String getStretchZone() { return stretchZone; } + public String getStretchZone() { + return stretchZone; + } - public void setStretchZone(String stretchZone) { this.stretchZone = stretchZone; } + public void setStretchZone(String stretchZone) { + this.stretchZone = stretchZone; + } public KeyResultOrdinal() { super(); diff --git a/backend/src/main/java/ch/puzzle/okr/models/overview/Overview.java b/backend/src/main/java/ch/puzzle/okr/models/overview/Overview.java index faa60a55de..303f400e81 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/overview/Overview.java +++ b/backend/src/main/java/ch/puzzle/okr/models/overview/Overview.java @@ -64,51 +64,95 @@ private Overview(Builder builder) { checkInCreatedOn = builder.checkInCreatedOn; } - public OverviewId getOverviewId() { return overviewId; } + public OverviewId getOverviewId() { + return overviewId; + } - public int getTeamVersion() { return teamVersion; } + public int getTeamVersion() { + return teamVersion; + } - public String getTeamName() { return teamName; } + public String getTeamName() { + return teamName; + } - public String getObjectiveTitle() { return objectiveTitle; } + public String getObjectiveTitle() { + return objectiveTitle; + } - public State getObjectiveState() { return objectiveState; } + public State getObjectiveState() { + return objectiveState; + } - public LocalDateTime getObjectiveCreatedOn() { return objectiveCreatedOn; } + public LocalDateTime getObjectiveCreatedOn() { + return objectiveCreatedOn; + } - public Long getQuarterId() { return quarterId; } + public Long getQuarterId() { + return quarterId; + } - public String getQuarterLabel() { return quarterLabel; } + public String getQuarterLabel() { + return quarterLabel; + } - public String getKeyResultTitle() { return keyResultTitle; } + public String getKeyResultTitle() { + return keyResultTitle; + } - public String getKeyResultType() { return keyResultType; } + public String getKeyResultType() { + return keyResultType; + } - public Double getBaseline() { return baseline; } + public Double getBaseline() { + return baseline; + } - public Double getStretchGoal() { return stretchGoal; } + public Double getStretchGoal() { + return stretchGoal; + } - public String getUnit() { return unit; } + public String getUnit() { + return unit; + } - public String getCommitZone() { return commitZone; } + public String getCommitZone() { + return commitZone; + } - public String getTargetZone() { return targetZone; } + public String getTargetZone() { + return targetZone; + } - public String getStretchZone() { return stretchZone; } + public String getStretchZone() { + return stretchZone; + } - public Double getCheckInValue() { return checkInValue; } + public Double getCheckInValue() { + return checkInValue; + } - public String getCheckInZone() { return checkInZone; } + public String getCheckInZone() { + return checkInZone; + } - public Integer getConfidence() { return confidence; } + public Integer getConfidence() { + return confidence; + } - public LocalDateTime getCheckInCreatedOn() { return checkInCreatedOn; } + public LocalDateTime getCheckInCreatedOn() { + return checkInCreatedOn; + } @Override - public boolean isWriteable() { return writeable; } + public boolean isWriteable() { + return writeable; + } @Override - public void setWriteable(boolean writeable) { this.writeable = writeable; } + public void setWriteable(boolean writeable) { + this.writeable = writeable; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/models/overview/OverviewId.java b/backend/src/main/java/ch/puzzle/okr/models/overview/OverviewId.java index 45f8fed20f..5923ba1808 100644 --- a/backend/src/main/java/ch/puzzle/okr/models/overview/OverviewId.java +++ b/backend/src/main/java/ch/puzzle/okr/models/overview/OverviewId.java @@ -30,13 +30,21 @@ public static OverviewId of(Long teamId, Long objectiveId, Long keyResultId, Lon return new OverviewId(teamId, objectiveId, keyResultId, checkInId); } - public Long getTeamId() { return teamId; } + public Long getTeamId() { + return teamId; + } - public Long getObjectiveId() { return objectiveId; } + public Long getObjectiveId() { + return objectiveId; + } - public Long getKeyResultId() { return keyResultId; } + public Long getKeyResultId() { + return keyResultId; + } - public Long getCheckInId() { return checkInId; } + public Long getCheckInId() { + return checkInId; + } @Override public String toString() { diff --git a/backend/src/main/java/ch/puzzle/okr/multitenancy/HibernateContext.java b/backend/src/main/java/ch/puzzle/okr/multitenancy/HibernateContext.java index 901d325405..d78c3ba4ac 100644 --- a/backend/src/main/java/ch/puzzle/okr/multitenancy/HibernateContext.java +++ b/backend/src/main/java/ch/puzzle/okr/multitenancy/HibernateContext.java @@ -15,7 +15,9 @@ public class HibernateContext { public record DbConfig(String url, String username, String password, String multiTenancy) { - public boolean isValid() { return !hasNullValues() && !hasEmptyValues(); } + public boolean isValid() { + return !hasNullValues() && !hasEmptyValues(); + } private boolean hasNullValues() { return url() == null || username() == null || password() == null || multiTenancy() == null; diff --git a/backend/src/main/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProvider.java b/backend/src/main/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProvider.java index e75e0b1cfa..7c8d2c0e01 100644 --- a/backend/src/main/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProvider.java +++ b/backend/src/main/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProvider.java @@ -44,7 +44,9 @@ private String convertTenantIdToSchemaName(String tenantIdentifier) { } @Override - protected ConnectionProvider getAnyConnectionProvider() { return getConnectionProvider(DEFAULT_TENANT_ID); } + protected ConnectionProvider getAnyConnectionProvider() { + return getConnectionProvider(DEFAULT_TENANT_ID); + } @Override protected ConnectionProvider selectConnectionProvider(String tenantIdentifier) { @@ -109,5 +111,7 @@ private Map convertPropertiesToMap(Properties properties) { return configProperties; } - protected Properties getHibernateProperties() { return HibernateContext.getHibernateConfig(); } + protected Properties getHibernateProperties() { + return HibernateContext.getHibernateConfig(); + } } \ No newline at end of file diff --git a/backend/src/main/java/ch/puzzle/okr/multitenancy/TenantConfigProvider.java b/backend/src/main/java/ch/puzzle/okr/multitenancy/TenantConfigProvider.java index 0b3b91ef3f..374ad302d3 100644 --- a/backend/src/main/java/ch/puzzle/okr/multitenancy/TenantConfigProvider.java +++ b/backend/src/main/java/ch/puzzle/okr/multitenancy/TenantConfigProvider.java @@ -59,7 +59,9 @@ private String[] getOkrChampionEmailsFromTenant(String tenantId) { .toArray(String[]::new); } - public List getTenantConfigs() { return this.tenantConfigs.values().stream().toList(); } + public List getTenantConfigs() { + return this.tenantConfigs.values().stream().toList(); + } private DataSourceConfig readDataSourceConfig(String tenantId) { return new DataSourceConfig(env.getProperty("okr.datasource.driver-class-name"), diff --git a/backend/src/main/java/ch/puzzle/okr/service/authorization/AuthorizationServiceBase.java b/backend/src/main/java/ch/puzzle/okr/service/authorization/AuthorizationServiceBase.java index 0dc6078cef..92766a80fc 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/authorization/AuthorizationServiceBase.java +++ b/backend/src/main/java/ch/puzzle/okr/service/authorization/AuthorizationServiceBase.java @@ -60,8 +60,12 @@ public void deleteEntityById(ID id) { businessService.deleteEntityById(id); } - public AuthorizationService getAuthorizationService() { return authorizationService; } + public AuthorizationService getAuthorizationService() { + return authorizationService; + } - public BS getBusinessService() { return (BS) businessService; } + public BS getBusinessService() { + return (BS) businessService; + } } diff --git a/backend/src/main/java/ch/puzzle/okr/service/business/QuarterBusinessService.java b/backend/src/main/java/ch/puzzle/okr/service/business/QuarterBusinessService.java index 9da9e91722..7069eb4cf9 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/business/QuarterBusinessService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/business/QuarterBusinessService.java @@ -48,7 +48,9 @@ public List getQuarters() { return mostCurrentQuarterList; } - public Quarter getCurrentQuarter() { return quarterPersistenceService.getCurrentQuarter(); } + public Quarter getCurrentQuarter() { + return quarterPersistenceService.getCurrentQuarter(); + } private String shortenYear(int fullYear) { return padWithZeros(2, fullYear % 100); @@ -95,7 +97,9 @@ private boolean inLastMonthOfQuarter(int currentQuarter, int nextQuarter) { return Math.abs(nextQuarter - currentQuarter) == 2; } - YearMonth getCurrentYearMonth() { return YearMonth.now(); } + YearMonth getCurrentYearMonth() { + return YearMonth.now(); + } Map generateQuarters() { Map quarters = new HashMap<>(); diff --git a/backend/src/main/java/ch/puzzle/okr/service/business/UserBusinessService.java b/backend/src/main/java/ch/puzzle/okr/service/business/UserBusinessService.java index 6abee4d545..3bb9a10d54 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/business/UserBusinessService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/business/UserBusinessService.java @@ -29,7 +29,9 @@ public UserBusinessService(UserPersistenceService userPersistenceService, UserVa this.cacheService = cacheService; } - public List getAllUsers() { return userPersistenceService.findAll(); } + public List getAllUsers() { + return userPersistenceService.findAll(); + } public User getUserById(Long ownerId) { return userPersistenceService.findById(ownerId); diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/ActionPersistenceService.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/ActionPersistenceService.java index 8bbdab3f3b..2ceb3685fe 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/ActionPersistenceService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/ActionPersistenceService.java @@ -15,7 +15,9 @@ protected ActionPersistenceService(ActionRepository repository) { } @Override - public String getModelName() { return ACTION; } + public String getModelName() { + return ACTION; + } public List getActionsByKeyResultIdOrderByPriorityAsc(Long keyResultId) { return getRepository().getActionsByKeyResultIdOrderByPriorityAsc(keyResultId); diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/AlignmentPersistenceService.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/AlignmentPersistenceService.java index 5844c60bd3..e3451cb05a 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/AlignmentPersistenceService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/AlignmentPersistenceService.java @@ -17,7 +17,9 @@ protected AlignmentPersistenceService(AlignmentRepository repository) { } @Override - public String getModelName() { return ALIGNMENT; } + public String getModelName() { + return ALIGNMENT; + } public List findByAlignedObjectiveId(Long alignedObjectiveId) { return getRepository().findByAlignedObjectiveId(alignedObjectiveId); diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/CheckInPersistenceService.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/CheckInPersistenceService.java index dbe00df18d..8beee6fd3b 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/CheckInPersistenceService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/CheckInPersistenceService.java @@ -15,7 +15,9 @@ protected CheckInPersistenceService(CheckInRepository repository) { } @Override - public String getModelName() { return CHECK_IN; } + public String getModelName() { + return CHECK_IN; + } public List getCheckInsByKeyResultIdOrderByCheckInDateDesc(Long keyResultId) { return getRepository().findCheckInsByKeyResultIdOrderByCreatedOnDesc(keyResultId); diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/CompletedPersistenceService.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/CompletedPersistenceService.java index 7f89566973..4741bde78e 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/CompletedPersistenceService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/CompletedPersistenceService.java @@ -14,7 +14,9 @@ protected CompletedPersistenceService(CompletedRepository repository) { } @Override - public String getModelName() { return COMPLETED; } + public String getModelName() { + return COMPLETED; + } public Completed getCompletedByObjectiveId(Long objectiveId) { return getRepository().findByObjectiveId(objectiveId); diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/KeyResultPersistenceService.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/KeyResultPersistenceService.java index 837096e64e..03e31dabb6 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/KeyResultPersistenceService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/KeyResultPersistenceService.java @@ -19,7 +19,9 @@ protected KeyResultPersistenceService(KeyResultRepository repository) { } @Override - public String getModelName() { return KEY_RESULT; } + public String getModelName() { + return KEY_RESULT; + } public List getKeyResultsByObjective(Long objectiveId) { return getRepository().findByObjectiveId(objectiveId); diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/ObjectivePersistenceService.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/ObjectivePersistenceService.java index 81bf044d05..aac01d8da1 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/ObjectivePersistenceService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/ObjectivePersistenceService.java @@ -35,7 +35,9 @@ protected ObjectivePersistenceService(ObjectiveRepository repository, EntityMana } @Override - public String getModelName() { return OBJECTIVE; } + public String getModelName() { + return OBJECTIVE; + } /** * Get the number of Objectives of a Team in a Quarter. The underling sql looks diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/PersistenceBase.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/PersistenceBase.java index 8b189636da..0ca16dc599 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/PersistenceBase.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/PersistenceBase.java @@ -34,7 +34,9 @@ protected PersistenceBase(CrudRepository repository) { } @SuppressWarnings(value = "unchecked casts") - public R getRepository() { return (R) repository; } + public R getRepository() { + return (R) repository; + } public T findById(ID id) throws OkrResponseStatusException { checkIdNull(id); diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/QuarterPersistenceService.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/QuarterPersistenceService.java index bb5a87902e..d9e4d938ab 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/QuarterPersistenceService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/QuarterPersistenceService.java @@ -16,7 +16,9 @@ protected QuarterPersistenceService(QuarterRepository repository) { } @Override - public String getModelName() { return QUARTER; } + public String getModelName() { + return QUARTER; + } public List getMostCurrentQuarters() { return getRepository().findTop6ByOrderByStartDateDescWithoutNullStartDate(); @@ -26,5 +28,7 @@ public Quarter findByLabel(String label) { return getRepository().findByLabel(label); } - public Quarter getCurrentQuarter() { return getRepository().getActiveQuarter(LocalDate.now()); } + public Quarter getCurrentQuarter() { + return getRepository().getActiveQuarter(LocalDate.now()); + } } diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/TeamPersistenceService.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/TeamPersistenceService.java index 71b4f98ab1..dd485164aa 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/TeamPersistenceService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/TeamPersistenceService.java @@ -15,7 +15,9 @@ protected TeamPersistenceService(TeamRepository repository) { } @Override - public String getModelName() { return TEAM; } + public String getModelName() { + return TEAM; + } public List findTeamsByName(String name) { return getRepository().findTeamsByName(name); diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/UserPersistenceService.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/UserPersistenceService.java index 209630b29c..2cfa105ec8 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/UserPersistenceService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/UserPersistenceService.java @@ -15,7 +15,9 @@ protected UserPersistenceService(UserRepository repository) { } @Override - public String getModelName() { return USER; } + public String getModelName() { + return USER; + } public synchronized User getOrCreateUser(User user) { Optional savedUser = getRepository().findByEmail(user.getEmail()); diff --git a/backend/src/main/java/ch/puzzle/okr/service/persistence/UserTeamPersistenceService.java b/backend/src/main/java/ch/puzzle/okr/service/persistence/UserTeamPersistenceService.java index 22f932233b..8bb03cd758 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/persistence/UserTeamPersistenceService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/persistence/UserTeamPersistenceService.java @@ -22,5 +22,7 @@ public void deleteAll(List userTeamList) { } @Override - public String getModelName() { return USER_TEAM; } + public String getModelName() { + return USER_TEAM; + } } diff --git a/backend/src/main/java/ch/puzzle/okr/service/validation/ValidationBase.java b/backend/src/main/java/ch/puzzle/okr/service/validation/ValidationBase.java index 48ed7abf15..e93ada1ba1 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/validation/ValidationBase.java +++ b/backend/src/main/java/ch/puzzle/okr/service/validation/ValidationBase.java @@ -38,7 +38,9 @@ public abstract class ValidationBase getTenantConfigs() { return List.of(tenantConfig); } + public List getTenantConfigs() { + return List.of(tenantConfig); + } @Override public Optional getTenantConfigById(String tenantId) { diff --git a/backend/src/test/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProviderInternalsTest.java b/backend/src/test/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProviderInternalsTest.java index 6cdc5b444c..d160620805 100644 --- a/backend/src/test/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProviderInternalsTest.java +++ b/backend/src/test/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProviderInternalsTest.java @@ -16,7 +16,9 @@ public class SchemaMultiTenantConnectionProviderInternalsTest { private static class ConfigurableConnectionProviderMock extends SchemaMultiTenantConnectionProvider { @Override - protected Properties getHibernateProperties() { return new Properties(); } + protected Properties getHibernateProperties() { + return new Properties(); + } public void registerProvider(String tenantIdentifier, ConnectionProvider connectionProvider) { connectionProviderMap.put(tenantIdentifier, connectionProvider); diff --git a/backend/src/test/java/ch/puzzle/okr/security/TenantJWSKeySelectorTest.java b/backend/src/test/java/ch/puzzle/okr/security/TenantJWSKeySelectorTest.java index e21997b017..42d99ee4ef 100644 --- a/backend/src/test/java/ch/puzzle/okr/security/TenantJWSKeySelectorTest.java +++ b/backend/src/test/java/ch/puzzle/okr/security/TenantJWSKeySelectorTest.java @@ -68,13 +68,19 @@ void selectKeysReturnKeyWithMockAlgorithmIfJwkSetUriIsFound() throws KeySourceEx JWSKeySelector fromUri(String uri) { return (jwsHeader, securityContext) -> List.of(new Key() { @Override - public String getAlgorithm() { return MOCK_ALGORITHM; } + public String getAlgorithm() { + return MOCK_ALGORITHM; + } @Override - public String getFormat() { return null; } + public String getFormat() { + return null; + } @Override - public byte[] getEncoded() { return new byte[0]; } + public byte[] getEncoded() { + return new byte[0]; + } }); } }; diff --git a/backend/src/test/java/ch/puzzle/okr/service/authorization/AuthorizationServiceTest.java b/backend/src/test/java/ch/puzzle/okr/service/authorization/AuthorizationServiceTest.java index 3f3f55e225..8aa1fab898 100644 --- a/backend/src/test/java/ch/puzzle/okr/service/authorization/AuthorizationServiceTest.java +++ b/backend/src/test/java/ch/puzzle/okr/service/authorization/AuthorizationServiceTest.java @@ -626,19 +626,29 @@ void hasRoleDeleteByKeyResultIdShouldThrowExceptionWhenNotInTeam() { private void setSecurityContext(Jwt token) { SecurityContextHolder.setContext(new SecurityContextImpl(new Authentication() { @Override - public Collection getAuthorities() { return null; } + public Collection getAuthorities() { + return null; + } @Override - public Object getCredentials() { return null; } + public Object getCredentials() { + return null; + } @Override - public Object getDetails() { return null; } + public Object getDetails() { + return null; + } @Override - public Object getPrincipal() { return token; } + public Object getPrincipal() { + return token; + } @Override - public boolean isAuthenticated() { return false; } + public boolean isAuthenticated() { + return false; + } @Override public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException { @@ -646,7 +656,9 @@ public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentExce } @Override - public String getName() { return "unit test authentication"; } + public String getName() { + return "unit test authentication"; + } })); } } diff --git a/backend/src/test/java/ch/puzzle/okr/service/persistence/AuthorizationCriteriaParametersTest.java b/backend/src/test/java/ch/puzzle/okr/service/persistence/AuthorizationCriteriaParametersTest.java index cfdc7f4865..0923b20a22 100644 --- a/backend/src/test/java/ch/puzzle/okr/service/persistence/AuthorizationCriteriaParametersTest.java +++ b/backend/src/test/java/ch/puzzle/okr/service/persistence/AuthorizationCriteriaParametersTest.java @@ -128,7 +128,9 @@ private static class TypedQueryMock implements TypedQuery private final StringBuilder log = new StringBuilder(); - public String getLog() { return log.toString(); } + public String getLog() { + return log.toString(); + } @Override public TypedQuery setParameter(Parameter parameter, T t) { diff --git a/backend/src/test/java/ch/puzzle/okr/service/persistence/PersistenceBaseTestIT.java b/backend/src/test/java/ch/puzzle/okr/service/persistence/PersistenceBaseTestIT.java index b0fd2a31ea..a6e3a8a132 100644 --- a/backend/src/test/java/ch/puzzle/okr/service/persistence/PersistenceBaseTestIT.java +++ b/backend/src/test/java/ch/puzzle/okr/service/persistence/PersistenceBaseTestIT.java @@ -109,7 +109,9 @@ void saveShouldThrowExceptionInTheCaseOfOptimisticLockingFailure() throws Respon var persistenceBaseForTest = new PersistenceBase<>(testRepository) { @Override - public String getModelName() { return "for_test"; } + public String getModelName() { + return "for_test"; + } }; // act + assert