WireBox : Dependency Injection & AOP
7.x
7.x
  • Introduction
    • Contributing Guide
    • Release History
      • What's New With 7.2.0
      • What's New With 7.1.0
      • What's New With 7.0.0
    • Upgrading to WireBox 7
    • About This Book
      • Author
  • Getting Started
    • Overview
    • Installing WireBox
    • Getting Jiggy Wit It!
      • Instance Creations
      • Binder Introduction
      • Scoping
      • Eager Init
      • How WireBox Resolves Dependencies
    • Migrating From ColdSpring
  • Configuration
    • Configuring WireBox
      • Binder Configuration Properties
      • Binder Environment Properties
      • ColdBox Enhanced Binder
      • Types & Scopes
      • Data Configuration Settings
      • Programmatic Configuration
    • Mapping DSL
      • Mapping Initiators
      • Mapping Destinations
      • MapDirectory() Influence & Filters
      • Persistence DSL
      • Dependencies DSL
        • Mapping Extra Attributes
      • Mapping DSL Examples
      • Influence Instances at Runtime
      • Processing Mappings
    • Component Annotations
      • Persistence Annotations
      • CacheBox Annotations
    • Parent Object Definitions
  • Usage
    • WireBox Injector
      • Injector Constructor Arguments
      • Injection Idioms
      • Common Methods
    • Injection DSL
      • ColdBox Namespace
      • CacheBox Namespace
      • EntityService Namespace
      • Executor Namespace
      • Java Namespace
      • LogBox Namespace
      • Models Namespace
      • Provider Namespace
      • WireBox Namespace
    • WireBox Delegators
    • WireBox Event Model
      • WireBox Events
      • WireBox Listeners
        • ColdBox Mode Listener
        • Standalone Mode Listener
  • Advanced Topics
    • Child Injectors
    • Lazy Properties
    • Object Persistence & Thread Safety
    • ORM Entity Injection
    • Providers
      • Custom Providers
      • toProvider() closures
      • Virtual Provider Injection DSL
      • Virtual Provider Mapping
      • Virtual Provider Lookup Methods
      • Provider onMissingMethod Proxy
      • Scope Widening Injection
    • Property Observers
    • Runtime Mixins()
    • WireBox Object Populator
      • populateFromXML
      • populateFromQuery
      • populateFromStruct
      • populateFromQueryWithPrefix
      • populateFromJSON
    • Virtual Inheritance
  • Extending WireBox
    • Custom DSL
      • The DSL Builder Interface
      • Registering a Custom DSL
    • Custom Scopes
      • The Scope Interface
      • Scoping Process
      • Registering a Custom Scope
    • WireBox Injector Interface
  • Aspect Oriented Programming
    • AOP Intro
      • Overview
        • AOP Vocabulary
      • Activate The AOP Listener
      • Create Your Aspect
        • MethodInvocation Useful Methods
        • MethodLogger Aspect
      • Aspect Registration
      • Aspect Binding
      • Auto Aspect Binding
        • ClassMatcher Annotation DSL
        • MethodMatcher Annotation DSL
      • Included Aspects
        • CFTransaction
        • HibernateTransaction
        • MethodLogger
      • Summary
Powered by GitBook
On this page
  • 1st Level DSL
  • 2nd Level DSL
  • 3rd Level DSL
  • 4th Level DSL

Was this helpful?

Edit on GitHub
Export as PDF
  1. Usage
  2. Injection DSL

CacheBox Namespace

Whenever your models need anything from the ColdBox application then you can leverage the coldbox: namespace for injections.

1st Level DSL

DSL

Description

coldbox

Get the ColdBox controller reference

2nd Level DSL

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

3rd Level DSL

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

4th Level DSL

DSL

Description

coldbox:moduleSettings:{module}:{setting}

Get a module setting. Very similar to the 3rd level dsl

// some examples
property name="moduleService"   inject="coldbox:moduleService";
property name="producer"        inject="coldbox:interceptor:MessageProducer";
property name="appPath"         inject="coldbox:coldboxSetting:ApplicationPath";
PreviousColdBox NamespaceNextEntityService Namespace

Last updated 2 years ago

Was this helpful?