com.compoundtheory.coldfusion.cfc.spring
Class ColdFusionComponentFactory

java.lang.Object
  extended by com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory
All Implemented Interfaces:
org.springframework.scripting.ScriptFactory

public class ColdFusionComponentFactory
extends java.lang.Object
implements org.springframework.scripting.ScriptFactory

ScriptFactory for creating a CFC Dynamic Proxy to pass back to Spring A lot of this was lifted from ScriptBeanDefinitionParser, so big credit to that crew.

Author:
Mark Mandel

Constructor Summary
ColdFusionComponentFactory(java.lang.String scriptSourceLocator, java.lang.Class<?>[] interfaces)
           
 
Method Summary
 java.lang.Object getScriptedObject(org.springframework.scripting.ScriptSource scriptSource, java.lang.Class[] actualInterfaces)
           
 java.lang.Class<?> getScriptedObjectType(org.springframework.scripting.ScriptSource scriptSource)
          returns null, as we are actually returning a proxy.
 java.lang.Class<?>[] getScriptInterfaces()
           
 java.lang.String getScriptSourceLocator()
           
 boolean requiresConfigInterface()
          ColdFusion proxies require a config interface
 boolean requiresScriptedObjectRefresh(org.springframework.scripting.ScriptSource scriptSource)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColdFusionComponentFactory

public ColdFusionComponentFactory(java.lang.String scriptSourceLocator,
                                  java.lang.Class<?>[] interfaces)
Method Detail

getScriptedObject

public java.lang.Object getScriptedObject(org.springframework.scripting.ScriptSource scriptSource,
                                          java.lang.Class[] actualInterfaces)
                                   throws java.io.IOException,
                                          org.springframework.scripting.ScriptCompilationException
Specified by:
getScriptedObject in interface org.springframework.scripting.ScriptFactory
Throws:
java.io.IOException
org.springframework.scripting.ScriptCompilationException

getScriptedObjectType

public java.lang.Class<?> getScriptedObjectType(org.springframework.scripting.ScriptSource scriptSource)
                                         throws java.io.IOException,
                                                org.springframework.scripting.ScriptCompilationException
returns null, as we are actually returning a proxy.

Specified by:
getScriptedObjectType in interface org.springframework.scripting.ScriptFactory
Throws:
java.io.IOException
org.springframework.scripting.ScriptCompilationException

getScriptSourceLocator

public java.lang.String getScriptSourceLocator()
Specified by:
getScriptSourceLocator in interface org.springframework.scripting.ScriptFactory

requiresConfigInterface

public boolean requiresConfigInterface()
ColdFusion proxies require a config interface

Specified by:
requiresConfigInterface in interface org.springframework.scripting.ScriptFactory

requiresScriptedObjectRefresh

public boolean requiresScriptedObjectRefresh(org.springframework.scripting.ScriptSource scriptSource)
Specified by:
requiresScriptedObjectRefresh in interface org.springframework.scripting.ScriptFactory

getScriptInterfaces

public java.lang.Class<?>[] getScriptInterfaces()
Specified by:
getScriptInterfaces in interface org.springframework.scripting.ScriptFactory

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object