Class TokenWithJsonContentsSerializer
- java.lang.Object
-
- pl.edu.icm.unity.engine.api.utils.json.TokenWithJsonContentsSerializer
-
- All Implemented Interfaces:
TokenContentsJsonSerializer
,DescribedObject
,NamedObject
public abstract class TokenWithJsonContentsSerializer extends Object implements TokenContentsJsonSerializer
Base for all tokens where contents is storing byte[] serialized JSON. I.e. nearly a copy serializer.- Author:
- P.Piernik
-
-
Constructor Summary
Constructors Constructor Description TokenWithJsonContentsSerializer(String supportedType, String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
String
getName()
com.fasterxml.jackson.databind.JsonNode
toJson(byte[] rawValue)
-
-
-
Method Detail
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceDescribedObject
- Returns:
- human readable description of the object.
-
getName
public String getName()
- Specified by:
getName
in interfaceNamedObject
- Returns:
- human readable name of the object. Must be unique for the object class.
-
toJson
public com.fasterxml.jackson.databind.JsonNode toJson(byte[] rawValue) throws EngineException
- Specified by:
toJson
in interfaceTokenContentsJsonSerializer
- Throws:
EngineException
-
-