Merge "Initial implementation of the ClusteredDataStore"
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / rest / impl / JsonToCompositeNodeProvider.java
1 package org.opendaylight.controller.sal.rest.impl;
2
3 import static org.opendaylight.controller.sal.restconf.impl.MediaTypes.API;
4
5 import java.io.IOException;
6 import java.io.InputStream;
7 import java.lang.annotation.Annotation;
8 import java.lang.reflect.Type;
9
10 import javax.ws.rs.Consumes;
11 import javax.ws.rs.WebApplicationException;
12 import javax.ws.rs.core.MediaType;
13 import javax.ws.rs.core.MultivaluedMap;
14 import javax.ws.rs.ext.MessageBodyReader;
15 import javax.ws.rs.ext.Provider;
16
17 import org.opendaylight.controller.sal.rest.api.RestconfService;
18 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
19
20 @Provider
21 @Consumes({API+RestconfService.JSON})
22 public enum JsonToCompositeNodeProvider implements MessageBodyReader<CompositeNode> {
23     INSTANCE;
24
25     @Override
26     public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
27         return true;
28     }
29
30     @Override
31     public CompositeNode readFrom(Class<CompositeNode> type, Type genericType, Annotation[] annotations,
32             MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
33             throws IOException, WebApplicationException {
34         // TODO Auto-generated method stub
35         return null;
36     }
37
38 }