The init() method is the pseudo-constructor for the config component. This method configures and returns the config component.
reactor.config.config = init(pathToConfigXml)
|
Argument |
Required |
Type |
Description |
|---|---|---|---|
|
pathToConfigXml |
Yes |
String |
This is a relative or absolute path to a reactor XML configuration file. |
The getObjectConfig() method returns the XML configuration information for a specific database object. If the object is not configured a default configuration is returned.
This method is only intended for use by Reactor. This method may change or be removed in future versions of Reactor.
string = getObjectConfig(alias)
|
Argument |
Required |
Type |
Description |
|---|---|---|---|
|
alias |
Yes |
String |
The alias of the object to get the configuration XML for. |
The setDsn() method sets the ColdFusion datasource that Reactor will use to access data.
setDsn(alias)
|
Argument |
Required |
Type |
Description |
|---|---|---|---|
|
alias |
Yes |
String |
The datasource to use. |
The getDsn() method gets the ColdFusion datasource that Reactor will use to access data.
string = getDsn()
The setType() method sets the type of database that Reactor is working with.
setType(type)
|
Argument |
Required |
Type |
Description |
|---|---|---|---|
|
type |
Yes |
String |
The type of database being used. Options are:
|
The getType() method gets the type of database that Reactor is working with.
string = getType()
The setMapping() method sets the location where Reactor-generated files will be written. Although this method is "setMapping" this does not need to be a ColdFusion mapping, it can also be a relative path from the application's webroot.
For example, if my application's webroot is in "c:\inetpub\myApp" then I could specify "/data" for "c:\inetpub\myApp\data". Alternativly "/data" could be a mapping to another directory outside of the webroot.
setMapping(mapping)
|
Argument |
Required |
Type |
Description |
|---|---|---|---|
|
mapping |
Yes |
String |
The relative path or mapping to the directory where reactor will write generated files. |
The getMapping() method gets the location where Reactor writes generated files.
string = getMapping()
The getMappingObjectStem() method translates the mapping named (set by setMapping()) to the root portion of a package name.
This method is only intended for use by Reactor. This method may change or be removed in future versions of Reactor.
string = getMappingObjectStem()
The setMode() method sets the circumstances under which Reactor will generate files.
setMode(mode)
|
Argument |
Required |
Type |
Description |
|---|---|---|---|
|
mode |
Yes |
String |
The mode reactor is in. Options are:
Note: Custom files are never regenerated when they already exist. |
The getMode() method gets the mode Reactor is in.
string = getMode()
The setProject() method sets the name of the project Reactor is being used in. This is akin to the application name used in the <cfapplication> tag. For a given application this name should never be changed once it's set. Reactor hard codes this name into the custom objects to specify the location of project files. If this changes all of the custom objects need to be manually updated or deleted and regenerated.
setProject(project)
|
Argument |
Required |
Type |
Description |
|---|---|---|---|
|
project |
Yes |
String |
The name of the project. |
The getProject() method gets the project name.
string = getProject()
The setUsername() method sets the username that Reactor uses when querying the database. This setting is not required if your datasource does not require it.
setUsername(username)
|
Argument |
Required |
Type |
Description |
|---|---|---|---|
|
username |
Yes |
String |
The DSN username to use. |
The getUsername() method gets the DSN username.
string = getUsername()
The setPassword() method sets the password that Reactor uses when querying the database. This setting is not required if your datasource does not require it.
setPassword(password)
|
Argument |
Required |
Type |
Description |
|---|---|---|---|
|
password |
Yes |
String |
The DSN password to use. |
The getPassword() method gets the DSN password.
string = getPassword()