View Javadoc
1   package org.kuali.common.devops.dnsme;
2   
3   import org.kuali.common.dns.dnsme.URLS;
4   import org.kuali.common.dns.dnsme.model.DNSMadeEasyCredentials;
5   import org.kuali.common.dns.dnsme.model.DNSMadeEasyServiceContext;
6   import org.kuali.common.dns.dnsme.spring.DNSMEServiceContextConfig;
7   import org.kuali.common.dns.dnsme.spring.DNSMadeEasyUtils;
8   import org.kuali.common.dns.spring.DomainNameConfig;
9   import org.kuali.common.util.spring.env.EnvironmentService;
10  import org.kuali.common.util.spring.service.SpringServiceConfig;
11  import org.springframework.beans.factory.annotation.Autowired;
12  import org.springframework.context.annotation.Bean;
13  import org.springframework.context.annotation.Configuration;
14  import org.springframework.context.annotation.Import;
15  
16  @Configuration
17  @Import({ SpringServiceConfig.class })
18  public class ProductionDNSMEContextConfig implements DNSMEServiceContextConfig {
19  
20  	@Autowired
21  	EnvironmentService env;
22  
23  	@Autowired
24  	DomainNameConfig config;
25  
26  	@Override
27  	@Bean
28  	public DNSMadeEasyServiceContext dnsMadeEasyServiceContext() {
29  		DNSMadeEasyCredentials encrypted = EncryptedDNSMECredentials.PRODUCTION.getCredentials();
30  		String restApiURL = URLS.PRODUCTION;
31  		return DNSMadeEasyUtils.getServiceContext(env, restApiURL, config.domainName(), encrypted);
32  	}
33  
34  }