11/*
2- * Copyright 2020 IEXEC BLOCKCHAIN TECH
2+ * Copyright 2020-2024 IEXEC BLOCKCHAIN TECH
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2323import com .iexec .resultproxy .api .ResultProxyClientBuilder ;
2424import com .iexec .worker .feign .CustomCoreFeignClient ;
2525import feign .Logger ;
26+ import lombok .Getter ;
2627import org .springframework .context .annotation .Bean ;
2728import org .springframework .stereotype .Service ;
2829
30+ @ Getter
2931@ Service
3032public class PublicConfigurationService {
3133
@@ -35,41 +37,25 @@ public PublicConfigurationService(CustomCoreFeignClient customCoreFeignClient) {
3537 this .publicConfiguration = customCoreFeignClient .getPublicConfiguration ();
3638 }
3739
38- public PublicConfiguration getPublicConfiguration () {
39- return publicConfiguration ;
40- }
41-
42- public String getBlockchainAdapterUrl () {
43- return publicConfiguration .getBlockchainAdapterUrl ();
44- }
45-
46- public String getWorkerPoolAddress () {
47- return publicConfiguration .getWorkerPoolAddress ();
48- }
49-
5040 public String getSchedulerPublicAddress () {
5141 return publicConfiguration .getSchedulerPublicAddress ();
5242 }
5343
54- public long getAskForReplicatePeriod () {
55- return publicConfiguration .getAskForReplicatePeriod ();
56- }
57-
58- public String getResultRepositoryURL () {
59- return publicConfiguration .getResultRepositoryURL ();
60- }
61-
6244 public String getRequiredWorkerVersion () {
6345 return publicConfiguration .getRequiredWorkerVersion ();
6446 }
6547
6648 @ Bean
6749 public BlockchainAdapterApiClient blockchainAdapterApiClient () {
68- return BlockchainAdapterApiClientBuilder .getInstance (Logger .Level .NONE , getBlockchainAdapterUrl ());
50+ return BlockchainAdapterApiClientBuilder .getInstance (
51+ Logger .Level .NONE ,
52+ publicConfiguration .getBlockchainAdapterUrl ());
6953 }
7054
7155 @ Bean
7256 public ResultProxyClient resultProxyClient () {
73- return ResultProxyClientBuilder .getInstance (Logger .Level .NONE , getResultRepositoryURL ());
57+ return ResultProxyClientBuilder .getInstance (
58+ Logger .Level .NONE ,
59+ publicConfiguration .getResultRepositoryURL ());
7460 }
7561}
0 commit comments