-
-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathModuleConfig.bx
More file actions
146 lines (127 loc) · 4.05 KB
/
ModuleConfig.bx
File metadata and controls
146 lines (127 loc) · 4.05 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/**
* This is the module descriptor and entry point for your module in the runtime.
* The unique name of the module is the name of the directory on the modules folder
* or the name property in the box.json file.
* <p>
* A BoxLang mapping will be created for you with the name of the module as well using the
* this.mapping property.
*<p>
* Every module will have its own classloader that will be used to load the module libs and dependencies.
*/
class {
/**
* --------------------------------------------------------------------------
* Injections
* --------------------------------------------------------------------------
*/
property name="moduleRecord";
property name="boxRuntime";
property name="functionService";
property name="componentService";
property name="interceptorService";
property name="asyncService";
property name="schedulerService";
property name="datasourceService";
property name="cacheService";
property name="log";
/**
* --------------------------------------------------------------------------
* Module Properties
* --------------------------------------------------------------------------
* Here is where you define the properties of your module that the module service
* will use to register and activate your module
*/
/**
* Your module version. Try to use semantic versioning
* @mandatory
*/
this.version = "@build.version@+@build.number@";
/**
* The BoxLang mapping for your module. All BoxLang modules are registered with an internal
* mapping prefix of : bxModules.{this.mapping}, /bxmodules/{this.mapping}. Ex: bxModules.test, /bxmodules/test
* If you do not want the prefix, then set the prefix key to be an empty string "".
*/
this.mapping = {
// Name of the mapping
name: "coldbox",
// Do not use the default prefix of bxModules, we use a global /coldbox mapping
usePrefix: false
};
/**
* The public mapping exposed by the module to the web.
* By default, BoxLang uses /bxModules/{this.mapping}/public as the public mapping
* We override it to be: /coldbox/system/exceptions => {this.modulePath}/system/exceptions
*/
this.publicMapping = {
// Name of the mapping
name: "coldbox/system/exceptions",
// Do not use the default prefix of bxModules
usePrefix: false,
// The path to the public resources
path: "system/exceptions"
}
/**
* Who built the module
*/
this.author = "Luis Majano";
/**
* The module description
*/
this.description = "The enhanced version of ColdBox for BoxLang";
/**
* The module web URL
*/
this.webURL = "https://www.coldbox.org";
/**
* This boolean flag tells the module service to skip the module registration/activation process.
*/
this.enabled = true;
/**
* The module dependencies that this module needs to be activated before this module is activated.
* A list of module slugs: Example: [ "bxai", "bxoshi" ]
*/
this.dependencies = [];
/**
* --------------------------------------------------------------------------
* Module Methods
* --------------------------------------------------------------------------
*/
/**
* Called by the ModuleService on module registration
*/
function configure(){
/**
* Every module has a settings configuration object
*/
settings = {
};
/**
* The module interceptors to register into the runtime
*/
interceptors = [
// { class="interceptors.Listener", properties={} }
];
/**
* A list of custom interception points to register into the runtime
*/
customInterceptionPoints = [];
}
/**
* Called by the ModuleService on module activation
*/
function onLoad(){
}
/**
* Called by the ModuleService on module deactivation
*/
function onUnload(){
}
/**
* --------------------------------------------------------------------------
* Module Events
* --------------------------------------------------------------------------
* You can listen to any runtime events by creating the methods
* that match the approved runtime interception points
* https://boxlang.ortusbooks.com/boxlang-framework/interceptors/core-interception-points
*/
}