Added serializer/deserializer for JSON/XML 63/2363/5
authormsunal <msunal@cisco.com>
Tue, 5 Nov 2013 14:45:55 +0000 (15:45 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 5 Nov 2013 16:12:14 +0000 (16:12 +0000)
commitb5daa3678322a764f9b0e2483f82781f4d39d263
tree41d29aefd36b5a3dbcc2f0697eddac79c31590f7
parent530f16aabf749e45477e8467d73ad0921fc7bb99
Added serializer/deserializer for JSON/XML

- exceptions are translated to rest call response with state code 400 or 500
- imporoved singleton pattern
- tests
- added providers for serialization/deserialization of JSON/XML
- supported rest methods: readData, invokeRpc

Change-Id: I3a888fc1ad9c0ae2364d050e5c67875f9e075337
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Martin Sunal <msunal@cisco.com>
16 files changed:
opendaylight/distribution/opendaylight/pom.xml
opendaylight/md-sal/sal-rest-connector/pom.xml
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfService.java [moved from opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfService.java with 81% similarity]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeProvider.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/RestconfApplication.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToJsonProvider.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToXmlProvider.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlToCompositeNodeProvider.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/BrokerFacade.xtend
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.xtend
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/StructuredData.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/ControllerContextTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/JsonMapperTest.java [deleted file]
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestconfImplTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/XmlProvidersTest.java [new file with mode: 0644]