Package org.oxerr.jackson.module.jsr250
Class Jsr250JsonSerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<T>
com.fasterxml.jackson.databind.ser.std.StdSerializer<Object>
com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
com.fasterxml.jackson.databind.ser.BeanSerializer
org.oxerr.jackson.module.jsr250.Jsr250JsonSerializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
,com.fasterxml.jackson.databind.jsonschema.SchemaAware
,com.fasterxml.jackson.databind.ser.ContextualSerializer
,com.fasterxml.jackson.databind.ser.ResolvableSerializer
,Serializable
public class Jsr250JsonSerializer
extends com.fasterxml.jackson.databind.ser.BeanSerializer
Excludes the properties that are
DenyAll
or not RolesAllowed
from the serialization output.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None
-
Field Summary
Modifier and TypeFieldDescriptionprivate org.apache.logging.log4j.Logger
private static final long
Fields inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
_anyGetterWriter, _beanType, _filteredProps, _objectIdWriter, _propertyFilterId, _props, _serializationShape, _typeId, NAME_FOR_OBJECT_REF, NO_PROPS
Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_handledType
-
Constructor Summary
ConstructorDescriptionJsr250JsonSerializer
(com.fasterxml.jackson.databind.ser.BeanSerializer serializer) -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<? extends org.springframework.security.core.GrantedAuthority>
protected boolean
isAllowed
(String[] rolesAllowed, Collection<? extends org.springframework.security.core.GrantedAuthority> grantedAuthorities) private void
protected void
serializeFields
(Object bean, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) Methods inherited from class com.fasterxml.jackson.databind.ser.BeanSerializer
asArraySerializer, createDummy, createDummy, serialize, toString, unwrappingSerializer, withByNameInclusion, withFilterId, withObjectIdWriter, withProperties
Methods inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
_customTypeId, _serializeObjectId, _serializeWithObjectId, _serializeWithObjectId, _typeIdDef, acceptJsonFormatVisitor, createContextual, findConvertingSerializer, getSchema, properties, resolve, serializeFieldsFiltered, serializeWithType, usesObjectId, withIgnorals, withIgnorals
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, 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, replaceDelegatee
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.fasterxml.jackson.databind.jsonschema.SchemaAware
getSchema
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
log
private transient org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
Jsr250JsonSerializer
public Jsr250JsonSerializer(com.fasterxml.jackson.databind.ser.BeanSerializer serializer)
-
-
Method Details
-
serializeFields
protected void serializeFields(Object bean, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException, com.fasterxml.jackson.core.JsonGenerationException - Overrides:
serializeFields
in classcom.fasterxml.jackson.databind.ser.std.BeanSerializerBase
- Throws:
IOException
com.fasterxml.jackson.core.JsonGenerationException
-
isAllowed
protected boolean isAllowed(String[] rolesAllowed, Collection<? extends org.springframework.security.core.GrantedAuthority> grantedAuthorities) -
getGrantedAuthorities
protected Collection<? extends org.springframework.security.core.GrantedAuthority> getGrantedAuthorities() -
readObject
- Throws:
IOException
ClassNotFoundException
-