This commit is contained in:
msyu
2024-10-23 11:17:42 +03:00
commit ab5c944862
380 changed files with 55823 additions and 0 deletions
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<snippet filetemplate="false" extension="">
<name>Application cfc-script</name>
<help>Creates an Application.cfc skeleton for a Taffy API using cfscript syntax</help>
<starttext><![CDATA[component extends="taffy.core.api"
{
this.name = "]]></starttext>
<endtext><![CDATA[";
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 = ""
}
function onApplicationStart()
{
return super.onApplicationStart();
}
function onRequestStart()
{
return super.onRequestStart();
}
function onTaffyRequest(verb,cfc,requestArguments,mimeExt,headers,methodMetadata)
{
}
}]]></endtext>
</snippet>
@@ -0,0 +1,51 @@
<?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>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<snippet filetemplate="false" extension="">
<name>Representation-script</name>
<help>Creates a Taffy Custom Representation CFC using cfscript syntax</help>
<starttext><![CDATA[component extends="taffy.core.baseRepresentation"
{
public string function getAs]]></starttext>
<endtext><![CDATA[()
output="false"
taffy_mime=""
taffy_default=""
{
return serializeToMyCustomFormat(variables.data);
}
}]]></endtext>
</snippet>
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<snippet filetemplate="false" extension="">
<name>Representation-tag</name>
<help>Creates a Taffy Custom Representation CFC using cfml tags</help>
<starttext><![CDATA[<cfcomponent extends="taffy.core.baseRepresentation">
<cffunction
name="getAs]]></starttext>
<endtext><![CDATA["
output="false"
taffy:mime=""
taffy:default="">
<cfreturn serializeToMyCustomFormat(variables.data) />
</cffunction>
</cfcomponent>]]></endtext>
</snippet>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<snippet filetemplate="false" extension="">
<name>Resource-script</name>
<help>Creates a Taffy Resource CFC using cfscript syntax</help>
<starttext><![CDATA[component extends="taffy.core.resource" taffy_uri="]]></starttext>
<endtext><![CDATA["
{
public function get() output="false" hint="read"
{
}
public function put() output="false" hint="update"
{
}
public function post() output="false" hint="create"
{
}
public function delete() output="false" hint="delete"
{
}
}]]></endtext>
</snippet>
+21
View File
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<snippet filetemplate="false" extension="">
<name>Resource-tag</name>
<help>Creates a Taffy Resource CFC using cfml tags</help>
<starttext><![CDATA[<cfcomponent extends="taffy.core.resource" taffy:uri="]]></starttext>
<endtext><![CDATA[">
<cffunction name="get" output="false" hint="read">
</cffunction>
<cffunction name="put" output="false" hint="update">
</cffunction>
<cffunction name="post" output="false" hint="create">
</cffunction>
<cffunction name="delete" output="false" hint="delete">
</cffunction>
</cfcomponent>]]></endtext>
</snippet>