org.milyn.javabean
Class BeanAccessor

java.lang.Object
  extended by org.milyn.javabean.BeanAccessor

Deprecated. Use the BeanContext to manager the beans

@Deprecated
public class BeanAccessor
extends Object

Bean Accessor.

This class provides support for saving and accessing Javabean instance.

Author:
maurice.zeijen@smies.com

Constructor Summary
BeanAccessor(org.milyn.container.ExecutionContext executionContext)
          Deprecated. Public default constructor.
BeanAccessor(org.milyn.container.ExecutionContext executionContext, Map<String,Object> resultMap)
          Deprecated. Public constructor.
 
Method Summary
static void addBean(org.milyn.container.ExecutionContext executionContext, String beanId, Object bean)
          Deprecated. Add a bean instance to the specified request under the specified beanId.
static void changeBean(org.milyn.container.ExecutionContext executionContext, String beanId, Object bean)
          Deprecated. Changes a bean object of the given beanId.
static Object getBean(org.milyn.container.ExecutionContext executionContext, String beanId)
          Deprecated. Get the current bean, specified by the supplied beanId, from the supplied request.
static Object getBean(String beanId, org.milyn.container.ExecutionContext executionContext)
          Deprecated. Get the current bean, specified by the supplied beanId, from the supplied request.
static Map<String,Object> getBeanMap(org.milyn.container.ExecutionContext executionContext)
          Deprecated. Get the bean map associated with the supplied request instance.
static HashMap<String,Object> getBeans(org.milyn.container.ExecutionContext executionContext)
          Deprecated. Get the bean map associated with the supplied request instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanAccessor

public BeanAccessor(org.milyn.container.ExecutionContext executionContext)
Deprecated. 
Public default constructor.


BeanAccessor

public BeanAccessor(org.milyn.container.ExecutionContext executionContext,
                    Map<String,Object> resultMap)
Deprecated. 
Public constructor.

Creates an accessor based on the supplied result Map.

Parameters:
resultMap - The result Map.
Method Detail

getBean

public static Object getBean(String beanId,
                             org.milyn.container.ExecutionContext executionContext)
Deprecated. 
Get the current bean, specified by the supplied beanId, from the supplied request.

If the specified beanId refers to a bean instance list, this method returns the last (current) bean from the list.

Parameters:
beanId - Bean Identifier.
executionContext - The request on which the bean instance is stored.
Returns:
The bean instance, or null if no such bean instance exists on the supplied request.

getBean

public static Object getBean(org.milyn.container.ExecutionContext executionContext,
                             String beanId)
Deprecated. 
Get the current bean, specified by the supplied beanId, from the supplied request.

If the specified beanId refers to a bean instance list, this method returns the last (current) bean from the list.

Parameters:
beanId - Bean Identifier.
executionContext - The request on which the bean instance is stored.
Returns:
The bean instance, or null if no such bean instance exists on the supplied request.

getBeans

public static HashMap<String,Object> getBeans(org.milyn.container.ExecutionContext executionContext)
Deprecated. 
Get the bean map associated with the supplied request instance.

Parameters:
executionContext - The execution context.
Returns:
The bean map associated with the supplied request.

getBeanMap

public static Map<String,Object> getBeanMap(org.milyn.container.ExecutionContext executionContext)
Deprecated. 
Get the bean map associated with the supplied request instance.

Parameters:
executionContext - The execution context.
Returns:
The bean map associated with the supplied request.

addBean

public static void addBean(org.milyn.container.ExecutionContext executionContext,
                           String beanId,
                           Object bean)
Deprecated. 
Add a bean instance to the specified request under the specified beanId.

Parameters:
executionContext - The execution context within which the bean is created.
beanId - The beanId under which the bean is to be stored.
bean - The bean instance to be stored.

changeBean

public static void changeBean(org.milyn.container.ExecutionContext executionContext,
                              String beanId,
                              Object bean)
Deprecated. 
Changes a bean object of the given beanId. The difference to addBean is that the bean must exist, the associated beans aren't removed and the observers of the BeanLifecycle.CHANGE event are notified.

Parameters:
executionContext - The execution context within which the bean is created.
beanId - The beanId under which the bean is to be stored.
bean - The bean instance to be stored.


Copyright © 2018. All rights reserved.