org.apache.jackrabbit.core.config
Class BeanConfig

java.lang.Object
  extended byorg.apache.jackrabbit.core.config.BeanConfig
Direct Known Subclasses:
AccessManagerConfig, FileSystemConfig, LoginModuleConfig, PersistenceManagerConfig, SearchConfig

public class BeanConfig
extends Object

Bean configuration class. BeanConfig instances contain the class name and property information required to instantiate a class that conforms with the JavaBean conventions.


Constructor Summary
BeanConfig(BeanConfig config)
          Copies a bean configuration.
BeanConfig(String className, Properties properties)
          Creates a bean configuration.
 
Method Summary
 String getClassName()
          Returns the class name of the configured bean.
 Properties getParameters()
          Returns the initial properties of the configured bean.
 Object newInstance()
          Creates a new instance of the configured bean class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanConfig

public BeanConfig(String className,
                  Properties properties)
Creates a bean configuration. Note that a copy of the given bean properties is stored as a part of the created configuration object. Thus the caller is free to modify the given properties once the configuration object has been created.

Parameters:
className - class name of the bean
properties - initial properties of the bean

BeanConfig

public BeanConfig(BeanConfig config)
Copies a bean configuration.

Parameters:
config - the configuration to be copied
Method Detail

getClassName

public String getClassName()
Returns the class name of the configured bean.

Returns:
class name of the bean

getParameters

public Properties getParameters()
Returns the initial properties of the configured bean.

Returns:
initial properties of the bean

newInstance

public Object newInstance()
                   throws ConfigurationException
Creates a new instance of the configured bean class.

Returns:
new bean instance
Throws:
ConfigurationException - on bean configuration errors


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.