Bug 1010: Implement restconf error responses 25/7125/11
authortpantelis <tpanteli@brocade.com>
Thu, 8 May 2014 18:25:02 +0000 (14:25 -0400)
committerTony Tkacik <ttkacik@cisco.com>
Tue, 27 May 2014 14:57:24 +0000 (16:57 +0200)
- RestconfError (new): encapsulates error information as defined in the
  RESTCON RFC.

- RestconfDocumentedException (new): exception that wraps RestconError info.

- RestconfDocumentedExceptionMapper (new): JAX-RS ExceptionMapper that
  translates a RestconfDocumentedException appropriately to XML or
  JSON depending on the user's mime type.

- JsonMapper: modified to handle null child schema as restconf error-info
  is defined as 'anyxml' and thus no schema may be present.

- ControllerContext: added getRestconfModuleErrorsSchemaNode method to
  obtain the 'errors' container schema from the ietf-restconf module.

- Removed ResponseException and changed occurrences in various classes that
  threw ResponseException to throw RestconfDocumentedException instead.

- Added unit tests for new classes and modified existing ones
  accordingly.

Change-Id: Idbe6f6cae9b40ba14701ee05dfadfdd51e961c6b
Signed-off-by: tpantelis <tpanteli@brocade.com>

No differences found