com.rubecula.util
Class BeanContainer

java.lang.Object
  extended by com.rubecula.util.BeanContainer

public class BeanContainer
extends java.lang.Object

This class made up of static methods which redirect to the BeanPot or other bean container. If you decide to use, for example Spring, instead of BeanPot, you will only have to change the references in this class.

Author:
Robin Hillyard

Constructor Summary
BeanContainer()
           
 
Method Summary
static void cleanup()
           
static void configure()
           
static java.lang.Object getBean(java.lang.String key)
           
static java.util.Set<java.lang.String> getBeanKeys()
          TEST
static java.lang.String getIdentifier()
           
static void imposeBean(java.lang.String key, java.lang.Object bean)
           
static void runBeans()
          TEST
static java.lang.Object setBeanProperty(java.lang.String beanProperty, java.lang.Object value)
           
static void setClassLoader(java.lang.ClassLoader classLoader)
           
static void setConfiguration(java.lang.Class<? extends java.lang.Object> clazz, java.lang.String filename)
          Invoke BeanPot#setConfiguration(Class, String, boolean) with the two parameters given.
static void setConfiguration(java.lang.String configurationFile)
          Invoke BeanPot.setConfiguration(String) with the one parameter given.
static void setDebug(boolean debug)
           
static void setValidate()
           
static void setValidate(boolean validate, java.net.URL dtd)
           
static void showBeans()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanContainer

public BeanContainer()
Method Detail

cleanup

public static void cleanup()

configure

public static void configure()
                      throws com.rubecula.beanpot.BeanPotException
Throws:
com.rubecula.beanpot.BeanPotException

getBean

public static java.lang.Object getBean(java.lang.String key)
Parameters:
key -
Returns:
the bean accessed with key key.

getBeanKeys

public static java.util.Set<java.lang.String> getBeanKeys()
TEST

Returns:
all the keys for the beans.

getIdentifier

public static java.lang.String getIdentifier()
Returns:
the identifier of the bean pot

imposeBean

public static void imposeBean(java.lang.String key,
                              java.lang.Object bean)
                       throws com.rubecula.beanpot.BeanPotException
Parameters:
key -
bean -
Throws:
com.rubecula.beanpot.BeanPotException

runBeans

public static void runBeans()
TEST


setBeanProperty

public static java.lang.Object setBeanProperty(java.lang.String beanProperty,
                                               java.lang.Object value)
                                        throws com.rubecula.beanpot.BeanPotException
Parameters:
beanProperty -
value -
Returns:
the bean which has been updated.
Throws:
com.rubecula.beanpot.BeanPotException

setClassLoader

public static void setClassLoader(java.lang.ClassLoader classLoader)
Parameters:
classLoader -

setConfiguration

public static void setConfiguration(java.lang.Class<? extends java.lang.Object> clazz,
                                    java.lang.String filename)
                             throws com.rubecula.beanpot.BeanPotException
Invoke BeanPot#setConfiguration(Class, String, boolean) with the two parameters given.

Parameters:
clazz - XXX
filename - XXX
Throws:
com.rubecula.beanpot.BeanPotException

setConfiguration

public static void setConfiguration(java.lang.String configurationFile)
                             throws com.rubecula.beanpot.BeanPotException
Invoke BeanPot.setConfiguration(String) with the one parameter given.

Parameters:
configurationFile -
Throws:
com.rubecula.beanpot.BeanPotException

setDebug

public static void setDebug(boolean debug)
Parameters:
debug - XXX

setValidate

public static void setValidate()

setValidate

public static void setValidate(boolean validate,
                               java.net.URL dtd)
Parameters:
validate - true if we want to force DTD validation
dtd - the URL of the DTD (if null then we use the current value).

showBeans

public static void showBeans()


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.