Class MapAccessor

java.lang.Object
ognl.MapPropertyAccessor
org.chenile.stm.ognl.MapAccessor
All Implemented Interfaces:
ognl.PropertyAccessor

public class MapAccessor extends ognl.MapPropertyAccessor
Allows Ognl to support an object that is a map with a few properties defined like normal java beans. The out of the box MapPropertyAccessor does not support java bean style access. Ex: public class Foo extends HashMap { private String bar; // getters and setters for bar. } In this case, MapPropertyAccessor cannot set or get values to bar since it is defined as a normal bean property. This class helps out and leverages both the functionalities of the MapPropertyAccessor and ObjectPropertyAccessor.
Author:
raja
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • opa

      protected static ognl.ObjectPropertyAccessor opa
  • Constructor Details

    • MapAccessor

      public MapAccessor()
  • Method Details

    • getProperty

      public Object getProperty(Map context, Object target, Object name) throws ognl.OgnlException
      Specified by:
      getProperty in interface ognl.PropertyAccessor
      Overrides:
      getProperty in class ognl.MapPropertyAccessor
      Throws:
      ognl.OgnlException
    • setProperty

      public void setProperty(Map context, Object target, Object name, Object value) throws ognl.OgnlException
      Map context, Object target, Object name, Object value
      Specified by:
      setProperty in interface ognl.PropertyAccessor
      Overrides:
      setProperty in class ognl.MapPropertyAccessor
      Throws:
      ognl.OgnlException