coldbox.system.ioc

Class AbstractIOCAdapter

WEB-INF.cftags.component
        extended by coldbox.system.ioc.AbstractIOCAdapter
Class Attributes:
  • output : false
  •  
    Direct Known Subclasses:
    ColdSpring2Adapter , ColdSpringAdapter , LightWireAdapter , WireBoxAdapter

    A base IOC factory adapter

    Constructor Summary
    init([string definitionFile=''], [struct properties='[runtime expression]'], [any coldbox=''])
          Constructor.
    Method Summary
    boolean containsBean(string beanName)
         Check if the bean factory contains a bean.
    void createFactory()
         Create the factory.
    any getBean(string beanName)
         Get a Bean from the object factory.
    any<Controller> getColdBox()
         Get the ColdBox controller this adapter is linked to.
    string getDefinitionFile()
         Get the definition file for this adapter.
    any getFactory()
         Get the adapted factory.
    any getParentFactory()
         Get the parent factory.
    struct getProperties()
         Get the adapter properties.
    private Util getUtil()
         Create and return a util object.
    any invokeFactoryMethod(string method, [struct args='[runtime expression]'])
         Invoke a factory method in the bean factory.
    void setParentFactory(any parent)
         Set a parent factory on the adapted factory.
     
    Methods inherited from class WEB-INF.cftags.component
    None

    Constructor Detail

    init

    public init([string definitionFile=''], [struct properties='[runtime expression]'], [any coldbox=''])

    Constructor

    Parameters:
    definitionFile - The definition file to load a factory with
    properties - Properties to pass to the factory to create
    coldbox - A coldbox application that this instance of logbox can be linked to, not used if not using within a ColdBox Application.

    Method Detail

    containsBean

    public boolean containsBean(string beanName)

    Check if the bean factory contains a bean

    Parameters:
    beanName - The bean name to retrieve from the object factory

    createFactory

    public void createFactory()

    Create the factory


    getBean

    public any getBean(string beanName)

    Get a Bean from the object factory

    Parameters:
    beanName - The bean name to retrieve from the object factory

    getColdBox

    public any<Controller> getColdBox()

    Get the ColdBox controller this adapter is linked to. If not linked and exception is thrown


    getDefinitionFile

    public string getDefinitionFile()

    Get the definition file for this adapter


    getFactory

    public any getFactory()

    Get the adapted factory


    getParentFactory

    public any getParentFactory()

    Get the parent factory


    getProperties

    public struct getProperties()

    Get the adapter properties


    getUtil

    private Util getUtil()

    Create and return a util object


    invokeFactoryMethod

    public any invokeFactoryMethod(string method, [struct args='[runtime expression]'])

    Invoke a factory method in the bean factory. If the factory returns a void/null, this method returns void or null

    Parameters:
    method - The method to invoke
    args - The arguments to pass into the method

    setParentFactory

    public void setParentFactory(any parent)

    Set a parent factory on the adapted factory

    Parameters:
    parent - The parent factory to add