2024-04-01 10:16:19 +02:00
|
|
|
package eu.eudat.service.transformer;
|
2023-12-18 11:55:19 +01:00
|
|
|
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
|
import org.springframework.boot.context.properties.bind.ConstructorBinding;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
2024-04-17 12:54:00 +02:00
|
|
|
@ConfigurationProperties(prefix = "file-transformer")
|
2024-04-01 10:16:19 +02:00
|
|
|
public class FileTransformerProperties {
|
2023-12-18 11:55:19 +01:00
|
|
|
|
|
|
|
private final List<TransformerSource> sources;
|
|
|
|
|
|
|
|
@ConstructorBinding
|
2024-04-01 10:16:19 +02:00
|
|
|
public FileTransformerProperties(List<TransformerSource> sources) {
|
2023-12-18 11:55:19 +01:00
|
|
|
this.sources = sources;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<TransformerSource> getSources() {
|
|
|
|
return sources;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static class TransformerSource {
|
|
|
|
|
|
|
|
private final String url;
|
2024-03-11 14:01:56 +01:00
|
|
|
private final String transformerId;
|
2023-12-18 11:55:19 +01:00
|
|
|
private final String issuerUrl;
|
|
|
|
private final String clientId;
|
|
|
|
private final String clientSecret;
|
|
|
|
private final String scope;
|
|
|
|
|
|
|
|
@ConstructorBinding
|
2024-03-27 17:20:49 +01:00
|
|
|
public TransformerSource(String url, String transformerId, String issuerUrl, String clientId, String clientSecret, String scope) {
|
2023-12-18 11:55:19 +01:00
|
|
|
this.url = url;
|
2024-03-11 14:01:56 +01:00
|
|
|
this.transformerId = transformerId;
|
2023-12-18 11:55:19 +01:00
|
|
|
this.issuerUrl = issuerUrl;
|
|
|
|
this.clientId = clientId;
|
|
|
|
this.clientSecret = clientSecret;
|
|
|
|
this.scope = scope;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUrl() {
|
|
|
|
return url;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getIssuerUrl() {
|
|
|
|
return issuerUrl;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getClientId() {
|
|
|
|
return clientId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getClientSecret() {
|
|
|
|
return clientSecret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getScope() {
|
|
|
|
return scope;
|
|
|
|
}
|
|
|
|
|
2024-03-11 14:01:56 +01:00
|
|
|
public String getTransformerId() {
|
|
|
|
return transformerId;
|
|
|
|
}
|
2023-12-18 11:55:19 +01:00
|
|
|
}
|
|
|
|
}
|