Bug 1003: Restconf - remove whitespace on input
authortpantelis <tpanteli@brocade.com>
Mon, 26 May 2014 05:47:18 +0000 (01:47 -0400)
committertpantelis <tpanteli@brocade.com>
Mon, 26 May 2014 05:47:18 +0000 (01:47 -0400)
commit0c8c9a3054506e09cd8600950a34e934db38b769
tree27ddab52bc1c3e66a614ea27ec3562857f0bde50
parent09cc5108b681a32a52527815767b50a491eaf8fe
Bug 1003: Restconf - remove whitespace on input

JsonReader, XmlReader:
   - Trimmed whitespace on leaf data input

AbsractRpcExecutor, BrokerRpcExecutor, MountPointRpcExecutor:
   - Modified to handle IllegalArgumentEx and UnsupportedOperationEx
     thrown from invokeRpc to throw appropriate ResconfDocumentedEx.

ResconfDocumentedExeptionMapper, RestconfError, RestconfErrorTest:
   - I discovered that the Response.Status.NOT_IMPLEMENTED jaxrs enum
     is defined in the enum class that is used at compile time but
     isn't defined in the run time enum class provided by jersey.
     So I changed RestconfError.ErrorTag to store the integer status
     code (501) instead of the enum. Ideally compile and run time
     should use the same lib.

- SchemaAwareRpcBroker:
   - Modified to throw UnsupportedOperationEx if no RPC impl is found
     so the restconf front-end can yield the appropriate
     501 (Not Implemented) status code.

Change-Id: Ibfa1dc7ff1526b6d352b9f4e6be2aae0d19ab655
Signed-off-by: tpantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonReader.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/RestconfDocumentedExceptionMapper.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlReader.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfError.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/rpc/impl/AbstractRpcExecutor.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/rpc/impl/BrokerRpcExecutor.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/rpc/impl/MountPointRpcExecutor.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestconfErrorTest.java