Class AuthorizingSettableBeanProperty
java.lang.Object
com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
com.fasterxml.jackson.databind.deser.SettableBeanProperty
com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
org.apache.struts2.rest.handler.jackson.AuthorizingSettableBeanProperty
- All Implemented Interfaces:
com.fasterxml.jackson.databind.BeanProperty,com.fasterxml.jackson.databind.util.Named,Serializable
public class AuthorizingSettableBeanProperty
extends com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
A
SettableBeanProperty.Delegating that authorizes each property against the
ParameterAuthorizationContext before delegating to the underlying property's
deserializeAndSet. Unauthorized properties are silently dropped — the JSON value is
skipped via JsonParser.skipChildren(), so any nested object graph is never instantiated
and setter side effects on unauthorized properties never fire.
Path tracking: the wrapper pushes the full path of the current property onto the context's
path stack before delegating, then pops in a finally block. For collection / map / array-typed
properties, the path pushed is suffixed with [0] so nested element members produce paths like
items[0].field — matching ParametersInterceptor depth semantics.
When ParameterAuthorizationContext.isActive() is false, this wrapper is a
straight pass-through to the delegate — no overhead for default-config requests.
- Since:
- 7.2.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.deser.SettableBeanProperty
com.fasterxml.jackson.databind.deser.SettableBeanProperty.DelegatingNested classes/interfaces inherited from interface com.fasterxml.jackson.databind.BeanProperty
com.fasterxml.jackson.databind.BeanProperty.Bogus, com.fasterxml.jackson.databind.BeanProperty.Std -
Field Summary
Fields inherited from class com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
delegateFields inherited from class com.fasterxml.jackson.databind.deser.SettableBeanProperty
_contextAnnotations, _managedReferenceName, _nullProvider, _objectIdInfo, _propertyIndex, _propName, _type, _valueDeserializer, _valueTypeDeserializer, _viewMatcher, _wrapperName, MISSING_VALUE_DESERIALIZERFields inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
_aliases, _metadataFields inherited from interface com.fasterxml.jackson.databind.BeanProperty
EMPTY_FORMAT, EMPTY_INCLUDE -
Constructor Summary
ConstructorsConstructorDescriptionAuthorizingSettableBeanProperty(com.fasterxml.jackson.databind.deser.SettableBeanProperty delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserializeAndSet(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, Object instance) deserializeSetAndReturn(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, Object instance) protected com.fasterxml.jackson.databind.deser.SettableBeanPropertywithDelegate(com.fasterxml.jackson.databind.deser.SettableBeanProperty d) Methods inherited from class com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
_with, assignIndex, fixAccess, getAnnotation, getCreatorIndex, getDeclaringClass, getDelegate, getInjectableValueId, getManagedReferenceName, getMember, getObjectIdInfo, getPropertyIndex, getValueDeserializer, getValueTypeDeserializer, hasValueDeserializer, hasValueTypeDeserializer, hasViews, isInjectionOnly, set, setAndReturn, visibleInView, withName, withNullProvider, withValueDeserializerMethods inherited from class com.fasterxml.jackson.databind.deser.SettableBeanProperty
_throwAsIOE, _throwAsIOE, _throwAsIOE, _throwAsIOE, depositSchemaProperty, deserialize, deserializeWith, getContextAnnotation, getFullName, getInjectionDefinition, getName, getNullValueProvider, getType, getWrapperName, isIgnorable, isMerging, markAsIgnorable, setManagedReferenceName, setObjectIdInfo, setViews, toString, unwrapped, withSimpleNameMethods inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual
-
Constructor Details
-
AuthorizingSettableBeanProperty
public AuthorizingSettableBeanProperty(com.fasterxml.jackson.databind.deser.SettableBeanProperty delegate)
-
-
Method Details
-
withDelegate
protected com.fasterxml.jackson.databind.deser.SettableBeanProperty withDelegate(com.fasterxml.jackson.databind.deser.SettableBeanProperty d) - Specified by:
withDelegatein classcom.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
-
deserializeAndSet
public void deserializeAndSet(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, Object instance) throws IOException - Overrides:
deserializeAndSetin classcom.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating- Throws:
IOException
-
deserializeSetAndReturn
public Object deserializeSetAndReturn(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, Object instance) throws IOException - Overrides:
deserializeSetAndReturnin classcom.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating- Throws:
IOException
-