-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.cfc
86 lines (66 loc) · 3.44 KB
/
config.cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<cfcomponent>
<!--- VARIABLES --->
<cfset variables.instance = {}>
<!--- INITIALISATION --->
<cffunction name="twitterInit" returntype="Any">
<cfset variables.instance.consumerKey = "">
<cfset variables.instance.consumerSecret = "">
<cfset variables.instance.authKey = "">
<cfset variables.instance.authSecret = "">
<cfset variables.instance.scribePath = "#GetDirectoryFromPath(GetCurrentTemplatePath())#components/scribe-1.3.7-custom.jar">
<cfset variables.instance.commonsCodecPath = "#GetDirectoryFromPath(GetCurrentTemplatePath())#components/commons-codec-1.5.jar">
<cfset variables.instance.httpCorePath = "#GetDirectoryFromPath(GetCurrentTemplatePath())#components/httpcore-4.3.2.jar">
<cfset variables.instance.httpMimePath = "#GetDirectoryFromPath(GetCurrentTemplatePath())#components/httpmime-4.3.5.jar">
<cfset variables.instance.callback = "http://cfscribe.local/authTwitter.cfm">
<cfreturn this />
</cffunction>
<!--- getters --->
<cffunction name="getConsumerKey" access="public" returntype="String">
<cfreturn variables.instance.consumerKey>
</cffunction>
<cffunction name="getConsumerSecret" access="public" returntype="String">
<cfreturn variables.instance.consumerSecret>
</cffunction>
<cffunction name="getAuthKey" access="public" returntype="String">
<cfreturn variables.instance.authKey>
</cffunction>
<cffunction name="getAuthSecret" access="public" returntype="String">
<cfreturn variables.instance.authSecret>
</cffunction>
<cffunction name="getScribePath" access="public" returntype="String" hint="absolute path to the scribe jar">
<cfreturn variables.instance.scribePath>
</cffunction>
<cffunction name="getCommonsCodecPath" access="public" returntype="String" hint="absolute path to the commons-codec jar">
<cfreturn variables.instance.commonsCodecPath>
</cffunction>
<cffunction name="getHttpCorePath" access="public" returntype="String" hint="absolute path to the httpcore jar">
<cfreturn variables.instance.httpCorePath>
</cffunction>
<cffunction name="getHttpMimePath" access="public" returntype="String" hint="absolute path to the httpmime jar">
<cfreturn variables.instance.httpMimePath>
</cffunction>
<cffunction name="getCallback" access="public" returntype="String" hint="call back url from api">
<cfreturn variables.instance.callback>
</cffunction>
<!--- setters --->
<cffunction name="setConsumerKey" access="public" returntype="void">
<cfargument name="consumerKey" required="true" type="string">
<cfset variables.instance.consumerKey = arguments.consumerKey>
</cffunction>
<cffunction name="setConsumerSecret" access="public" returntype="void">
<cfargument name="consumerSecret" required="true" type="string">
<cfset variables.instance.consumerSecret = arguments.consumerSecret>
</cffunction>
<cffunction name="setAuthKey" access="public" returntype="void">
<cfargument name="authKey" required="true" type="string">
<cfset variables.instance.authKey = arguments.authKey>
</cffunction>
<cffunction name="setAuthSecret" access="public" returntype="void">
<cfargument name="authSecret" required="true" type="string">
<cfset variables.instance.authSecret = arguments.authSecret>
</cffunction>
<cffunction name="setCallback" access="public" returntype="void" hint="call back url from api">
<cfargument name="callback" required="true" type="string">
<cfset variables.instance.callback = arguments.callback>
</cffunction>
</cfcomponent>