| @@ -0,0 +1,57 @@ | ||
| <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> | ||
|
|
||
| <beans default-autowire="byName"> | ||
|
|
||
| <bean id="taffyResource" class="taffy.core.resource" /> | ||
|
|
||
| <bean id="cachingSample" class="endpoints.SamplesCaching" /> | ||
| <bean id="cachingAdvice" class="com.aspects.CachingAroundAdvice" /> | ||
|
|
||
| <bean id="cachingAdvisor" class="coldspring.aop.support.NamedMethodPointcutAdvisor"> | ||
| <property name="advice"> | ||
| <ref bean="cachingAdvice" /> | ||
| </property> | ||
| <property name="mappedNames"> | ||
| <value>*</value> | ||
| </property> | ||
| </bean> | ||
|
|
||
| <bean id="sampleWithCachingAdvice" class="coldspring.aop.framework.ProxyFactoryBean"> | ||
| <property name="target"> | ||
| <ref bean="cachingSample" /> | ||
| </property> | ||
| <property name="interceptorNames"> | ||
| <list> | ||
| <value>cachingAdvisor</value> | ||
| </list> | ||
| </property> | ||
| </bean> | ||
|
|
||
| <bean id="formattingSample" class="endpoints.SamplesFormatting" /> | ||
| <bean id="formattingAdvice" class="com.aspects.FormattingAroundAdvice"> | ||
| <property name="taffyResourceObject"> | ||
| <ref bean="taffyResource" /> | ||
| </property> | ||
| </bean> | ||
|
|
||
| <bean id="formattingAdvisor" class="coldspring.aop.support.NamedMethodPointcutAdvisor"> | ||
| <property name="advice"> | ||
| <ref bean="formattingAdvice" /> | ||
| </property> | ||
| <property name="mappedNames"> | ||
| <value>*</value> | ||
| </property> | ||
| </bean> | ||
|
|
||
| <bean id="sampleWithFormattingAdvice" class="coldspring.aop.framework.ProxyFactoryBean"> | ||
| <property name="target"> | ||
| <ref bean="formattingSample" /> | ||
| </property> | ||
| <property name="interceptorNames"> | ||
| <list> | ||
| <value>formattingAdvisor</value> | ||
| </list> | ||
| </property> | ||
| </bean> | ||
|
|
||
| </beans> |
| @@ -0,0 +1,12 @@ | ||
| <cfcomponent extends="taffy.core.resource" taffy:aopbean="sampleWithCachingAdvice" taffy:uri="/aop/caching" taffy:cache="true" taffy:cachetimeout="10" taffy:cacheunit="seconds"> | ||
|
|
||
| <cffunction name="get" access="public" output="false" hint=""> | ||
| <cfscript> | ||
| local.resourceData = StructNew(); | ||
| local.resourceData["foo"] = "bar"; | ||
| sleep(5000); | ||
| return representationOf(local.resourceData).withStatus(200); | ||
| </cfscript> | ||
| </cffunction> | ||
|
|
||
| </cfcomponent> |
| @@ -0,0 +1,11 @@ | ||
| <cfcomponent extends="taffy.core.resource" taffy:uri="/aop/formatting" taffy:aopbean="sampleWithFormattingAdvice"> | ||
|
|
||
| <cffunction name="get" access="public" output="false" hint=""> | ||
| <cfscript> | ||
| local.resourceData = StructNew(); | ||
| local.resourceData["foo"] = "bar"; | ||
| return local.resourceData; | ||
| </cfscript> | ||
| </cffunction> | ||
|
|
||
| </cfcomponent> |
| @@ -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,10 @@ | ||
| <cfdirectory action="list" directory="#getDirectoryFromPath(expandPath(cgi.script_name))#" name="them" sort="type,name" /> | ||
| <cfoutput> | ||
| <ul> | ||
| <cfloop query="them"> | ||
| <cfif NOT name.startsWith('.') AND name NEQ 'WEB-INF' AND name NEQ 'Application.cfm' AND name NEQ 'Application.cfc' AND name NEQ 'index.cfm'> | ||
| <li><a href="#name#<cfif type EQ 'dir'>/</cfif>">#name#<cfif type EQ 'dir'>/</cfif></a> | ||
| </cfif> | ||
| </cfloop> | ||
| </ul> | ||
| </cfoutput> |