Class StandaloneBeanContext

  • All Implemented Interfaces:
    org.smooks.api.bean.context.BeanContext

    public class StandaloneBeanContext
    extends Object
    implements org.smooks.api.bean.context.BeanContext
    • Constructor Detail

      • StandaloneBeanContext

        public StandaloneBeanContext​(org.smooks.api.ExecutionContext executionContext,
                                     org.smooks.api.bean.context.BeanIdStore beanIdStore,
                                     Map<String,​Object> beanMap)
        Create the StandAloneBeanContext
        Parameters:
        executionContext - The ExecutionContext to which this object is bound to.
        beanIdStore - The BeanIdStore to which this object is bound to.
        beanMap - The Map in which the bean's will be set. It is important not to modify this map outside of the BeanRepository! It is only provided as constructor parameter because in some situations we need to control which Map is used.
    • Method Detail

      • addBean

        public void addBean​(org.smooks.api.bean.repository.BeanId beanId,
                            Object bean)
        Specified by:
        addBean in interface org.smooks.api.bean.context.BeanContext
      • addBean

        public void addBean​(org.smooks.api.bean.repository.BeanId beanId,
                            Object bean,
                            org.smooks.api.delivery.fragment.Fragment<?> source)
        Specified by:
        addBean in interface org.smooks.api.bean.context.BeanContext
      • addBean

        public void addBean​(String beanId,
                            Object bean)
        Specified by:
        addBean in interface org.smooks.api.bean.context.BeanContext
      • addBean

        public void addBean​(String beanId,
                            Object bean,
                            org.smooks.api.delivery.fragment.Fragment<?> source)
        Specified by:
        addBean in interface org.smooks.api.bean.context.BeanContext
      • containsBean

        public boolean containsBean​(org.smooks.api.bean.repository.BeanId beanId)
        Specified by:
        containsBean in interface org.smooks.api.bean.context.BeanContext
      • getBeanId

        public org.smooks.api.bean.repository.BeanId getBeanId​(String beanId)
        Specified by:
        getBeanId in interface org.smooks.api.bean.context.BeanContext
      • getBean

        public Object getBean​(org.smooks.api.bean.repository.BeanId beanId)
        Specified by:
        getBean in interface org.smooks.api.bean.context.BeanContext
      • getBean

        public Object getBean​(String beanId)
        Specified by:
        getBean in interface org.smooks.api.bean.context.BeanContext
      • getBean

        public <T> T getBean​(Class<T> beanType)
        Specified by:
        getBean in interface org.smooks.api.bean.context.BeanContext
      • changeBean

        public void changeBean​(org.smooks.api.bean.repository.BeanId beanId,
                               Object bean,
                               org.smooks.api.delivery.fragment.Fragment<?> source)
        Specified by:
        changeBean in interface org.smooks.api.bean.context.BeanContext
      • removeBean

        public Object removeBean​(org.smooks.api.bean.repository.BeanId beanId,
                                 org.smooks.api.delivery.fragment.Fragment<?> source)
        Specified by:
        removeBean in interface org.smooks.api.bean.context.BeanContext
      • removeBean

        public Object removeBean​(String beanId,
                                 org.smooks.api.delivery.fragment.Fragment<?> source)
        Specified by:
        removeBean in interface org.smooks.api.bean.context.BeanContext
      • clear

        public void clear()
        Specified by:
        clear in interface org.smooks.api.bean.context.BeanContext
      • getBeanMap

        public Map<String,​Object> getBeanMap()
        Specified by:
        getBeanMap in interface org.smooks.api.bean.context.BeanContext
      • setBeanInContext

        public void setBeanInContext​(org.smooks.api.bean.repository.BeanId beanId,
                                     boolean inContext)
        Specified by:
        setBeanInContext in interface org.smooks.api.bean.context.BeanContext
      • newSubContext

        public org.smooks.api.bean.context.BeanContext newSubContext​(org.smooks.api.ExecutionContext executionContext)
        Specified by:
        newSubContext in interface org.smooks.api.bean.context.BeanContext
      • addObserver

        public void addObserver​(org.smooks.api.bean.lifecycle.BeanContextLifecycleObserver observer)
        Specified by:
        addObserver in interface org.smooks.api.bean.context.BeanContext
      • notifyObservers

        public void notifyObservers​(org.smooks.api.bean.lifecycle.BeanContextLifecycleEvent event)
        Specified by:
        notifyObservers in interface org.smooks.api.bean.context.BeanContext
      • removeObserver

        public void removeObserver​(org.smooks.api.bean.lifecycle.BeanContextLifecycleObserver observer)
        Specified by:
        removeObserver in interface org.smooks.api.bean.context.BeanContext