-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into DATAGO-77753-enable-json-log
- Loading branch information
Showing
39 changed files
with
904 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...src/main/java/com/solace/maas/ep/common/model/EventBrokerAuthenticationConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package com.solace.maas.ep.common.model; | ||
|
||
|
||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class EventBrokerAuthenticationConfiguration { | ||
private String type; | ||
private String protocol; | ||
@NotNull | ||
@Valid | ||
private EventBrokerCredentialConfiguration credential; | ||
} |
10 changes: 10 additions & 0 deletions
10
...ion/src/main/java/com/solace/maas/ep/common/model/EventBrokerConnectionConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
package com.solace.maas.ep.common.model; | ||
|
||
|
||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class EventBrokerConnectionConfiguration { | ||
|
||
@NotBlank | ||
private String msgVpn; | ||
|
||
private String sempPageSize; | ||
@NotNull | ||
@Valid | ||
private EventBrokerAuthenticationConfiguration authentication; | ||
@NotBlank | ||
private String name; | ||
@NotBlank | ||
private String url; | ||
} |
3 changes: 3 additions & 0 deletions
3
...ion/src/main/java/com/solace/maas/ep/common/model/EventBrokerCredentialConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
package com.solace.maas.ep.common.model; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class EventBrokerCredentialConfiguration { | ||
@NotBlank | ||
private String userName; | ||
@NotBlank | ||
private String password; | ||
} |
11 changes: 9 additions & 2 deletions
11
...ation/src/main/java/com/solace/maas/ep/common/model/EventBrokerResourceConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
package com.solace.maas.ep.common.model; | ||
|
||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class EventBrokerResourceConfiguration extends ResourceConfiguration { | ||
@NotBlank | ||
private String id; | ||
private String brokerType; | ||
@NotBlank | ||
private String name; | ||
private List<EventBrokerConnectionConfiguration> connections; | ||
@NotEmpty | ||
private List<@Valid EventBrokerConnectionConfiguration> connections; | ||
@NotNull | ||
private ResourceConfigurationType resourceConfigurationType; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...c/main/java/com/solace/maas/ep/event/management/agent/config/ValidationConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.solace.maas.ep.event.management.agent.config; | ||
|
||
import jakarta.validation.Validator; | ||
import org.springframework.boot.validation.MessageInterpolatorFactory; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.core.env.Environment; | ||
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; | ||
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor; | ||
|
||
@Configuration | ||
public class ValidationConfiguration { | ||
|
||
@Bean | ||
public static LocalValidatorFactoryBean defaultValidator() { | ||
LocalValidatorFactoryBean factoryBean = new LocalValidatorFactoryBean(); | ||
MessageInterpolatorFactory interpolatorFactory = new MessageInterpolatorFactory(); | ||
factoryBean.setMessageInterpolator(interpolatorFactory.getObject()); | ||
return factoryBean; | ||
} | ||
|
||
@Bean | ||
public static MethodValidationPostProcessor methodValidationPostProcessor(Environment environment, Validator validator) { | ||
MethodValidationPostProcessor processor = new MethodValidationPostProcessor(); | ||
boolean proxyTargetClass = environment.getProperty("spring.aop.proxy-target-class", Boolean.class, true); | ||
processor.setProxyTargetClass(proxyTargetClass); | ||
processor.setValidator(validator); | ||
return processor; | ||
} | ||
} |
Oops, something went wrong.