ValidateThis API Documentation

ValidateThis.util
Class BaseConfigObject

WEB-INF.cftags.component
        extended by ValidateThis.util.BaseConfigObject
Direct Known Subclasses:
BeanConfig

public class BaseConfigObject
extends WEB-INF.cftags.component

Constructor Summary
init()
          I initialize default LightWire config properties
 
Method Summary
 void addBean(string FullClassPath, [string BeanName=''], any Singleton, [string InitMethod=''])
          I add the configuration properties for a Singleton or Transient
 void addBeanFromFactory(string FactoryBean, string FactoryMethod, string BeanName, any Singleton)
          I add the configuration properties for a Singleton or Transient that is created by a factory to the config file
 void addConstructorDependency(string BeanName, string InjectedBeanName='', [string PropertyName=''])
          I add a constructor object dependency for a bean
 void addConstructorProperty(string BeanName, string PropertyName, any PropertyValue)
          I add a constructor property of any type to a bean
 void addMixinDependency(string BeanName, string InjectedBeanName='', [string PropertyName=''])
          I add a mixin dependency for a bean
 void addMixinProperty(string BeanName, string PropertyName, any PropertyValue)
          I add a mixin property of any type to a bean
 void addSetterDependency(string BeanName, string InjectedBeanName='', [string PropertyName=''])
          I add a setter dependency for a bean
 void addSetterProperty(string BeanName, string PropertyName, any PropertyValue)
          I add a setter property of any type to a bean
 void addSingleton(string FullClassPath, [string BeanName=''], [string InitMethod=''])
          I add the configuration properties for a Singleton
 void addSingletonFromFactory(string FactoryBean, string FactoryMethod, string BeanName)
          Adds the definition for a given Singleton that is created by a factory to the config file
 void addTransient(string FullClassPath, [string BeanName=''], [string InitMethod=''])
          I add the configuration properties for a Transient
 void addTransientFromFactory(string FactoryBean, string FactoryMethod, string BeanName)
          Adds the definition for a given Transient that is created by a factory to the config file
 void dump(any VariabletoDump)
          I provide cfdump/cfabort functionality within cfscript blocks
 struct getConfigStruct()
          I provide LightWire with the properly configured configuration struct to operate on
 boolean getLazyLoad()
          I return whether Singletons should or shouldn't be lazy loaded
 void parseXMLConfigFile(string XMLFilePath, [struct properties])
          I take the path to a ColdSpring XML config file and use it to set all of the necessary LightWire config properties
 void setLazyLoad(boolean LazyLoad)
          I set whether Singletons should or shouldn't be laxy loaded
private void translateBean(xml bean, [struct props])
          I translate ColdSpring XML bean definitiions to LightWire config
private void translateBeanChildren(XML bean, string childTagName, [struct props])
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init()
I initialize default LightWire config properties.

Method Detail

addBean

public void addBean(string FullClassPath, [string BeanName=''], any Singleton, [string InitMethod=''])
I add the configuration properties for a Singleton or Transient.

Parameters:
FullClassPath - The full class path to the bean including its name. E.g. for com.UserService.cfc it would be com.UserService.
BeanName - An optional name to be able to use to refer to this bean. If you don't provide this, the name of the bean will be used as a default. E.g. for com.UserService, it'll be named UserService unless you put something else here. If you put UserS, it'd be available as UserS, but NOT as UserService.
Singleton - Whether the bean is a Singleton (1) or Transient(0).
InitMethod - A default custom initialization method for LightWire to call on the bean after constructing it fully (including setter and mixin injection) but before returning it.

addBeanFromFactory

public void addBeanFromFactory(string FactoryBean, string FactoryMethod, string BeanName, any Singleton)
I add the configuration properties for a Singleton or Transient that is created by a factory to the config file.

Parameters:
FactoryBean - The name of the factory to use to create this bean (the factory must also have been defined as a Singleton in the LightWire config file).
FactoryMethod - The name of the method to call on the factory bean to create this bean.
BeanName - The required name to use to refer to this bean.
Singleton - Whether the bean is a Singleton (1) or Transient(0).

addConstructorDependency

public void addConstructorDependency(string BeanName, string InjectedBeanName='', [string PropertyName=''])
I add a constructor object dependency for a bean.

Parameters:
BeanName - The name of the bean to set the constructor dependencies for.
InjectedBeanName - The name of the bean to inject.
PropertyName - The optional property name to pass the bean into. Defaults to the bean name if not provided.

addConstructorProperty

public void addConstructorProperty(string BeanName, string PropertyName, any PropertyValue)
I add a constructor property of any type to a bean.

Parameters:
BeanName - The name of the bean to add the property to.
PropertyName - The name of the property to set.
PropertyValue - The value of the property to set.

addMixinDependency

public void addMixinDependency(string BeanName, string InjectedBeanName='', [string PropertyName=''])
I add a mixin dependency for a bean.

Parameters:
BeanName - The name of the bean to set the mixin dependencies for.
InjectedBeanName - The name of the bean to inject.
PropertyName - The optional property name to pass the bean into. Defaults to the bean name if not provided.

addMixinProperty

public void addMixinProperty(string BeanName, string PropertyName, any PropertyValue)
I add a mixin property of any type to a bean.

Parameters:
BeanName - The name of the bean to add the property to.
PropertyName - The name of the property to set.
PropertyValue - The value of the property to set.

addSetterDependency

public void addSetterDependency(string BeanName, string InjectedBeanName='', [string PropertyName=''])
I add a setter dependency for a bean.

Parameters:
BeanName - The name of the bean to set the setter dependencies for.
InjectedBeanName - The name of the bean to inject.
PropertyName - The optional property name to pass the bean into. Defaults to the bean name if not provided.

addSetterProperty

public void addSetterProperty(string BeanName, string PropertyName, any PropertyValue)
I add a setter property of any type to a bean.

Parameters:
BeanName - The name of the bean to add the property to.
PropertyName - The name of the property to set.
PropertyValue - The value of the property to set.

addSingleton

public void addSingleton(string FullClassPath, [string BeanName=''], [string InitMethod=''])
I add the configuration properties for a Singleton.

Parameters:
FullClassPath - The full class path to the bean including its name. E.g. for com.UserService.cfc it would be com.UserService.
BeanName - An optional name to be able to use to refer to this bean. If you don't provide this, the name of the bean will be used as a default. E.g. for com.UserService, it'll be named UserService unless you put something else here. If you put UserS, it'd be available as UserS, but NOT as UserService.
InitMethod - A default custom initialization method for LightWire to call on the bean after constructing it fully (including setter and mixin injection) but before returning it.

addSingletonFromFactory

public void addSingletonFromFactory(string FactoryBean, string FactoryMethod, string BeanName)
Adds the definition for a given Singleton that is created by a factory to the config file.

Parameters:
FactoryBean - The name of the factory to use to create this bean (the factory must also have been defined as a Singleton in the LightWire config file).
FactoryMethod - The name of the method to call on the factory bean to create this bean.
BeanName - The required name to use to refer to this bean.

addTransient

public void addTransient(string FullClassPath, [string BeanName=''], [string InitMethod=''])
I add the configuration properties for a Transient.

Parameters:
FullClassPath - The full class path to the bean including its name. E.g. for com.User.cfc it would be com.User.
BeanName - An optional name to be able to use to refer to this bean. If you don't provide this, the name of the bean will be used as a default. E.g. for com.User, it'll be named User unless you put something else here. If you put UserBean, it'd be available as UserBean, but NOT as User.
InitMethod - A default custom initialization method for LightWire to call on the bean after constructing it fully (including setter and mixin injection) but before returning it.

addTransientFromFactory

public void addTransientFromFactory(string FactoryBean, string FactoryMethod, string BeanName)
Adds the definition for a given Transient that is created by a factory to the config file.

Parameters:
FactoryBean - The name of the factory to use to create this bean (the factory must also have been defined as a Singleton in the LightWire config file).
FactoryMethod - The name of the method to call on the factory bean to create this bean.
BeanName - The required name to use to refer to this bean.

dump

public void dump(any VariabletoDump)
I provide cfdump/cfabort functionality within cfscript blocks.

Parameters:
VariabletoDump - The variable to dump to the screen.

getConfigStruct

public struct getConfigStruct()
I provide LightWire with the properly configured configuration struct to operate on.


getLazyLoad

public boolean getLazyLoad()
I return whether Singletons should or shouldn't be lazy loaded.


parseXMLConfigFile

public void parseXMLConfigFile(string XMLFilePath, [struct properties])
I take the path to a ColdSpring XML config file and use it to set all of the necessary LightWire config properties.

Parameters:
XMLFilePath - The path to the XML config file.
properties - A struct of default properties to be used in place of ${key} in XML config file.

setLazyLoad

public void setLazyLoad(boolean LazyLoad)
I set whether Singletons should or shouldn't be laxy loaded.

Parameters:
LazyLoad - Whether or not to use lazy loading of Singletons.

translateBean

private void translateBean(xml bean, [struct props])
I translate ColdSpring XML bean definitiions to LightWire config.

Parameters:
bean
props

translateBeanChildren

private void translateBeanChildren(XML bean, string childTagName, [struct props])

Parameters:
bean
childTagName
props

ValidateThis API Documentation