Package org.ametys.core.util
Class I18nizableTextSerializer
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializer<T>
-
- com.fasterxml.jackson.databind.ser.std.StdSerializer<I18nizableText>
-
- org.ametys.core.util.I18nizableTextSerializer
-
- All Implemented Interfaces:
JsonFormatVisitable
,SchemaAware
,Serializable
,Component
,LogEnabled
,Serviceable
public class I18nizableTextSerializer extends StdSerializer<I18nizableText> implements Component, Serviceable, LogEnabled
Serializer forI18nizableText
objects. Returns the translated message for JSON value.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
JsonSerializer.None
-
-
Field Summary
Fields Modifier and Type Field Description private I18nUtils
_i18nUtils
private Logger
_logger
static String
ROLE
The Avalon Role-
Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_handledType
-
-
Constructor Summary
Constructors Constructor Description I18nizableTextSerializer()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enableLogging(Logger logger)
void
serialize(I18nizableText value, JsonGenerator jgen, SerializerProvider provider)
void
service(ServiceManager manager)
-
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
-
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId
-
-
-
-
Constructor Detail
-
I18nizableTextSerializer
public I18nizableTextSerializer()
Constructor
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
enableLogging
public void enableLogging(Logger logger)
- Specified by:
enableLogging
in interfaceLogEnabled
-
serialize
public void serialize(I18nizableText value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException
- Specified by:
serialize
in classStdSerializer<I18nizableText>
- Throws:
IOException
JsonGenerationException
-
-