> For the complete documentation index, see [llms.txt](https://cfconfig.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cfconfig.ortusbooks.com/using-the-services/usage.md).

# Component Overview

Here are the main components in the project

#### BaseConfig.cfc

This class represents the configuration of a CF engine. It is agnostic and doesn't contain any particular behavior for a specific engine.\
Not all the data it stores applies to every engine though. The `BaseConfig.cfc` is not capable of reading or writing the config, it merely holds the data in a generic manner. If you want to read or write to/from a specific engine's format, you'll need to create one of the engine-specific subclasses, all of which extend `BaseConfig.cfc`.

#### Engine-specific mappers

* **JSONConfig.cfc** - Engine-agnostic JSON format
* **Lucee4Server.cfc** - Lucee 4.x server context
* **Lucee4Web.cfc** - Lucee 4.x web context
* **Lucee5Server.cfc** - Lucee 5.x server context
* **Lucee5Web.cfc** - Lucee 5.x web context
* **Railo4Server.cfc** - Railo 4.x server context
* **Railo4Web.cfc** - Railo 4.x web context
* **Adobe9.cfc** - Adobe ColdFusion 9
* **Adobe10.cfc** - Adobe ColdFusion 10
* **Adobe11.cfc** - Adobe ColdFusion 11
* **Adobe2016.cfc** - Adobe Coldfusion 2016
* **Adobe2018.cfc** - Adobe Coldfusion 2018

### Usage

Each of the components above supports these public methods:

* `setCFHomePath()` - Points to the server home where the config files are to be read or written.
* `read( CFHomePath )` - Extract the config from the files found in the server home. You can override `CFHomePath` here too.
* `write( CFHomePath )` - Write the config out to the files in the server home whether or not they already exist. You can override `CFHomePath` here too.
* `getMemento()` - Return all configuration in as a raw CFML data structure. Useful for passing config values to another instance.
* `setMemento()` - Accept configuration as a raw CFML data structure. Useful for accepting another instance's data.

Create an instance of the component that corresponds to the server that you'd like to read or write config settings from, or the `BaseConfig` class if you want to deal with the generic JSON-based config.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cfconfig.ortusbooks.com/using-the-services/usage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
