-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathModuleConfig.cfc
65 lines (58 loc) · 1.94 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
58
59
60
61
62
63
64
65
/**
*********************************************************************************
* Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
* www.coldbox.org | www.luismajano.com | www.ortussolutions.com
********************************************************************************
*/
component {
// Module Properties
this.title = "cbfeeds";
this.author = "Luis Majano";
this.webURL = "http://www.ortussolutions.com";
this.description = "A module that can consume and generate fancy RSS/ATOM feeds";
// If true, looks for views in the parent first, if not found, then in the module. Else vice-versa
this.viewParentLookup = true;
// If true, looks for layouts in the parent first, if not found, then in module. Else vice-versa
this.layoutParentLookup = true;
// CF Mapping
this.cfMapping = "cbfeeds";
function configure(){
}
/**
* Fired when the module is registered and activated.
*/
function onLoad(){
// load parent settings
parseParentSettings();
}
/**
* Fired when the module is unregistered and unloaded
*/
function onUnload(){
}
/**
* parse parent settings
*/
private function parseParentSettings(){
var oConfig = controller.getSetting( "ColdBoxConfig" );
var configStruct = controller.getConfigSettings();
var feeds = oConfig.getPropertyMixin( "feeds", "variables", structnew() );
//defaults
configStruct.feeds = {
// leverage the cache for storage of feed reading, leverages the 'default' cache
useCache = true,
// where to store the cache, options are: [ram, file]
cacheType = "ram",
// The cache provider
cacheProvider = "default",
// if using file cache, the location to store the cached files
cacheLocation = "",
// the cache timeout for the items in seconds
cacheTimeout = 30,
// the http timeout for the cfhttp operations in seconds
httpTimeout = 30
};
// incorporate settings
structAppend( configStruct.feeds, feeds, true );
}
}