Clover icon

sunshower-sdk

  1. Project Clover database Wed Apr 4 2018 21:39:43 UTC
  2. Package io.sunshower.sdk.v1

File SdkConfiguration.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
12
12
1
101
81
12
1
1
12
1

Classes

Class Line # Actions
SdkConfiguration 34 12 12
0.916666791.7%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.sdk.v1;
2   
3    import io.sunshower.kernel.api.PluginManager;
4    import io.sunshower.sdk.common.jaxb.CachingJAXBContextAwareMOxyJSONProvider;
5    import io.sunshower.sdk.common.jaxb.DefaultJAXBContextResolver;
6    import io.sunshower.sdk.core.ActivationEndpoint;
7    import io.sunshower.sdk.core.IdentifierEndpoint;
8    import io.sunshower.sdk.core.model.Extensions;
9    import io.sunshower.sdk.kernel.DefaultExtensionEndpoint;
10    import io.sunshower.sdk.kernel.ExtensionEndpoint;
11    import io.sunshower.sdk.v1.core.FlakeIdentifierEndpoint;
12    import io.sunshower.sdk.v1.core.OctetStreamWriter;
13    import io.sunshower.sdk.v1.core.security.DefaultActivationEndpoint;
14    import io.sunshower.sdk.v1.core.security.DefaultSecurityEndpoint;
15    import io.sunshower.sdk.v1.core.security.DefaultSignupEndpoint;
16    import io.sunshower.sdk.v1.core.security.DefaultUserEndpoint;
17    import io.sunshower.sdk.v1.endpoints.core.security.SecurityEndpoint;
18    import io.sunshower.sdk.v1.endpoints.core.security.SignupEndpoint;
19    import io.sunshower.sdk.v1.endpoints.core.security.UserEndpoint;
20    import io.sunshower.service.serialization.DynamicJaxrsProviders;
21    import io.sunshower.service.serialization.DynamicResolvingMoxyJsonProvider;
22    import org.eclipse.persistence.jaxb.rs.MOXyJsonProvider;
23    import org.springframework.context.annotation.Bean;
24    import org.springframework.context.annotation.Configuration;
25    import org.springframework.context.annotation.Import;
26    import org.springframework.context.annotation.Primary;
27   
28    import javax.naming.InitialContext;
29    import javax.naming.NamingException;
30   
31   
32    @Configuration
33    @Import(MappingConfiguration.class)
 
34    public class SdkConfiguration {
35   
 
36  6 toggle @Bean
37    public ExtensionEndpoint extensionEndpoint() {
38  6 return new DefaultExtensionEndpoint();
39    }
40   
 
41  6 toggle @Bean
42    public Extensions extensionsTransformer() {
43  6 return new Extensions() {
44    };
45    }
46   
 
47  0 toggle @Bean
48    public PluginManager pluginManager() throws NamingException {
49  0 return InitialContext.doLookup("java:global/sunshower/kernel/plugin-manager");
50    }
51   
 
52  6 toggle @Bean
53    public ActivationEndpoint activationEndpoint() {
54  6 return new DefaultActivationEndpoint();
55    }
56   
 
57  6 toggle @Bean
58    public OctetStreamWriter octetStreamWriter() {
59  6 return new OctetStreamWriter();
60    }
61   
62   
 
63  6 toggle @Bean
64    public IdentifierEndpoint identifierEndpoint() {
65  6 return new FlakeIdentifierEndpoint();
66    }
67   
68   
 
69  6 toggle @Bean
70    public UserEndpoint userEndpoint() {
71  6 return new DefaultUserEndpoint();
72    }
73   
 
74  6 toggle @Bean
75    public SignupEndpoint signupEndpoint() {
76  6 return new DefaultSignupEndpoint();
77    }
78   
 
79  6 toggle @Bean
80    public SecurityEndpoint securityEndpoint() {
81  6 return new DefaultSecurityEndpoint();
82    }
83   
84   
 
85  6 toggle @Bean
86    public ExceptionMappings exceptionMappings() {
87  6 return new ExceptionMappings();
88    }
89   
 
90  6 toggle @Bean
91    @Primary
92    public DynamicResolvingMoxyJsonProvider configurableMoxyJsonProvider(DynamicJaxrsProviders providers) {
93  6 return new CachingJAXBContextAwareMOxyJSONProvider(providers);
94    }
95   
 
96  6 toggle @Bean
97    public DefaultJAXBContextResolver jaxbContextResolver(final MOXyJsonProvider provider) {
98  6 return new DefaultJAXBContextResolver(((CachingJAXBContextAwareMOxyJSONProvider) provider));
99    }
100   
101    }