Skip to content

Commit d515a68

Browse files
authored
Merge pull request #910 from qbicsoftware/development
Prepare smaller 1.6.1 release with minor improvements
2 parents f04fa41 + 9466cd4 commit d515a68

File tree

70 files changed

+499
-335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+499
-335
lines changed

application-commons/src/main/java/life/qbic/application/commons/ApplicationException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public class ApplicationException extends RuntimeException {
1818

1919
private final ErrorCode errorCode;
20-
private final ErrorParameters errorParameters;
20+
private final transient ErrorParameters errorParameters;
2121

2222
public ApplicationException() {
2323
this(ErrorCode.GENERAL, ErrorParameters.empty());

broadcasting/src/main/java/life/qbic/broadcasting/Exchange.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public void subscribe(MessageSubscriber subscriber, String topic) {
169169
*/
170170
static class Topic {
171171

172-
private final String topic;
172+
private final String value;
173173

174174
private final Set<MessageSubscriber> subscribers;
175175

@@ -185,7 +185,7 @@ static Topic create(String topic) {
185185

186186
protected Topic(String topic) {
187187
super();
188-
this.topic = topic;
188+
this.value = topic;
189189
subscribers = new HashSet<>();
190190
}
191191

@@ -198,11 +198,11 @@ synchronized void removeSubscriber(MessageSubscriber subscriber) {
198198
}
199199

200200
boolean matchesTopic(String topic) {
201-
return this.topic.equalsIgnoreCase(topic);
201+
return this.value.equalsIgnoreCase(topic);
202202
}
203203

204204
synchronized void informAllSubscribers(String message, MessageParameters messageParameters) {
205-
if (messageParameters.messageType.equalsIgnoreCase(topic)) {
205+
if (messageParameters.messageType.equalsIgnoreCase(value)) {
206206
informSubscribers(message, messageParameters);
207207
}
208208
}

docs/processes/Sample_registration_process.svg

Lines changed: 2 additions & 1 deletion
Loading

domain-concept/src/test/groovy/life/qbic/domain/concepts/TestEvent.groovy

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
package life.qbic.domain.concepts
2-
3-
4-
import java.time.Instant
5-
62
/**
73
* <b><class short description - 1 Line!></b>
84
*

email-service-provider/src/main/java/life/qbic/infrastructure/email/identity/IdentityEmailServiceProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ public IdentityEmailServiceProvider(EmailServiceProvider emailServiceProvider) {
3333
@Override
3434
public void send(Subject subject, Recipient recipient, Content content)
3535
throws CommunicationException {
36-
Optional.ofNullable(subject)
36+
subject = Optional.ofNullable(subject)
3737
.orElseThrow(() -> new CommunicationException("No subject provided."));
38-
Optional.ofNullable(recipient)
38+
recipient = Optional.ofNullable(recipient)
3939
.orElseThrow(() -> new CommunicationException("No recipient provided."));
40-
Optional.ofNullable(content)
40+
content = Optional.ofNullable(content)
4141
.orElseThrow(() -> new CommunicationException("No content provided."));
4242

4343
try {

identity/src/main/java/life/qbic/identity/application/user/IdentityService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public ApplicationResponse registerUser(final String fullName, String userName,
6464

6565
var userDomainService = DomainRegistry.instance().userDomainService();
6666
if (userDomainService.isEmpty()) {
67-
throw new RuntimeException("User registration failed.");
67+
throw new ApplicationException("User registration failed.");
6868
}
6969

7070
var userEmail = EmailAddress.from(email);
@@ -98,7 +98,7 @@ public ApplicationResponse registerOpenIdUser(String fullName, String userName,
9898

9999
var userDomainService = DomainRegistry.instance().userDomainService();
100100
if (userDomainService.isEmpty()) {
101-
throw new RuntimeException("User registration failed.");
101+
throw new ApplicationException("User registration failed.");
102102
}
103103

104104
var userEmail = EmailAddress.from(email);
@@ -301,6 +301,7 @@ public static class UserNameNotAvailableException extends ApplicationException {
301301
private static final long serialVersionUID = 4409722243047442583L;
302302

303303
public UserNameNotAvailableException() {
304+
super();
304305
}
305306
}
306307

identity/src/main/java/life/qbic/identity/application/user/policy/EmailConfirmationLinkSupplier.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.net.MalformedURLException;
44
import java.net.URL;
5+
import life.qbic.application.commons.ApplicationException;
56
import org.springframework.beans.factory.annotation.Value;
67
import org.springframework.stereotype.Service;
78

@@ -46,7 +47,7 @@ public String emailConfirmationUrl(String userId) {
4647
URL url = new URL(protocol, host, port, pathWithQuery);
4748
return url.toExternalForm();
4849
} catch (MalformedURLException e) {
49-
throw new RuntimeException("Link creation failed.", e);
50+
throw new ApplicationException("Link creation failed.", e);
5051
}
5152

5253
}

project-management/src/main/java/life/qbic/projectmanagement/application/AddExperimentToProjectService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public Result<ExperimentId, RuntimeException> addExperimentToProject(ProjectId p
6161
String specimenIconLabel) {
6262
requireNonNull(projectId, "project id must not be null during experiment creation");
6363
if (experimentName.isBlank()) {
64-
//ToDo Add Iterator for multiple experiments?
6564
experimentName = "Unnamed Experiment";
6665
}
6766
if (CollectionUtils.isEmpty(species)) {

project-management/src/main/java/life/qbic/projectmanagement/application/CollaboratorUserInfosConverter.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package life.qbic.projectmanagement.application;
22

33
import static java.util.Objects.isNull;
4-
import static life.qbic.logging.service.LoggerFactory.logger;
54

65
import com.fasterxml.jackson.core.JsonProcessingException;
76
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -11,7 +10,7 @@
1110
import java.io.IOException;
1211
import java.util.ArrayList;
1312
import java.util.List;
14-
import life.qbic.logging.api.Logger;
13+
import life.qbic.application.commons.ApplicationException;
1514
import life.qbic.projectmanagement.application.ProjectOverview.UserInfo;
1615

1716
/**
@@ -24,8 +23,6 @@
2423
public class CollaboratorUserInfosConverter implements
2524
AttributeConverter<List<UserInfo>, String> {
2625

27-
private static final Logger log = logger(CollaboratorUserInfosConverter.class);
28-
2926
private final ObjectMapper objectMapper = new ObjectMapper();
3027

3128
@Override
@@ -41,7 +38,7 @@ public String convertToDatabaseColumn(List<UserInfo> attribute) {
4138
return outputStream.toString();
4239
} catch (IOException e) {
4340
// we need to throw to prevent data loss
44-
throw new RuntimeException(
41+
throw new ApplicationException(
4542
"Unexpected problems writing project collaborators to the database", e);
4643
}
4744
}
@@ -58,7 +55,7 @@ public List<UserInfo> convertToEntityAttribute(String dbData) {
5855
);
5956
} catch (JsonProcessingException e) {
6057
// we need to throw to prevent data loss
61-
throw new RuntimeException("Unexpected failure parsing project collaborators from database",
58+
throw new ApplicationException("Unexpected failure parsing project collaborators from database",
6259
e);
6360
}
6461

project-management/src/main/java/life/qbic/projectmanagement/application/ContactRepository.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public class ContactRepository {
1111

1212
@PostFilter("hasAnyAuthority('ROLE_ADMIN')")
1313
public List<Contact> findAll() {
14-
//TODO implement
1514
return dummyContacts();
1615
}
1716

0 commit comments

Comments
 (0)