Package org.ametys.plugins.core.ui.help
Class HelpSerializer
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializer<T>
-
- com.fasterxml.jackson.databind.ser.std.StdSerializer<HelpLink>
-
- org.ametys.plugins.core.ui.help.HelpSerializer
-
- All Implemented Interfaces:
JsonFormatVisitable
,SchemaAware
,Serializable
,LogEnabled
,Component
,Contextualizable
,Serviceable
public class HelpSerializer extends StdSerializer<HelpLink> implements Component, Serviceable, LogEnabled, Contextualizable
Serializer forHelpLink
objects. Returns the help url for the right language, 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 Context
_context
private HelpManager
_helpManager
private org.slf4j.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 HelpSerializer()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private List<String>
_getLanguages(Request request)
void
contextualize(Context context)
void
serialize(HelpLink value, JsonGenerator gen, SerializerProvider provider)
void
service(ServiceManager manager)
void
setLogger(org.slf4j.Logger logger)
Called at creation time to provide aLogger
.-
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
-
-
-
-
Field Detail
-
_logger
private org.slf4j.Logger _logger
-
_helpManager
private HelpManager _helpManager
-
-
Constructor Detail
-
HelpSerializer
public HelpSerializer()
Constructor
-
-
Method Detail
-
serialize
public void serialize(HelpLink value, JsonGenerator gen, SerializerProvider provider) throws IOException
- Specified by:
serialize
in classStdSerializer<HelpLink>
- Throws:
IOException
-
setLogger
public void setLogger(org.slf4j.Logger logger)
Description copied from interface:LogEnabled
Called at creation time to provide aLogger
.- Specified by:
setLogger
in interfaceLogEnabled
- Parameters:
logger
- aLogger
for messages.
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
_getLanguages
private List<String> _getLanguages(Request request)
-
-