Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
You can also request Java objects from the injection dsl.
DSL
Description
java:{class}
Get a reference to the passed in class
The injection DSL is a domain specific language that denotes what to inject in the current placeholder: property, argument, or method via the inject annotation. This injection DSL not only can it be used via annotations but also via our mapping DSL whenever a dsl
argument can be used. This DSL is constructed by joining words separated by a :
colon. The first part of this string is what we will denote as the injection DSL Namespace.
Every cfproperty
can be annotated with our injection annotations:
@inject
: The injection DSL
@scope
: The visibility scope to inject the dependency into. By default it injects into variables
scope
You can also use annotated constructor arguments with the inject annotation.
Caution In full script components, annotating inline arguments is broken in Adobe ColdFusion 9. You will have to annotate them via the alternative annotation syntax in ColdFusion 9 via the javadocs style comments.
You can also annotate setter methods with the inject annotation to provide injections
WireBox offers a wide gamut of annotation namespaces you can use in your CFML applications and ColdBox applications. However, we took it a step further and allowed you to create your own custom DSL namespaces making your annotations come alive!
In order to use this namespace you will need the cborm
module installed in your application: install cborm
Gives you the ability to easily inject base ORM services or binded virtual entity services for you:
The executor namespace is both available in ColdBox and WireBox standalone and it is used to get references to created asynchronous executor thread pools.
This DSL namespace interacts with the loaded LogBox instance.
DSL
Description
entityService
Inject a BaseORMService
object for usage as a generic service layer
entityService:{entity}
Inject a VirtualEntityService
object for usage as a service layer based off the name of the entity passed in.
DSL
Description
executor
Inject an executor using the property name as the key
executor:{name}
Inject an executor by name
DSL
Description
coldbox
Get the ColdBox controller reference
DSL
Description
coldbox:appScheduler
Get a reference to the global application scheduler
coldbox:asyncManager
Get a reference to the ColdBox Async Manager
coldbox:configSettings
Get the application's configuration structure
coldbox:coldboxSettings
Get the framework's configuration structure
coldbox:dataMarshaller
Get the ColdBox data marshaling reference
coldbox:flash
Get a reference to the application's flash scope object
coldbox:handlerService
Get a reference to the handler service
coldbox:interceptorService
Get a reference to the interceptor service
coldbox:loaderService
Get a reference to the loader service
coldbox:moduleService
Get a reference to the ColdBox Module Service
coldbox:moduleConfig
Get a reference to the entire modules
configuration struct
coldbox:renderer
Get the ColdBox rendering engine reference
coldbox:requestService
Get a reference to the request service
coldbox:requestContext
Get a reference to the current request context object in the request.
coldbox:router
Get a reference to the application global router.cfc
coldbox:routingService
Get a reference to the Routing Service
coldbox:schedulerService
Get a reference to the Scheduler Service
DSL
Description
coldbox:interceptor:{name}
coldbox:moduleSettings:{module}
Inject the entire {module} settings structure
coldbox:moduleConfig:{module}
Inject the entire {module} configurations structure
coldbox:coldboxSetting:{setting}
Get a ColdBox setting {setting} and inject it
coldbox:setting:{setting}
Get the ColdBox application {setting} setting and inject it
coldbox:setting:{setting}@{module}
Get the ColdBox application {setting} from the {module} and inject it
DSL
Description
coldbox:moduleSettings:{module}:{setting}
Get a module setting. Very similar to the 3rd level dsl
DSL
Description
coldbox
Get the coldbox controller reference
DSL
Description
coldbox:asyncManager
The global Async Manager
coldbox:appScheduler
The global application scheduler object
coldbox:configSettings
Get a reference to the application's configuration settings
coldbox:coldboxSettings
The global ColdBox internal settings struct
coldbox:dataMarshaller
Get a reference to the application's data marshaller
coldbox:flash
Get a reference to the application's flash scope object
coldbox:handlerService
Get a reference to the handler service
coldbox:interceptorService
Get a reference to the interceptor service
coldbox:loaderService
Get a reference to the loader service
coldbox:moduleService
Get a reference to the ColdBox Module Service
coldbox:renderer
Get a reference to a ColdBox renderer object
coldbox:requestContext
Get a reference to the current transient request context
coldbox:requestService
Get a reference to the request service
coldbox:router
Get a reference to the application router object
coldbox:routingService
Get a reference to the routing service
coldbox:schedulerService
Get a reference to the scheduler service
DSL
Description
coldbox:coldboxSetting:{setting}
Get a setting from the ColdBox settings instead of the Application settings
coldbox:setting:{setting}
Get the coldbox application {setting} setting and inject it
coldbox:setting:{setting}@{module}
Get the coldbox application {setting} from the {module} and inject it
coldbox:interceptor:{name}
Get a reference of a named interceptor {name}
coldbox:moduleSettings:{module}
Inject the entire {module} settings structure
coldbox:moduleConfig:{module}
Inject the entire {module} configurations structureF
DSL
Description
coldbox:moduleSettings:{module}:setting
Inject a single setting from a module
DSL | Description |
| Get a reference to the application's LogBox instance |
| Get a reference to the root logger |
| Get a reference to a named logger by its category name |
| Get a reference to a named logger using the current target object's path as the category name |
DSL
Description
provider
Build an object provider that will return the mapping according to the property, method or argument name.
provider:{name}
Build an object provider that will return the {name} mapping.
provider:{injectionDSL}
Build an object provider that will return the object that the {injectionDSL} refers to
DSL
Description
wirebox
Get a reference to the current injector
DSL
Description
wirebox:asyncManager
Get a reference to the Async Manager
wirebox:binder
Get a reference to the injector's binder
wirebox:eventManager
Get a reference to injector's event manager
wirebox:objectMetadata
Inject the target object's metadata struct
wirebox:parent
Get a reference to the parent injector (if any)
wirebox:properties
Get the entire properties structure the injector is initialized with. If running within a ColdBox context then it is the structure of application settings
wirebox:populator
Get a reference to a WireBox's Object Populator utility
wirebox:targetId
The target ID used when injecting the object
DSL
Description
wirebox:child:{name}
Inject a child injector by name
wirebox:property:{name}
Retrieve one key of the properties structure
wirebox:scope:{scope}
Get a direct reference to an internal or custom scope object
DSL
Description
wirebox:child:{name}:{id}
Inject the id
from the named
child injector
wirebox:child:{name}:{dsl}
Inject the dsl
from the named
child injector
DSL
Description
empty
Same as saying id. Get a mapped instance with the same name as defined in the property, argument or setter method.
id
Get a mapped instance with the same name as defined in the property, argument or setter method.
model
Get a mapped instance with the same name as defined in the property, argument or setter method.
DSL
Description
model:{name}
Get a mapped instance by using the second part of the DSL as the mapping name.
id:{name}
Get a mapped instance by using the second part of the DSL as the mapping name.
DSL
Description
model:{name}:{method}
Get the {name} instance object, call the {method} and inject the results
id:{name}:{method}
Get the {name} instance object, call the {method} and inject the results