ColdSpring Bean Utilities
Project Home • Blog • Forums • Wiki • Known Issues • Contact Project
Author: Brian Kotek (All RIAForge projects by this author)
Each component listed here has full documentation and usage examples in the comments at the top of each file.
Updated on 3/22/2009 to include a thread safety patch from Jon Messer.
Updated on 7/9/2008 to include updates to the AbstractMetadataAwareAdvice and VOConverterAdvice, as well as added the DynamicXMLBeanFactory, MetadataAwareProxyFactoryBean, and MetadataAwareRemoteFactoryBean. I also added an example subdirectory to demonstrate usage of some of the new components.
This package includes a variety of utilities and other useful components to support development using ColdSpring. Each component has a full description in the comments, and I have several blog posts on these at my blog, http://www.briankotek.com/blog.
DynamicXMLBeanFactory: This extends the standard DefaultXMLBeanFactory but allows the ability to replace dynamic properties anywhere in the XML file, as well as in imported XML files.
MetadataAwareProxyFactoryBean: This extends the ColdSpring ProxyFactoryBean and automatically injects metadata information into any Advices that extend AbstractMetadataAwareAdvice after the AOP proxy is created.
MetadataAwareRemoteFactoryBean: This extends the ColdSpring RemoteFactoryBean and automatically injects metadata information into any Advices that extend AbstractMetadataAwareAdvice after the remote proxy is created.
BeanInjector.cfc: The component will autowire any other component with ColdSpring-managed beans. Very useful for injecting ColdSpring beans (mainly Singletons) into transient objects.
TDOBeanInjectorObserver.cfc: This component uses the BeanInjector to automatically autowire Transfer Decorator objects with ColdSpring beans. Transfer is an ORM (object-relational mapping) framework for ColdFusion. Using this observer allows your Transfer Decorators to supply much richer behavior and allows them to act as real Business Objects rather than simple data containers for database data.
AbstractMetadataAwareAdvice.cfc: An abstract ColdSpring AOP Advice that leverages an XML file to supply metadata to your Advices. This greatly enhances the capabilities of an Advice because you can supply information that the Advice can act upon that it would otherwise be unaware of.
VOConverterAdvice.cfc: This Advice extends AbstractMetadataAwareAdvice and allows you to specify a converter component that will perform some kind of conversion on the data being returned by the proxied component. It uses the metadata supplied by the superclass to determine what converter to invoke, and passes the metadata into the converter for its use in doing its work.
GenericVOConverter.cfc: This is a generic Value Object converter that can be used by the VOConverterAdvice that will convert queries, arrays, or structures into objects of the type specified by the metadata. It isn't incredibly useful because it currently returns the structure keys in uppercase but it is meant as a starting point for creating your own converters.
(NOTE THAT THIS COMPONENT IS BEING DEPRECATED IN FAVOR OF THE DYNAMICXMLBEANFACTORY.)
This component will replace dynamic properties in a ColdSpring XML file with values specified in the passed structure. ColdSpring itself allows for some dynamic properties, but only in certain places in the XML such as constructor argument values. Using this CFC allows you to place dynamic properties anywhere in the XML. It also handles replacing dynamic properties on any imported ColdSpring files that use the <import> tag.
These have only been tested on ColdFusion 8, and they require the latest version of ColdSpring to use. Also, the Transfer observer requires the latest release of the Transfer ORM.
The DynamicXMLBeanFactory and ColdSpringXMLUtils components require Java 5 or later, which most installs of CF7 or 8 should already have. However, it also uses ReMatchNoCase() which is only supported on CF8.
To enter issues for this (or any other) project, you must be logged in.
You may access this project's Subversion repository with your client here: http://svn.riaforge.org/coldspringutils.
To view files and changelists associated with this repository, go here: http://coldspringutils.riaforge.org/index.cfm?event=page.svnbrowse.
You may download the latest set of files from Subversion as a zip file.
Anonymous users have read access to the repository while the administrator has write access.
This project is sharing its code via Subversion. Subversion is an open source source control method. You may find more information about Subversion here: http://subversion.tigris.org/
Adobe and the Adobe product names are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.