public interface InputTranslatable extends Inputable
InputableFormatUnsupportedException will pass control over to the internal
handlers for formatting, if you want to stop the request for this format type entirely then
throw an IllegalStateException and the processing will be haltedALL_KNOWN_FORMATS, ATOM, ATOM_EXTENSIONS, ATOM_MIME_TYPE, FORM, FORM_EXTENSIONS, FORM_MIME_TYPE, HTML, HTML_EXTENSIONS, HTML_MIME_TYPE, JSON, JSON_EXTENSIONS, JSON_MIME_TYPE, JSONP, JSONP_EXTENSIONS, JSONP_MIME_TYPE, RSS, RSS_EXTENSIONS, RSS_MIME_TYPE, TXT, TXT_EXTENSIONS, TXT_MIME_TYPE, UTF_8, XML, XML_EXTENSIONS, XML_MIME_TYPE| Modifier and Type | Method and Description |
|---|---|
Object |
translateFormattedData(EntityReference ref,
String format,
InputStream input,
Map<String,Object> params)
Translates the input data stream in the supplied format into an entity object for this reference
|
getHandledInputFormatsgetSampleEntitygetEntityPrefixObject translateFormattedData(EntityReference ref, String format, InputStream input, Map<String,Object> params)
ref - the parsed reference object which uniquely represents this entityformat - a string constant indicating the extension format (from Formats)
of the input, (example: Formats.XML)input - an stream which contains the data to make up this entity,
you may assume this is UTF-8 encoded if you don't know anything else about itparams - (optional) incoming set of parameters which may be used to send data specific to this request, may be nullFormatUnsupportedException - if you do not handle this format type (passes control to the internal handlers)EntityEncodingException - if you cannot encode the received data into an entityIllegalArgumentException - if any of the arguments are invalidIllegalStateException - for all other failuresCopyright © 2023. All rights reserved.