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.Delegating

    Nested 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

    delegate

    Fields inherited from class com.fasterxml.jackson.databind.deser.SettableBeanProperty

    _contextAnnotations, _managedReferenceName, _nullProvider, _objectIdInfo, _propertyIndex, _propName, _type, _valueDeserializer, _valueTypeDeserializer, _viewMatcher, _wrapperName, MISSING_VALUE_DESERIALIZER

    Fields inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase

    _aliases, _metadata

    Fields inherited from interface com.fasterxml.jackson.databind.BeanProperty

    EMPTY_FORMAT, EMPTY_INCLUDE
  • Constructor Summary

    Constructors
    Constructor
    Description
    AuthorizingSettableBeanProperty(com.fasterxml.jackson.databind.deser.SettableBeanProperty delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deserializeAndSet(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.SettableBeanProperty
    withDelegate(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, withValueDeserializer

    Methods 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, withSimpleName

    Methods inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase

    findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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:
      withDelegate in class com.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:
      deserializeAndSet in class com.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:
      deserializeSetAndReturn in class com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
      Throws:
      IOException