coldbox.system.ioc

Class Builder

lucee.Component
    extended by coldbox.system.ioc.Builder

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- The WireBox builder for components, java, etc. I am in charge of building stuff and integration dsl builders.

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
  • serializable : false
  •  
    Property Summary
    type property default serializable required
    any cacheBoxDSL
          CacheBox DSL Utility.

    • access = public
    • returntype = any
    true false
    any coldboxDSL
          ColdBox DSL Utility.

    • access = public
    • returntype = any
    true false
    struct customDSL
          Custom DSL Map Storage.

    • access = public
    • returntype = any
    true false
    any injector
          Injector Reference.

    • access = public
    • returntype = any
    true false
    any log
          Logging utility object.

    • access = public
    • returntype = any
    true false
    any logBox
          LogBox reference.

    • access = public
    • returntype = any
    true false
    any logBoxDSL
          LogBox DSL Utility.

    • access = public
    • returntype = any
    true false
    Constructor Summary
    init(any<Injector> injector)
          Constructor.
    Method Summary
    any buildArgumentCollection(any<Mapping> mapping, any argumentArray, any targetObject)
         Build arguments for a mapping and return the structure representation.
    any buildCFC(any<Mapping> mapping, [any initArguments='[runtime expression]'])
         Build a cfc class via mappings.
    any buildDSLDependency(any definition, any targetID, [any targetObject=''])
         Build a DSL Dependency, if not found, returns null.
    any buildFactoryMethod(any<Mapping> mapping, [any initArguments='[runtime expression]'])
         Build an object using a factory method.
    any buildFeed(any<Mapping> mapping)
         Build an rss feed the WireBox way.
    any buildJavaClass(any<Mapping> mapping)
         Build a Java class via mappings.
    any buildProviderMixer()
         Used to provider providers via mixers on targeted objects.
    any buildSimpleDSL(any dsl, any targetID, any targetObject='')
         Build a DSL Dependency using a simple dsl string.
    any buildWebservice(any<Mapping> mapping, [any initArguments='[runtime expression]'])
         Build a webservice object.
    private any genericGetter()
         Generic getter for Virtual Inheritance.
    private any genericSetter()
         Generic setter for Virtual Inheritance.
    private any getByTypeDSL(any definition, [any targetObject], [any targetID])
         Get dependencies using the mapped type.
    any getCacheBoxDSL()
         Lazy load getter.
    any getColdBoxDSL()
         Lazy load getter.
    string getCustomDSL()
    private any getExecutorDSl(any definition, [any targetObject], [any targetID])
         Get executors.
    string getInjector()
    private any getJavaDSL(any definition, [any targetObject], [any targetID])
         Get a Java object.
    string getLog()
    string getLogBox()
    any getLogBoxDSL()
         Lazy load getter.
    private any getModelDSL(any definition, [any targetObject], [any targetID])
         Get dependencies using the model dependency DSL.
    private any getProviderDSL(any definition, [any targetObject=''], [any targetID])
         Get dependencies using the our provider pattern DSL.
    private any getWireBoxDSL(any definition, [any targetObject], [any targetID])
         Get dependencies using the wirebox dependency DSL.
    boolean isDSLNamespace(any target)
         Verifies if the incoming string is a valid registered DSL namespace.
    boolean isDSLString(any target)
         Verifies if the incoming string is a valid registered DSL string.
    Builder registerCustomBuilders()
         Register custom DSL builders with this main wirebox builder.
    Builder registerDSL(any namespace, any path)
         A direct way of registering custom DSL namespaces.
    any setCacheBoxDSL(any cacheBoxDSL)
    any setColdboxDSL(any coldboxDSL)
    any setCustomDSL(struct customDSL)
    any setInjector(any injector)
    any setLog(any log)
    any setLogBox(any logBox)
    any setLogBoxDSL(any logBoxDSL)
    any toVirtualInheritance(any mapping, any target, any targetMapping)
         Do our virtual inheritance magic.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(any<Injector> injector)

    Constructor. If called without a configuration binder, then WireBox will instantiate the default configuration binder found coldbox.system.ioc.config.DefaultBinder

    Parameters:
    injector - The linked WireBox injector

    Property Detail

    cacheBoxDSL

    property any cacheBoxDSL

    CacheBox DSL Utility

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    coldboxDSL

    property any coldboxDSL

    ColdBox DSL Utility

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    customDSL

    property struct customDSL

    Custom DSL Map Storage

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    injector

    property any injector

    Injector Reference

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    log

    property any log

    Logging utility object

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    logBox

    property any logBox

    LogBox reference

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    logBoxDSL

    property any logBoxDSL

    LogBox DSL Utility

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    Method Detail

    buildArgumentCollection

    public any buildArgumentCollection(any<Mapping> mapping, any argumentArray, any targetObject)

    Build arguments for a mapping and return the structure representation

    Parameters:
    mapping - The mapping to construct
    argumentArray - The argument array of data
    targetObject - The target object we are building the DSL dependency for
    Returns:
    A structure argument collection to initialize an object with

    buildCFC

    public any buildCFC(any<Mapping> mapping, [any initArguments='[runtime expression]'])

    Build a cfc class via mappings

    Parameters:
    mapping - The mapping to construct
    initArguments - The constructor structure of arguments to passthrough when initializing the instance

    buildDSLDependency

    public any buildDSLDependency(any definition, any targetID, [any targetObject=''])

    Build a DSL Dependency, if not found, returns null

    Parameters:
    definition - The dependency definition structure: name, dsl as keys
    targetID - The target ID we are building this dependency for
    targetObject - The target object we are building the DSL dependency for
    Returns:
    The requested object or null if not found and not required
    Throws:
    DSLDependencyNotFoundException - If the requested object is not found and it is required

    buildFactoryMethod

    public any buildFactoryMethod(any<Mapping> mapping, [any initArguments='[runtime expression]'])

    Build an object using a factory method

    Parameters:
    mapping - The mapping to construct
    initArguments - The constructor structure of arguments to passthrough when initializing the instance

    buildFeed

    public any buildFeed(any<Mapping> mapping)

    Build an rss feed the WireBox way

    Parameters:
    mapping - The mapping to construct

    buildJavaClass

    public any buildJavaClass(any<Mapping> mapping)

    Build a Java class via mappings

    Parameters:
    mapping - The mapping to construct

    buildProviderMixer

    public any buildProviderMixer()

    Used to provider providers via mixers on targeted objects


    buildSimpleDSL

    public any buildSimpleDSL(any dsl, any targetID, any targetObject='')

    Build a DSL Dependency using a simple dsl string

    Parameters:
    dsl - The dsl string to build
    targetID - The target ID we are building this dependency for
    targetObject - The target object we are building the DSL dependency for
    Returns:
    The requested DSL object

    buildWebservice

    public any buildWebservice(any<Mapping> mapping, [any initArguments='[runtime expression]'])

    Build a webservice object

    Parameters:
    mapping - The mapping to construct
    initArguments - The constructor structure of arguments to passthrough when initializing the instance

    genericGetter

    private any genericGetter()

    Generic getter for Virtual Inheritance


    genericSetter

    private any genericSetter()

    Generic setter for Virtual Inheritance


    getByTypeDSL

    private any getByTypeDSL(any definition, [any targetObject], [any targetID])

    Get dependencies using the mapped type

    Parameters:
    definition - The dependency definition structure
    targetObject - The target object we are building the DSL dependency for. If empty, means we are just requesting building
    targetID - The target ID we are building this dependency for

    getCacheBoxDSL

    public any getCacheBoxDSL()

    Lazy load getter

    Returns:
    coldbox.system.ioc.dsl.CacheBoxDSL

    getColdBoxDSL

    public any getColdBoxDSL()

    Lazy load getter

    Returns:
    coldbox.system.ioc.dsl.ColdBoxDSL

    getCustomDSL

    public string getCustomDSL()


    getExecutorDSl

    private any getExecutorDSl(any definition, [any targetObject], [any targetID])

    Get executors

    Parameters:
    definition - The dependency definition structure: name, dsl as keys
    targetObject - The target object we are building the DSL dependency for
    targetID - The target ID we are building this dependency for

    getInjector

    public string getInjector()


    getJavaDSL

    private any getJavaDSL(any definition, [any targetObject], [any targetID])

    Get a Java object

    Parameters:
    definition - The dependency definition structure: name, dsl as keys
    targetObject - The target object we are building the DSL dependency for
    targetID - The target ID we are building this dependency for

    getLog

    public string getLog()


    getLogBox

    public string getLogBox()


    getLogBoxDSL

    public any getLogBoxDSL()

    Lazy load getter

    Returns:
    coldbox.system.ioc.dsl.LogBoxDSL

    getModelDSL

    private any getModelDSL(any definition, [any targetObject], [any targetID])

    Get dependencies using the model dependency DSL

    Parameters:
    definition - The dependency definition structure: name, dsl as keys
    targetObject - The target object we are building the DSL dependency for
    targetID - The target ID we are building this dependency for

    getProviderDSL

    private any getProviderDSL(any definition, [any targetObject=''], [any targetID])

    Get dependencies using the our provider pattern DSL

    Parameters:
    definition - The dependency definition structure
    targetObject - The target object we are building the DSL dependency for. If empty, means we are just requesting building
    targetID - The target ID we are building this dependency for

    getWireBoxDSL

    private any getWireBoxDSL(any definition, [any targetObject], [any targetID])

    Get dependencies using the wirebox dependency DSL

    Parameters:
    definition - The dependency definition structure: name, dsl as keys
    targetObject - The target object we are building the DSL dependency for
    targetID - The target ID we are building this dependency for

    isDSLNamespace

    public boolean isDSLNamespace(any target)

    Verifies if the incoming string is a valid registered DSL namespace

    Parameters:
    target - The string to verify if it's a registered namespace

    isDSLString

    public boolean isDSLString(any target)

    Verifies if the incoming string is a valid registered DSL string

    Parameters:
    target - The string to verify if it's a potential DSL

    registerCustomBuilders

    public Builder registerCustomBuilders()

    Register custom DSL builders with this main wirebox builder


    registerDSL

    public Builder registerDSL(any namespace, any path)

    A direct way of registering custom DSL namespaces

    Parameters:
    namespace - The namespace you would like to register
    path - The instantiation path to the CFC that implements this scope, it must have an init() method and implement: coldbox.system.ioc.dsl.IDSLBuilder

    setCacheBoxDSL

    public any setCacheBoxDSL(any cacheBoxDSL)

    Parameters:
    cacheBoxDSL

    setColdboxDSL

    public any setColdboxDSL(any coldboxDSL)

    Parameters:
    coldboxDSL

    setCustomDSL

    public any setCustomDSL(struct customDSL)

    Parameters:
    customDSL

    setInjector

    public any setInjector(any injector)

    Parameters:
    injector

    setLog

    public any setLog(any log)

    Parameters:
    log

    setLogBox

    public any setLogBox(any logBox)

    Parameters:
    logBox

    setLogBoxDSL

    public any setLogBoxDSL(any logBoxDSL)

    Parameters:
    logBoxDSL

    toVirtualInheritance

    public any toVirtualInheritance(any mapping, any target, any targetMapping)

    Do our virtual inheritance magic

    Parameters:
    mapping - The virtual mapping to convert to
    target - The target object
    targetMapping - The target mapping
    Returns:
    The target object