initial
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<cfcomponent extends="taffy.core.api">
|
||||
<cfscript>
|
||||
|
||||
this.name = hash(getCurrentTemplatePath());
|
||||
|
||||
variables.framework = {};
|
||||
variables.framework.debugKey = "debug";
|
||||
variables.framework.reloadKey = "reload";
|
||||
variables.framework.reloadPassword = "true";
|
||||
variables.framework.serializer = "taffy.core.nativeJsonSerializer";
|
||||
|
||||
function onApplicationStart(){
|
||||
application.beanFactory = createObject("component", "coldspring.beans.DefaultXMLBeanFactory");
|
||||
application.beanFactory.loadBeans('/taffy/examples/api_coldspring/config/coldspring.xml');
|
||||
|
||||
//note that we're modifying variables.framework here, after the application variable has been set
|
||||
variables.framework.beanFactory = application.beanFactory;
|
||||
|
||||
return super.onApplicationStart();
|
||||
}
|
||||
|
||||
</cfscript>
|
||||
</cfcomponent>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans default-autowire="byName">
|
||||
|
||||
<bean id="fakeData" class="taffy.examples.shared.fakeData" />
|
||||
<bean id="artfartCollection" class="taffy.examples.api_coldspring.stuff.artfartCollection" />
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,6 @@
|
||||
<!---
|
||||
DO NOT DELETE THIS FILE
|
||||
===============================
|
||||
This file is necessary for Taffy to work, but should be blank.
|
||||
All requests funnel through it, but are handled by framework internal functionality.
|
||||
--->
|
||||
@@ -0,0 +1,13 @@
|
||||
<cfcomponent extends="taffy.core.resource" taffy_uri="/artfarts">
|
||||
|
||||
<cffunction name="get" access="public" output="false">
|
||||
<cfreturn representationOf(variables.fakeData.getData()).withStatus(200) />
|
||||
</cffunction>
|
||||
|
||||
<!--- this will be called by the bean factory's autowire functionality --->
|
||||
<cffunction name="setFakeData" access="public" output="false" returnType="void">
|
||||
<cfargument name="fakeDataObj" type="any" required="true" hint="Shared FakeData object" />
|
||||
<cfset variables.fakeData = arguments.fakeDataObj />
|
||||
</cffunction>
|
||||
|
||||
</cfcomponent>
|
||||
Reference in New Issue
Block a user