Clover icon

sunshower-sdk

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

File CachingJAXBContextAwareMOxyJSONProvider.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart6.png
21% of files have more coverage

Code metrics

0
3
2
1
43
36
2
0.67
1.5
2
1

Classes

Class Line # Actions
CachingJAXBContextAwareMOxyJSONProvider 26 3 2
0.660%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.sdk.common.jaxb;
2   
3    import io.sunshower.service.serialization.DynamicResolvingMoxyJsonProvider;
4    import org.eclipse.persistence.jaxb.rs.MOXyJsonProvider;
5   
6    import javax.ws.rs.Consumes;
7    import javax.ws.rs.Produces;
8    import javax.ws.rs.core.MediaType;
9    import javax.ws.rs.core.MultivaluedMap;
10    import javax.ws.rs.ext.Providers;
11    import javax.xml.bind.JAXBContext;
12    import javax.xml.bind.JAXBException;
13    import java.lang.annotation.Annotation;
14    import java.util.Set;
15   
16   
17    @Produces({
18    MediaType.APPLICATION_JSON,
19    MediaType.WILDCARD,
20    "application/x-javascript"
21    })
22    @Consumes({
23    MediaType.APPLICATION_JSON,
24    MediaType.WILDCARD
25    })
 
26    public class CachingJAXBContextAwareMOxyJSONProvider extends DynamicResolvingMoxyJsonProvider {
27   
 
28  6 toggle public CachingJAXBContextAwareMOxyJSONProvider(Providers providers) {
29  6 super(providers);
30  6 this.setWrapperAsArrayName(true);
31    }
32   
33   
 
34  0 toggle @Override
35    public JAXBContext getJAXBContext(
36    Set<Class<?>> domainClasses,
37    Annotation[] annotations,
38    MediaType mediaType,
39    MultivaluedMap<String, ?> httpHeaders
40    ) throws JAXBException {
41  0 return super.getJAXBContext(domainClasses, annotations, mediaType, httpHeaders);
42    }
43    }