@Provider public class FlexRequestEntityDecoder extends JsonDecoder
Flex request body object decoder
Constructor and Description |
---|
FlexRequestEntityDecoder() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<MediaType> |
createSupportedMediaTypes()
${services_rest_decoders_JsonDecoder_method_createSupportedMediaTypes_Title}
|
java.lang.String |
getJsonString(java.lang.String sourceString)
Gets the JSON string.
|
java.lang.Object |
readFrom(java.lang.Class<java.lang.Object> arg0, java.lang.reflect.Type arg1, java.lang.annotation.Annotation[] arg2, javax.ws.rs.core.MediaType arg3, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> arg4, java.io.InputStream arg5)
The request body is deserialized into Java objects.
|
java.util.List |
toList(java.lang.String text, java.lang.Class elementClass)
${services_rest_decoders_JsonDecoder_method_toList_Title}
|
java.util.Map<java.lang.String,java.lang.Object> |
toMap(java.lang.String str, java.util.Map<java.lang.String,java.lang.Class> nameClassMapping)
${services_rest_decoders_JsonDecoder_method_toMap_Title}
|
java.lang.Object |
toObject(java.lang.String jsonStr, java.lang.Class cl)
${services_rest_decoders_JsonDecoder_method_toObject_Title}
|
java.util.Set |
toSet(java.lang.String text, java.lang.Class elementClass)
${services_rest_decoders_JsonDecoder_method_toSet_Title}
|
addResolvers, addTypeRestrict, isReadable, toArray
getSupportedMediaTypes, isDecoderAllow
protected java.util.List<MediaType> createSupportedMediaTypes()
JsonDecoder
${services_rest_decoders_JsonDecoder_method_createSupportedMediaTypes_Title}
${services_rest_decoders_JsonDecoder_method_createSupportedMediaTypes_Description}
createSupportedMediaTypes
in class JsonDecoder
public java.util.List toList(java.lang.String text, java.lang.Class elementClass) throws JSONException
JsonDecoder
${services_rest_decoders_JsonDecoder_method_toList_Title}
${services_rest_decoders_JsonDecoder_method_toList_Description}
toList
in class JsonDecoder
text
- ${services_rest_decoders_JsonDecoder_method_toList_param_text}elementClass
- ${services_rest_decoders_JsonDecoder_method_toList_param_elementClass}JSONException
- ${services_rest_decoders_JsonDecoder_method_toList_throws_Exception}public java.util.Map<java.lang.String,java.lang.Object> toMap(java.lang.String str, java.util.Map<java.lang.String,java.lang.Class> nameClassMapping)
JsonDecoder
${services_rest_decoders_JsonDecoder_method_toMap_Title}
${services_rest_decoders_JsonDecoder_method_toMap_Description}
toMap
in class JsonDecoder
str
- ${services_rest_decoders_JsonDecoder_method_toMap_param_str}nameClassMapping
- java.util.Map mapping set. Where the key is the field name and the value is the type of the field.public java.lang.Object toObject(java.lang.String jsonStr, java.lang.Class cl) throws JSONException
JsonDecoder
${services_rest_decoders_JsonDecoder_method_toObject_Title}
${services_rest_decoders_JsonDecoder_method_toObject_Description}
toObject
in class JsonDecoder
jsonStr
- ${services_rest_decoders_JsonDecoder_method_toObject_param_jsonStr}cl
- ${services_rest_decoders_JsonDecoder_method_toObject_param_targetClass}JSONException
public java.util.Set toSet(java.lang.String text, java.lang.Class elementClass) throws JSONException
JsonDecoder
${services_rest_decoders_JsonDecoder_method_toSet_Title}
${services_rest_decoders_JsonDecoder_method_toSet_Description}
toSet
in class JsonDecoder
text
- ${services_rest_decoders_JsonDecoder_method_toSet_param_text}elementClass
- ${services_rest_decoders_JsonDecoder_method_toSet_param_elementClass}JSONException
- ${services_rest_decoders_JsonDecoder_method_toSet_throws_Exception}public java.lang.String getJsonString(java.lang.String sourceString)
Gets the JSON string.
sourceString
- Source string.public java.lang.Object readFrom(java.lang.Class<java.lang.Object> arg0, java.lang.reflect.Type arg1, java.lang.annotation.Annotation[] arg2, javax.ws.rs.core.MediaType arg3, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> arg4, java.io.InputStream arg5) throws java.io.IOException, javax.ws.rs.WebApplicationException
The request body is deserialized into Java objects.
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<java.lang.Object>
readFrom
in class JsonDecoder
arg0
- A class of descrambled Java objects.arg1
- The type of the Java object that is deserialized.arg2
- Mark.arg3
- media type.arg4
- Request body form.arg5
- Request body stream.java.io.IOException
- IO abnormal.javax.ws.rs.WebApplicationException
- Web Application exception.