coldbox.system.ioc.config

Class Mapping

lucee.Component
    extended by coldbox.system.ioc.config.Mapping

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- I model a WireBox object mapping in all of its glory and splendour to create the object it represents

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any DIConstructorArguments


    • access = public
    • returntype = any
    true false
    array DIMethodArguments


    • access = public
    • returntype = any
    true false
    array DIProperties


    • access = public
    • returntype = any
    true false
    array DISetters


    • access = public
    • returntype = any
    true false
    array alias
          Mapping Properties.

    • access = public
    • returntype = any
    true false
    boolean aspect


    • access = public
    • returntype = any
    true false
    boolean aspectAutoBinding


    • access = public
    • returntype = any
    true false
    boolean autoInit


    • access = public
    • returntype = any
    true false
    any autoWire


    • access = public
    • returntype = any
    true false
    struct cache


    • access = public
    • returntype = any
    true false
    any constructor


    • access = public
    • returntype = any
    true false
    any delegates


    • access = public
    • returntype = any
    true false
    boolean discovered


    • access = public
    • returntype = any
    true false
    any dsl


    • access = public
    • returntype = any
    true false
    any eagerInit


    • access = public
    • returntype = any
    true false
    struct extraAttributes


    • access = public
    • returntype = any
    true false
    any influenceClosure


    • access = public
    • returntype = any
    true false
    any lazyProperties


    • access = public
    • returntype = any
    true false
    any method


    • access = public
    • returntype = any
    true false
    array mixins


    • access = public
    • returntype = any
    true false
    any name


    • access = public
    • returntype = any
    true false
    struct objectMetadata


    • access = public
    • returntype = any
    true false
    any observedProperties


    • access = public
    • returntype = any
    true false
    array onDIComplete


    • access = public
    • returntype = any
    true false
    any path


    • access = public
    • returntype = any
    true false
    array providerMethods


    • access = public
    • returntype = any
    true false
    any scope


    • access = public
    • returntype = any
    true false
    any threadSafe


    • access = public
    • returntype = any
    true false
    any type


    • access = public
    • returntype = any
    true false
    any value


    • access = public
    • returntype = any
    true false
    any virtualInheritance


    • access = public
    • returntype = any
    true false
    Constructor Summary
    init(any name)
          Constructor.
    Method Summary
    Mapping addDIConstructorArgument([any name], [any ref], [any dsl], [any value], [any javaCast], any required='true', [any type='any'])
         Add a new constructor argument to this mapping.
    Mapping addDIMethodArgument([any name], [any ref], [any dsl], [any value], [any javaCast], any required='true', [any type='any'])
         Add a new method argument to this mapping.
    Mapping addDIProperty(any name, [any ref], [any dsl], [any value], [any javaCast], [any scope='variables'], [boolean required='true'], [any type='any'], [boolean delegate='false'], [any delegatePrefix=''], [any delegateSuffix=''], [any delegateExcludes='[runtime expression]'], [any delegateIncludes='[runtime expression]'])
         Add a new property injection definition.
    Mapping addDISetter(any name, [any ref], [any dsl], [any value], [any javaCast], [any argName])
         Add a new DI Setter Definition.
    Mapping addProviderMethod(any method, any mapping)
         Add a new provider method to this mapping.
    string getAlias()
    string getAspect()
    string getAspectAutoBinding()
    string getAutoInit()
    string getAutoWire()
    string getCache()
    struct getCacheProperties()
         Get the cache properties struct.
    any getComponentAnnotation(any key, [any defaultValue=''])
         Get the component annotation metadata by key.
    string getConstructor()
    string getDIConstructorArguments()
    string getDIMethodArguments()
    string getDIProperties()
    string getDISetters()
    string getDelegates()
    string getDiscovered()
    string getDsl()
    string getEagerInit()
    string getExtraAttributes()
    string getInfluenceClosure()
    string getLazyProperties()
    struct getMemento()
         Get the mapping's memento structure.
    string getMethod()
    string getMixins()
    string getName()
    private struct getNewDIDefinition()
         Get a new DI definition structure.
    string getObjectMetadata()
    string getObservedProperties()
    string getOnDIComplete()
    string getPath()
    string getProviderMethods()
    string getScope()
    string getThreadSafe()
    string getType()
    string getValue()
    string getVirtualInheritance()
    boolean hasDelegates()
         Do we have any delegates declared explicitly.
    boolean hasInfluenceClosure()
         Verify if the influence closure has been seeded.
    boolean isAspect()
         Flag describing if this mapping is an AOP aspect or not.
    boolean isAspectAutoBinding()
         Is this mapping an auto aspect binding.
    boolean isAutoInit()
         Using auto init or not.
    boolean isAutoWire()
         Flag describing if you are using autowire or not as Boolean.
    boolean isDSL()
         Does this mapping have a DSL construction element or not as Boolean.
    boolean isDiscovered()
         Checks if this mapping has already been processed or not.
    boolean isEagerInit()
         Is this mapping eager initialized or not as Boolean.
    boolean isTransient()
         Verify if this is a transient object.
    boolean isVirtualInheritance()
         Checks if the mapping needs virtual inheritance or not.
    Mapping process(any binder, any injector, [any metadata])
         Process a mapping for metadata discovery and more.
    private Mapping processAOPBinding(any binder, any metadata)
         Process the AOP self binding aspects.
    private any processComponentDelegates(any expression)
         Process all the component delegates using WireBox delegate syntax expression.
    private Mapping processDIMetadata(any binder, any metadata, [any dependencies='[runtime expression]'])
         Process methods/properties for dependency injection.
    any processFunctionMetadata(any metadata)
         Process a function's metadata for DI Injection.
    Mapping processMemento(any memento, [any excludes=''])
         Process a mapping memento.
    private any processPropertyMetadata(any metadata)
         Process a property metadata for use in WireBox.
    any setAlias(array alias)
    any setAspect(boolean aspect)
    any setAspectAutoBinding(boolean aspectAutoBinding)
    any setAutoInit(boolean autoInit)
    any setAutoWire(any autoWire)
    any setCache(struct cache)
    any setCacheProperties(any key, [any timeout=''], [any lastAccessTimeout=''], [any provider='default'])
         Set the cache properties for this mapping.
    any setConstructor(any constructor)
    any setDIConstructorArguments(any DIConstructorArguments)
    any setDIMethodArguments(array DIMethodArguments)
    any setDIProperties(array DIProperties)
    any setDISetters(array DISetters)
    any setDelegates(any delegates)
    any setDiscovered(boolean discovered)
    any setDsl(any dsl)
    any setEagerInit(any eagerInit)
    any setExtraAttributes(struct extraAttributes)
    any setInfluenceClosure(any influenceClosure)
    any setLazyProperties(any lazyProperties)
    any setMethod(any method)
    any setMixins(array mixins)
    any setName(any name)
    any setObjectMetadata(struct objectMetadata)
    any setObservedProperties(any observedProperties)
    any setOnDIComplete(array onDIComplete)
    any setPath(any path)
    any setProviderMethods(array providerMethods)
    any setScope(any scope)
    any setThreadSafe(any threadSafe)
    any setType(any type)
    any setValue(any value)
    any setVirtualInheritance(any virtualInheritance)
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(any name)

    Constructor

    Parameters:
    name - The mapping name

    Property Detail

    DIConstructorArguments

    property any DIConstructorArguments

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

    DIMethodArguments

    property array DIMethodArguments

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

    DIProperties

    property array DIProperties

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

    DISetters

    property array DISetters

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

    alias

    property array alias

    Mapping Properties

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

    aspect

    property boolean aspect

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

    aspectAutoBinding

    property boolean aspectAutoBinding

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

    autoInit

    property boolean autoInit

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

    autoWire

    property any autoWire

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

    cache

    property struct cache

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

    constructor

    property any constructor

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

    delegates

    property any delegates

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

    discovered

    property boolean discovered

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

    dsl

    property any dsl

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

    eagerInit

    property any eagerInit

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

    extraAttributes

    property struct extraAttributes

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

    influenceClosure

    property any influenceClosure

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

    lazyProperties

    property any lazyProperties

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

    method

    property any method

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

    mixins

    property array mixins

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

    name

    property any name

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

    objectMetadata

    property struct objectMetadata

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

    observedProperties

    property any observedProperties

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

    onDIComplete

    property array onDIComplete

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

    path

    property any path

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

    providerMethods

    property array providerMethods

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

    scope

    property any scope

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

    threadSafe

    property any threadSafe

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

    type

    property any type

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

    value

    property any value

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

    virtualInheritance

    property any virtualInheritance

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

    Method Detail

    addDIConstructorArgument

    public Mapping addDIConstructorArgument([any name], [any ref], [any dsl], [any value], [any javaCast], any required='true', [any type='any'])

    Add a new constructor argument to this mapping

    Parameters:
    name - The name of the constructor argument (Not used for: JAVA,WEBSERVICE)
    ref - The reference mapping id this constructor argument maps to
    dsl - The construction dsl this argument references. If used, the name value must be used.
    value - The explicit value of the constructor argument, if passed.
    javaCast - The type of javaCast() to use on the value of the argument. Only used if using dsl or ref arguments
    required - If the argument is required or not, by default we assume required DI arguments
    type - The type of the argument

    addDIMethodArgument

    public Mapping addDIMethodArgument([any name], [any ref], [any dsl], [any value], [any javaCast], any required='true', [any type='any'])

    Add a new method argument to this mapping

    Parameters:
    name - The name of the method argument (Not used for: JAVA,WEBSERVICE)
    ref - The reference mapping id this method argument maps to
    dsl - The construction dsl this argument references. If used, the name value must be used.
    value - The explicit value of the method argument, if passed.
    javaCast - The type of javaCast() to use on the value of the argument. Only used if using dsl or ref arguments
    required - If the argument is required or not, by default we assume required DI arguments
    type - The type of the argument

    addDIProperty

    public Mapping addDIProperty(any name, [any ref], [any dsl], [any value], [any javaCast], [any scope='variables'], [boolean required='true'], [any type='any'], [boolean delegate='false'], [any delegatePrefix=''], [any delegateSuffix=''], [any delegateExcludes='[runtime expression]'], [any delegateIncludes='[runtime expression]'])

    Add a new property injection definition

    Parameters:
    name - The name of the property to inject
    ref - The reference mapping id this property maps to
    dsl - The construction dsl this property references. If used, the name value must be used.
    value - The explicit value of the property, if passed.
    javaCast - The type of javaCast() to use on the value of the value. Only used if using dsl or ref arguments
    scope - The scope in the CFC to inject the property to. By default it will inject it to the variables scope
    required - If the property is required or not, by default we assume required DI
    type - The type of the property
    delegate - If the property is an object delegate
    delegatePrefix - If the property has a delegate prefix
    delegateSuffix - If the property has a delegate suffix
    delegateExcludes - If the property has a delegate exclusion list
    delegateIncludes - If the property has a delegate inclusion list

    addDISetter

    public Mapping addDISetter(any name, [any ref], [any dsl], [any value], [any javaCast], [any argName])

    Add a new DI Setter Definition

    Parameters:
    name - The name of the setter to inject
    ref - The reference mapping id this setter maps to
    dsl - The construction dsl this setter references. If used, the name value must be used.
    value - The explicit value of the setter, if passed.
    javaCast - The type of javaCast() to use on the value of the value. Only used if using dsl or ref arguments
    argName - The name of the argument to use, if not passed, we default it to the setter name

    addProviderMethod

    public Mapping addProviderMethod(any method, any mapping)

    Add a new provider method to this mapping

    Parameters:
    method - The provided method to override as a provider
    mapping - The mapping to provide via the selected method

    getAlias

    public string getAlias()


    getAspect

    public string getAspect()


    getAspectAutoBinding

    public string getAspectAutoBinding()


    getAutoInit

    public string getAutoInit()


    getAutoWire

    public string getAutoWire()


    getCache

    public string getCache()


    getCacheProperties

    public struct getCacheProperties()

    Get the cache properties struct


    getComponentAnnotation

    public any getComponentAnnotation(any key, [any defaultValue=''])

    Get the component annotation metadata by key

    Parameters:
    key - The annotation to look for in the component
    defaultValue - Default value to return if not found
    Returns:
    any

    getConstructor

    public string getConstructor()


    getDIConstructorArguments

    public string getDIConstructorArguments()


    getDIMethodArguments

    public string getDIMethodArguments()


    getDIProperties

    public string getDIProperties()


    getDISetters

    public string getDISetters()


    getDelegates

    public string getDelegates()


    getDiscovered

    public string getDiscovered()


    getDsl

    public string getDsl()


    getEagerInit

    public string getEagerInit()


    getExtraAttributes

    public string getExtraAttributes()


    getInfluenceClosure

    public string getInfluenceClosure()


    getLazyProperties

    public string getLazyProperties()


    getMemento

    public struct getMemento()

    Get the mapping's memento structure


    getMethod

    public string getMethod()


    getMixins

    public string getMixins()


    getName

    public string getName()


    getNewDIDefinition

    private struct getNewDIDefinition()

    Get a new DI definition structure


    getObjectMetadata

    public string getObjectMetadata()


    getObservedProperties

    public string getObservedProperties()


    getOnDIComplete

    public string getOnDIComplete()


    getPath

    public string getPath()


    getProviderMethods

    public string getProviderMethods()


    getScope

    public string getScope()


    getThreadSafe

    public string getThreadSafe()


    getType

    public string getType()


    getValue

    public string getValue()


    getVirtualInheritance

    public string getVirtualInheritance()


    hasDelegates

    public boolean hasDelegates()

    Do we have any delegates declared explicitly


    hasInfluenceClosure

    public boolean hasInfluenceClosure()

    Verify if the influence closure has been seeded.


    isAspect

    public boolean isAspect()

    Flag describing if this mapping is an AOP aspect or not


    isAspectAutoBinding

    public boolean isAspectAutoBinding()

    Is this mapping an auto aspect binding


    isAutoInit

    public boolean isAutoInit()

    Using auto init or not


    isAutoWire

    public boolean isAutoWire()

    Flag describing if you are using autowire or not as Boolean


    isDSL

    public boolean isDSL()

    Does this mapping have a DSL construction element or not as Boolean


    isDiscovered

    public boolean isDiscovered()

    Checks if this mapping has already been processed or not


    isEagerInit

    public boolean isEagerInit()

    Is this mapping eager initialized or not as Boolean


    isTransient

    public boolean isTransient()

    Verify if this is a transient object


    isVirtualInheritance

    public boolean isVirtualInheritance()

    Checks if the mapping needs virtual inheritance or not


    process

    public Mapping process(any binder, any injector, [any metadata])

    Process a mapping for metadata discovery and more

    Parameters:
    binder - The binder requesting the processing
    injector - The calling injector processing the mapping
    metadata - The metadata of an a-la-carte processing, use instead of retrieving again
    Returns:
    Mapping

    processAOPBinding

    private Mapping processAOPBinding(any binder, any metadata)

    Process the AOP self binding aspects

    Parameters:
    binder - The binder requesting the processing
    metadata - The metadata to process
    Returns:
    Mapping

    processComponentDelegates

    private any processComponentDelegates(any expression)

    Process all the component delegates using WireBox delegate syntax expression

    Parameters:
    expression - The CFC delegates annotation string expression

    processDIMetadata

    private Mapping processDIMetadata(any binder, any metadata, [any dependencies='[runtime expression]'])

    Process methods/properties for dependency injection

    Parameters:
    binder - The binder requesting the processing
    metadata - The metadata to process
    dependencies - The dependencies structure
    Returns:
    Mapping

    processFunctionMetadata

    public any processFunctionMetadata(any metadata)

    Process a function's metadata for DI Injection

    Parameters:
    metadata - The Function metadata to process

    processMemento

    public Mapping processMemento(any memento, [any excludes=''])

    Process a mapping memento. Basically takes in a struct of data to process the mapping's data with.

    Parameters:
    memento - The data memento to process
    excludes - List of memento keys to not process

    processPropertyMetadata

    private any processPropertyMetadata(any metadata)

    Process a property metadata for use in WireBox

    Parameters:
    metadata

    setAlias

    public any setAlias(array alias)

    Parameters:
    alias

    setAspect

    public any setAspect(boolean aspect)

    Parameters:
    aspect

    setAspectAutoBinding

    public any setAspectAutoBinding(boolean aspectAutoBinding)

    Parameters:
    aspectAutoBinding

    setAutoInit

    public any setAutoInit(boolean autoInit)

    Parameters:
    autoInit

    setAutoWire

    public any setAutoWire(any autoWire)

    Parameters:
    autoWire

    setCache

    public any setCache(struct cache)

    Parameters:
    cache

    setCacheProperties

    public any setCacheProperties(any key, [any timeout=''], [any lastAccessTimeout=''], [any provider='default'])

    Set the cache properties for this mapping

    Parameters:
    key - Cache key to use
    timeout - Object Timeout
    lastAccessTimeout - Object Last Access Timeout
    provider - The Cache Provider to use

    setConstructor

    public any setConstructor(any constructor)

    Parameters:
    constructor

    setDIConstructorArguments

    public any setDIConstructorArguments(any DIConstructorArguments)

    Parameters:
    DIConstructorArguments

    setDIMethodArguments

    public any setDIMethodArguments(array DIMethodArguments)

    Parameters:
    DIMethodArguments

    setDIProperties

    public any setDIProperties(array DIProperties)

    Parameters:
    DIProperties

    setDISetters

    public any setDISetters(array DISetters)

    Parameters:
    DISetters

    setDelegates

    public any setDelegates(any delegates)

    Parameters:
    delegates

    setDiscovered

    public any setDiscovered(boolean discovered)

    Parameters:
    discovered

    setDsl

    public any setDsl(any dsl)

    Parameters:
    dsl

    setEagerInit

    public any setEagerInit(any eagerInit)

    Parameters:
    eagerInit

    setExtraAttributes

    public any setExtraAttributes(struct extraAttributes)

    Parameters:
    extraAttributes

    setInfluenceClosure

    public any setInfluenceClosure(any influenceClosure)

    Parameters:
    influenceClosure

    setLazyProperties

    public any setLazyProperties(any lazyProperties)

    Parameters:
    lazyProperties

    setMethod

    public any setMethod(any method)

    Parameters:
    method

    setMixins

    public any setMixins(array mixins)

    Parameters:
    mixins

    setName

    public any setName(any name)

    Parameters:
    name

    setObjectMetadata

    public any setObjectMetadata(struct objectMetadata)

    Parameters:
    objectMetadata

    setObservedProperties

    public any setObservedProperties(any observedProperties)

    Parameters:
    observedProperties

    setOnDIComplete

    public any setOnDIComplete(array onDIComplete)

    Parameters:
    onDIComplete

    setPath

    public any setPath(any path)

    Parameters:
    path

    setProviderMethods

    public any setProviderMethods(array providerMethods)

    Parameters:
    providerMethods

    setScope

    public any setScope(any scope)

    Parameters:
    scope

    setThreadSafe

    public any setThreadSafe(any threadSafe)

    Parameters:
    threadSafe

    setType

    public any setType(any type)

    Parameters:
    type

    setValue

    public any setValue(any value)

    Parameters:
    value

    setVirtualInheritance

    public any setVirtualInheritance(any virtualInheritance)

    Parameters:
    virtualInheritance