/snippets/Taffy/Application cfc-tag.xml
http://github.com/atuttle/Taffy · XML · 51 lines · 44 code · 7 blank · 0 comment · 0 complexity · a8975e9bd0fb127847c7a937c195999a MD5 · raw file
- <?xml version="1.0" encoding="utf-8"?>
- <snippet filetemplate="false" extension="">
- <name>Application cfc-tag</name>
- <help>Creates an Application.cfc skeleton for a Taffy API using cfml tags</help>
- <starttext><![CDATA[<cfcomponent extends="taffy.core.api">
- <cfset this.name = "]]></starttext>
- <endtext><![CDATA[" />
- <cfset variables.framework = {
- reloadKey = "reload"
- ,reloadPassword = "true"
- ,reloadOnEveryRequest = false
- ,defaultRepresentationClass = "taffy.core.nativeJsonRepresentation"
- ,dashboardKey = "dashboard"
- ,disableDashboard = false
- ,unhandledPaths = "/flex2gateway"
- ,allowCrossDomain = false
- ,globalHeaders = structNew()
- ,debugKey = "debug"
- ,returnExceptionsAsJson = true
- ,exceptionLogAdapter = "taffy.bonus.LogToEmail"
- ,exceptionLogAdapterConfig = {
- emailFrom = "api-error@yourdomain.com"
- ,emailTo = "you@yourdomain.com"
- ,emailSubj = "Exception Trapped in API"
- ,emailType = "html"
- }
- ,beanFactory = ""
- } />
- <cffunction name="onApplicationStart">
- <cfreturn super.onApplicationStart() />
- </cffunction>
- <cffunction name="onRequestStart">
- <cfreturn super.onRequestStart() />
- </cffunction>
- <cffunction name="onTaffyRequest">
- <cfargument name="verb" />
- <cfargument name="cfc" />
- <cfargument name="requestArguments" />
- <cfargument name="mimeExt" />
- <cfargument name="headers" />
- <cfargument name="methodMetadata" />
- </cffunction>
- </cfcomponent>]]></endtext>
- </snippet>