Details
-
New Feature
-
Status: Closed
-
Must
-
Resolution: Won't Fix
-
None
-
None
-
Medium
-
2016-11-29 Platform 2.1.0
Description
ComplexObsHandler interface needs to support complex data encoded as text, this makes it possible to submit complex Obs data via text based transfer channels. A use case for this is to be able to submit a complex Obs via REST which only accepts JSON and XML text.
Dev Notes
- Add the new method below to ComplexObsHandler interface
default Obs setComplexData(Obs obs, Object data) { return o;// subclasses should implement this method }
- The data is assumed to be uuencoded, Java has the UUDecoder class that you can use.
- Update the handlers in core i.e ImageHandler, MediaHandler and BinaryDataHandler to implement this method which will decode and convert the passed in text data to its actual representation, the BinaryDataHandler handler handles data submitted as an InputStream or a byte array but we can skip dealing with InputStreams for this ticket and assume the encoded text has to be converted to a byte array. You could possibly introduce a base class that implements setComplexData(Obs obs, Object data) that is extended by these handlers to centralize the decoding logic.
Gliffy Diagrams
Attachments
Issue Links
- is depended on by
-
RESTWS-297 Implement support for complex obs
-
- Closed
-
- is related to
-
RESTWS-641 Support mime-type when posting complex obs
-
- Closed
-
-
TRUNK-5020 Make ComplexData support streams
-
- Ready for Work
-
- links to
(2 mentioned in)