Class JsonReaderOData
java.lang.Object
de.fraunhofer.iosb.ilt.frostserver.plugin.odata.deserialize.JsonReaderOData
- All Implemented Interfaces:
JsonReader
Allows parsing of STA entities from JSON. Fails on unknown properties in the
JSON input!
- Author:
- jab
-
Constructor Summary
ConstructorsConstructorDescriptionJsonReaderOData(de.fraunhofer.iosb.ilt.frostserver.model.ModelRegistry modelRegistry) Create a non-admin JsonReader.JsonReaderOData(de.fraunhofer.iosb.ilt.frostserver.model.ModelRegistry modelRegistry, boolean isAdmin) Create a JsonReader.JsonReaderOData(de.fraunhofer.iosb.ilt.frostserver.model.ModelRegistry modelRegistry, PrincipalExtended user) Create a JsonReader. -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.ObjectMapperde.fraunhofer.iosb.ilt.frostserver.model.core.EntityparseEntity(de.fraunhofer.iosb.ilt.frostserver.model.EntityType entityType, Reader value) de.fraunhofer.iosb.ilt.frostserver.model.core.EntityparseEntity(de.fraunhofer.iosb.ilt.frostserver.model.EntityType entityType, String value) <T> TparseObject(com.fasterxml.jackson.core.type.TypeReference<T> typeReference, Reader value) <T> TparseObject(com.fasterxml.jackson.core.type.TypeReference<T> typeReference, String value) <T> TparseObject(Class<T> clazz, Reader value) <T> TparseObject(Class<T> clazz, String value)
-
Constructor Details
-
JsonReaderOData
public JsonReaderOData(de.fraunhofer.iosb.ilt.frostserver.model.ModelRegistry modelRegistry) Create a non-admin JsonReader.- Parameters:
modelRegistry- the model registry to create the json reader for.
-
JsonReaderOData
public JsonReaderOData(de.fraunhofer.iosb.ilt.frostserver.model.ModelRegistry modelRegistry, PrincipalExtended user) Create a JsonReader.- Parameters:
modelRegistry- the model registry to create the json reader for.user- the user to create the reader for.
-
JsonReaderOData
public JsonReaderOData(de.fraunhofer.iosb.ilt.frostserver.model.ModelRegistry modelRegistry, boolean isAdmin) Create a JsonReader.- Parameters:
modelRegistry- the model registry to create the json reader for.isAdmin- flag indicating if the user is an admin.
-
-
Method Details
-
getMapper
public com.fasterxml.jackson.databind.ObjectMapper getMapper()- Specified by:
getMapperin interfaceJsonReader
-
parseEntity
public de.fraunhofer.iosb.ilt.frostserver.model.core.Entity parseEntity(de.fraunhofer.iosb.ilt.frostserver.model.EntityType entityType, String value) throws IOException - Specified by:
parseEntityin interfaceJsonReader- Throws:
IOException
-
parseEntity
public de.fraunhofer.iosb.ilt.frostserver.model.core.Entity parseEntity(de.fraunhofer.iosb.ilt.frostserver.model.EntityType entityType, Reader value) throws IOException - Specified by:
parseEntityin interfaceJsonReader- Throws:
IOException
-
parseObject
- Throws:
IOException
-
parseObject
- Throws:
IOException
-
parseObject
public <T> T parseObject(com.fasterxml.jackson.core.type.TypeReference<T> typeReference, String value) throws IOException - Throws:
IOException
-
parseObject
public <T> T parseObject(com.fasterxml.jackson.core.type.TypeReference<T> typeReference, Reader value) throws IOException - Throws:
IOException
-