generated from coldbox-modules/module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ModuleConfig.cfc
57 lines (48 loc) · 1.33 KB
/
ModuleConfig.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
/**
* Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
* www.ortussolutions.com
* ---
*/
component {
// Module Properties
this.title = "Kutt SDK";
this.author = "Ortus Solutions";
this.webURL = "https://www.ortussolutions.com";
this.description = "Tiny URL SDK for kutt.it";
this.version = "@build.version@[email protected]@";
// Model Namespace
this.modelNamespace = "Kutt";
// CF Mapping
this.cfmapping = "Kutt";
// Dependencies
this.dependencies = [];
/**
* Configure Module
*/
function configure(){
// module settings - stored in modules.name.settings
settings = {
"enabled" : getSystemSetting( "TINYURL_ENABLED", true ),
"endpoint" : getSystemSetting( "KUTT_ENDPOINT", "" ),
"authToken" : getSystemSetting( "KUTT_AUTHTOKEN", "" ),
"defaultExipration" : "30 days",
"throwOnError" : getSystemSetting( "KUTT_THROWONERROR", false )
};
if ( !len( settings.endpoint ) ) {
log.error(
"The tiny-url module requires an endpoint to be set in the configuration. Module functionality has been deactivated"
);
settings.enabled = false;
}
}
/**
* Fired when the module is registered and activated.
*/
function onLoad(){
}
/**
* Fired when the module is unregistered and unloaded
*/
function onUnload(){
}
}